Auto-generated from the oblikovati.org/api/types Go source. Do not edit here.
types
import "oblikovati.org/api/types"
Package types holds the shared vocabulary of the Oblikovati API: enums, stable identifiers, and value/option structs with no behavior. Both the GPL implementation and add-ins use these as a common, Apache-2.0 type currency so the same concepts (a document kind, a parameter kind, a 2D point) are named once.
Types here are pure data — no dependency on the implementation, no methods that touch live model state. The richer behavioral surface lives in oblikovati.org/api/contract (in-proc Go interfaces) and oblikovati.org/api/wire (the JSON contract).
Index
- Constants
- func CanonicalKey(key string) string
- func SheetDimensionsMM(s SheetSize) (width, height float64, ok bool)
- type ASideFaceStatus
- type Accuracy
- type ActionID
- type AddInKind
- type AddInLoadBehavior
- type AlignmentType
- type AngleConstraintSolutionType
- type AnisotropicElastic
- type AssemblyConstraintType
- type AssemblyJointOriginDefinitionType
- type AssemblyJointType
- type AssetSource
- type AttachmentKind
- type BOMStructure
- type BOMViewKind
- type BSplineCurve2dDef
- type BSplineCurveDef
- type BSplineSurfaceDef
- type BackFaceCullingEnum
- type BackgroundTypeEnum
- type BaseViewOrientation
- type BendPartType
- type BooleanType
- type Box
- type Box2d
- type BreakOrientation
- type BrepBodyDefinition
- type BrepCurveDef
- type BrepDefinitionIssue
- type BrepEdgeDef
- type BrepEdgeUseDef
- type BrepFaceDef
- type BrepLoopDef
- type BrepLumpDef
- type BrepShellDef
- type BrepSurfaceDef
- type BrepVertexDef
- type BrepWireDef
- type ButtonStyle
- type CachedGraphicsStatusEnum
- type ChamferConcaveStrategy
- type ChamferType
- type ClientGraphicsTypeEnum
- type Color
- type ColorBindingEnum
- type ColorSourceTypeEnum
- type ConstraintInferenceKind
- type ConstraintInferencePriority
- type ConstraintStatus
- type Containment
- type ControlKind
- type Curve2dType
- type CurveGeometryForm
- type CurveType
- type CustomPropertyPrecision
- type CustomPropertyType
- type DSDOFImposedMotionType
- type DSJointType
- type DXFVersion
- type DeriveStyle
- type Dimension3DConstraintKind
- type DimensionConstraintKind
- type DimensionDisplayType
- type DimensionUnit
- type DirectEditOperationType
- type DisplayModeEnum
- type DisplayModeSourceTypeEnum
- type DisplayQualityEnum
- type DisplaySeparateColorsTypeEnum
- type DisplayTransformBehaviorEnum
- type DockingState
- type DocumentInterestRecord
- type DocumentInterestType
- type DocumentSubTypeID
- type DocumentType
- type DraftingStandard
- type DrawingAnnotationKind
- type DrawingCurveKind
- type DrawingDimensionType
- type DrawingSketchEntityKind
- type DrawingViewStyle
- type DrawingViewType
- type DriveVariable
- type EdgeCollectionKind
- type Electrical
- type Environment
- type ExchangeFormat
- type FeatureApproximationType
- type FileLocationType
- type FilletConcaveStrategy
- type FilletCornerType
- type FilletCrossSection
- type FilletType
- type FlatPatternEdgeType
- type FlatPatternFaceType
- type Geometric3DConstraintKind
- type GeometricCharacteristic
- type GeometricConstraintKind
- type GeometryMoveableStatus
- type GraphicsColorBinding
- type GraphicsLane
- type GraphicsLineType
- type GraphicsNormalBinding
- type GraphicsPointStyle
- type GraphicsPrimitiveKind
- type GraphicsSelectabilityEnum
- type GraphicsVisibilityEnum
- type GridCell
- type GridTrack
- type GridTrackKind
- type GroundShadowEnum
- type HatchPattern
- type HealthStatus
- type HelicalShapeDefinitionKind
- type HelixEndKind
- type HoleNoteQuantity
- type IsotropyClass
- type KeyChord
- type LightDefinitionTypeEnum
- type LightTypeEnum
- type LightingStyleTypeEnum
- type LineDefinitionSpaceEnum
- type LoftAreaStop
- type LoftCondition
- func (c LoftCondition) ContinuityOrder() int
- func (c LoftCondition) CurvesViaAngle() bool
- func (c LoftCondition) IsFaceContinuity() bool
- func (c LoftCondition) IsFree() bool
- func (c LoftCondition) IsPointCondition() bool
- func (c LoftCondition) IsSharp() bool
- func (c LoftCondition) IsTangentToPlane() bool
- type LoftType
- type Magnetic
- type MagneticClass
- type MassPropertiesAccuracy
- type MateConstraintSolutionType
- type MaterialRemoval
- type Matrix
- func CoordinateSystemMatrix(origin Point, xAxis, yAxis, zAxis UnitVector) Matrix
- func IdentityMatrix() Matrix
- func RotationMatrix(angle float64, axis UnitVector, center Point) Matrix
- func TranslationMatrix(v Vector) Matrix
- func (m Matrix) At(row, col int) float64
- func (m Matrix) Determinant() float64
- func (m Matrix) Invert() (Matrix, error)
- func (m Matrix) MarshalJSON() ([]byte, error)
- func (m Matrix) Mul(o Matrix) Matrix
- func (m Matrix) TransformPoint(p Point) Point
- func (m Matrix) TransformVector(v Vector) Vector
- func (m Matrix) Translation() Vector
- func (m *Matrix) UnmarshalJSON(b []byte) error
- type Matrix2d
- func IdentityMatrix2d() Matrix2d
- func RotationMatrix2d(angle float64, center Point2d) Matrix2d
- func TranslationMatrix2d(v Vector2d) Matrix2d
- func (m Matrix2d) At(row, col int) float64
- func (m Matrix2d) MarshalJSON() ([]byte, error)
- func (m Matrix2d) Mul(o Matrix2d) Matrix2d
- func (m Matrix2d) TransformPoint(p Point2d) Point2d
- func (m Matrix2d) TransformVector(v Vector2d) Vector2d
- func (m Matrix2d) Translation() Vector2d
- func (m *Matrix2d) UnmarshalJSON(b []byte) error
- type MeasureType
- type Mechanical
- type MeshResolution
- type MessageSeverity
- type MiniToolbarControlKind
- type ModelDiameterFromThread
- type ModelValueType
- type MoveOperationType
- type NewFileMetadata
- type NormalBindingEnum
- type ObjectKind
- type ObjectRef
- type OffsetCornerClosureType
- type OrbitTypeEnum
- type OrientedBox
- type PanelControlKind
- type ParamAnomaly
- type ParameterDisplayFormat
- type ParameterGroupKey
- type ParameterKind
- type PatternBoundaryInclusion
- type PatternComputeType
- type PatternOrientation
- type PatternPositioningMethod
- type PatternSpacingType
- type PhysicalProperties
- type Point
- func NewPoint(x, y, z float64) Point
- func (p Point) DistanceTo(o Point) float64
- func (p Point) IsEqualTo(o Point, tol float64) bool
- func (p Point) MarshalJSON() ([]byte, error)
- func (p Point) Midpoint(o Point) Point
- func (p Point) TranslateBy(v Vector) Point
- func (p *Point) UnmarshalJSON(b []byte) error
- func (p Point) VectorTo(o Point) Vector
- type Point2d
- func NewPoint2d(x, y float64) Point2d
- func (p Point2d) DistanceTo(o Point2d) float64
- func (p Point2d) IsEqualTo(o Point2d, tol float64) bool
- func (p Point2d) MarshalJSON() ([]byte, error)
- func (p Point2d) Midpoint(o Point2d) Point2d
- func (p Point2d) TranslateBy(v Vector2d) Point2d
- func (p *Point2d) UnmarshalJSON(b []byte) error
- func (p Point2d) VectorTo(o Point2d) Vector2d
- type PointInferenceKind
- type PointRenderStyleEnum
- type ProjectionDirection
- type ProjectionTypeEnum
- type PromptRestriction
- type RayTracingQualityEnum
- type ReferenceStatus
- type ReliefShape
- type RepresentationKind
- type Rgba
- type RibbonKey
- type ScreenQuadrant
- type SectionPlane
- type ShadowDirectionEnum
- type SheetOrientation
- type SheetSize
- type ShrinkwrapEnvelopeStyle
- type ShrinkwrapRemoveStyle
- type Sketch3DEntityKind
- type SketchEntityKind
- type SketchLineType
- type SketchPatternKind
- type SketchPointInferenceKind
- type SketchSettings
- type SketchTextStyle
- type SolutionNature
- type SplineFitMethod
- type SplitType
- type StartupActionType
- type StyleLocationEnum
- type SurfaceContinuity
- type SurfaceGeometryForm
- type SurfaceType
- type SweepDefinitionType
- type SweepProfileOrientation
- type SweepProfileScaling
- type SweepType
- type TextHorizontalAlign
- type TextVerticalAlign
- type ThemeKind
- type ThemeToken
- type Thermal
- type ThumbnailSaveOption
- type Tolerance
- type ToleranceType
- type TransactionPoint
- type TransparencyTypeEnum
- type TriadMoveType
- type TriadSegment
- type UnfoldMethodType
- type UnitVector
- func NewUnitVector(x, y, z float64) (UnitVector, error)
- func (u UnitVector) AngleTo(o UnitVector) float64
- func (u UnitVector) AsVector() Vector
- func (u UnitVector) Cross(o UnitVector) Vector
- func (u UnitVector) Dot(o UnitVector) float64
- func (u UnitVector) MarshalJSON() ([]byte, error)
- func (u UnitVector) Negate() UnitVector
- func (u *UnitVector) UnmarshalJSON(b []byte) error
- type UnitVector2d
- func NewUnitVector2d(x, y float64) (UnitVector2d, error)
- func (u UnitVector2d) AngleTo(o UnitVector2d) float64
- func (u UnitVector2d) AsVector() Vector2d
- func (u UnitVector2d) Dot(o UnitVector2d) float64
- func (u UnitVector2d) MarshalJSON() ([]byte, error)
- func (u UnitVector2d) Negate() UnitVector2d
- func (u *UnitVector2d) UnmarshalJSON(b []byte) error
- type UnitsType
- type ValueType
- type Variant
- func BoolVariant(v bool) Variant
- func BytesVariant(v []byte) Variant
- func DoubleVariant(v float64) Variant
- func IntegerVariant(v int64) Variant
- func StringVariant(v string) Variant
- func UnitVariant(v float64, unit string) Variant
- func (v Variant) Bool() (bool, bool)
- func (v Variant) Bytes() ([]byte, bool)
- func (v Variant) Double() (float64, bool)
- func (v Variant) Integer() (int64, bool)
- func (v Variant) MarshalJSON() ([]byte, error)
- func (v Variant) Str() (string, bool)
- func (v Variant) Type() ValueType
- func (v Variant) Unit() string
- func (v *Variant) UnmarshalJSON(b []byte) error
- type Vector
- func NewVector(x, y, z float64) Vector
- func (v Vector) Add(o Vector) Vector
- func (v Vector) AngleTo(o Vector) float64
- func (v Vector) AsPoint() Point
- func (v Vector) AsUnit() (UnitVector, error)
- func (v Vector) Cross(o Vector) Vector
- func (v Vector) Dot(o Vector) float64
- func (v Vector) IsEqualTo(o Vector, tol float64) bool
- func (v Vector) Length() float64
- func (v Vector) LengthSquared() float64
- func (v Vector) MarshalJSON() ([]byte, error)
- func (v Vector) Negate() Vector
- func (v Vector) Scale(s float64) Vector
- func (v Vector) Sub(o Vector) Vector
- func (v *Vector) UnmarshalJSON(b []byte) error
- type Vector2d
- func NewVector2d(x, y float64) Vector2d
- func (v Vector2d) Add(o Vector2d) Vector2d
- func (v Vector2d) AngleTo(o Vector2d) float64
- func (v Vector2d) AsPoint() Point2d
- func (v Vector2d) AsUnit() (UnitVector2d, error)
- func (v Vector2d) Cross(o Vector2d) float64
- func (v Vector2d) Dot(o Vector2d) float64
- func (v Vector2d) IsEqualTo(o Vector2d, tol float64) bool
- func (v Vector2d) Length() float64
- func (v Vector2d) LengthSquared() float64
- func (v Vector2d) MarshalJSON() ([]byte, error)
- func (v Vector2d) Negate() Vector2d
- func (v Vector2d) Scale(s float64) Vector2d
- func (v Vector2d) Sub(o Vector2d) Vector2d
- func (v *Vector2d) UnmarshalJSON(b []byte) error
- type ViewLayout
- type ViewOperationTypeEnum
- type ViewOrientationTypeEnum
- type ViewTileTypeEnum
- type ViewTypeEnum
- type WindowState
- type WorkPlaneKind
Constants
Per-document-type on-disk extensions (ADR-0034). Each document kind carries its own user-facing extension so the OS, file dialogs, and the reference graph can identify a file's kind *before* its manifest is read, and so assemblies and drawings name their referenced files unambiguously. This supersedes the single ".obk" package extension (ADR-0020 amended): the manifest's documentType stays the canonical identity — the extension mirrors it and must agree.
const (
// PartFileExtension is the extension for a part document (DocumentPart).
PartFileExtension = ".opd"
// AssemblyFileExtension is the extension for an assembly document (DocumentAssembly).
AssemblyFileExtension = ".oad"
// DrawingFileExtension is the extension for a drawing document (DocumentDrawing).
DrawingFileExtension = ".odd"
// PresentationFileExtension is the extension for a presentation document (DocumentPresentation).
PresentationFileExtension = ".ord"
// ProjectFileExtension is the extension for a design-project file. A project is
// NOT a document (it has no DocumentType) — it is the portable search-path
// config that resolves a document's referenced files (architecture core/05).
ProjectFileExtension = ".opj"
)
Well-known work-feature references — the part's static origin coordinate frame, valid as entries in a work-plane create request's Refs (e.g. the base plane of an offset). Other references (to user work planes, or a B-rep face) come back from workPlanes.list and model selection.
const (
WorkRefCenter = "origin/point/center"
WorkRefXAxis = "origin/axis/x"
WorkRefYAxis = "origin/axis/y"
WorkRefZAxis = "origin/axis/z"
WorkRefXYPlane = "origin/plane/xy"
WorkRefXZPlane = "origin/plane/xz"
WorkRefYZPlane = "origin/plane/yz"
)
ContinuityInfinite is the Continuity() order reported by analytic geometry, which is smooth to every order (C∞).
const ContinuityInfinite int = 1 << 30
ReservedSubTypePrefix marks built-in sub-type ids; client registration of ids under this prefix is rejected.
const ReservedSubTypePrefix = "org.oblikovati."
func CanonicalKey
func CanonicalKey(key string) string
CanonicalKey normalizes a raw key token so case never splits a binding: a single letter is upper-cased ("e" and "E" are the same chord), and a multi-character token ("Escape", "F5") is kept verbatim.
func SheetDimensionsMM
func SheetDimensionsMM(s SheetSize) (width, height float64, ok bool)
SheetDimensionsMM returns a standard size's portrait width and height in millimetres (width ≤ height), and true. For SheetSizeCustom it returns (0, 0, false): a custom sheet's dimensions come from the sheet itself. Apply SheetOrientation to swap width and height for landscape.
w, h, _ := types.SheetDimensionsMM(types.SheetSizeA4) // 210, 297
type ASideFaceStatus
ASideFaceStatus reports how a face of a mold parting was assigned to the A-side of the tooling split (parity: ASideFaceStatusEnum). The A-side faces are those that go with the cavity half; "default" means the assignment was made automatically, while "sick" flags a face whose assignment could not be resolved. The numeric values are frozen at the reference API's ids and must never be renumbered.
This is the canonical, Apache-2.0 definition; the GPL implementation aliases it (ADR-0018) and maps it onto the core/cavity split result.
type ASideFaceStatus int32
const (
// ASideDefault — the face's side was assigned automatically.
ASideDefault ASideFaceStatus = 106241
// ASideSick — the face is on the A-side list but its assignment is invalid.
ASideSick ASideFaceStatus = 106242
// ASideUpToDate — the face's side assignment is explicit and current.
ASideUpToDate ASideFaceStatus = 106243
)
func ParseASideFaceStatus
func ParseASideFaceStatus(s string) (ASideFaceStatus, bool)
ParseASideFaceStatus resolves a wire spelling back to its status.
func (ASideFaceStatus) String
func (s ASideFaceStatus) String() string
String returns the status's wire spelling.
type Accuracy
Accuracy selects the computational accuracy of a property calculation (region properties, mass properties). Higher accuracy maps to denser sampling/quadrature and costs proportionally more (M06-F08, Oblikovati/Oblikovati#623; shared vocabulary with M18-F01 mass properties).
The values are a frozen block matching the reference API's accuracy enum; never renumber them.
type Accuracy int32
const (
AccuracyLow Accuracy = 69377
AccuracyMedium Accuracy = 69378
AccuracyHigh Accuracy = 69379
AccuracyVeryHigh Accuracy = 69380
)
func ParseAccuracy
func ParseAccuracy(s string) (Accuracy, bool)
ParseAccuracy resolves a wire spelling back to its accuracy.
func (Accuracy) String
func (a Accuracy) String() string
String returns the accuracy's wire spelling.
type ActionID
ActionID identifies a bindable action in the keymap (M05-F17, Oblikovati#831): a registered command's id verbatim (e.g. "Feature.Extrude"), or a reserved built-in action id (e.g. "edit.undo"). It is a string so existing command-id call sites are unaffected; the host's binding engine resolves it to a command or a built-in.
type ActionID = string
type AddInKind
AddInKind classifies an installed add-in — the ApplicationAddInTypeEnum equivalent. The host treats kinds identically today; the classification exists so UI (an add-in manager dialog) and tooling can group entries, and so translator add-ins can be routed to the exchange layer when that seam opens (M05-F01, #245).
type AddInKind uint8
const (
// StandardAddIn is a general-purpose extension (the zero value — every add-in
// without a declared kind).
StandardAddIn AddInKind = 0
// TranslatorAddIn contributes import/export format support (a
// [oblikovati.org/api/contract.MeshTranslator] behind the wire boundary).
TranslatorAddIn AddInKind = 1
)
func (AddInKind) String
func (k AddInKind) String() string
String returns the kind's stable name ("standard", "translator").
type AddInLoadBehavior
AddInLoadBehavior is when (and whether) the host activates an installed add-in — the AddInLoadBehaviorEnum equivalent, narrowed to the behaviors the host honors today. Per-document-type loading (load-with-parts/assemblies/…) is intentionally not modeled until the host has per-document applets to defer to (M05-F01, #245).
The zero value is LoadOnStartup so a freshly discovered add-in activates without any stored preference.
type AddInLoadBehavior uint8
const (
// LoadOnStartup activates the add-in when the host starts (the default).
LoadOnStartup AddInLoadBehavior = 0
// LoadOnDemand registers the add-in but defers activation until something —
// the user, another add-in, or a script — asks for it (addins.activate).
LoadOnDemand AddInLoadBehavior = 1
// LoadDisabled registers the add-in so it is listed, but the host never
// activates it automatically and addins.activate refuses to.
LoadDisabled AddInLoadBehavior = 2
)
func ParseAddInLoadBehavior
func ParseAddInLoadBehavior(name string) (AddInLoadBehavior, bool)
ParseAddInLoadBehavior maps a stable name back to its behavior; ok is false for an unknown name (callers keep their current value rather than guessing).
b, ok := types.ParseAddInLoadBehavior("demand") // LoadOnDemand, true
func (AddInLoadBehavior) String
func (b AddInLoadBehavior) String() string
String returns the behavior's stable name ("startup", "demand", "disabled").
type AlignmentType
AlignmentType names how a flat-pattern orientation aligns its reference axis to the page: the chosen edge/axis is laid horizontal or vertical, then rotated by the orientation's alignment angle.
type AlignmentType int32
const (
// HorizontalAlignment lays the orientation's alignment axis along the horizontal (the
// default), so the flat's reported length runs left-to-right.
HorizontalAlignment AlignmentType = iota
// VerticalAlignment lays the alignment axis along the vertical.
VerticalAlignment
)
func ParseAlignmentType
func ParseAlignmentType(s string) (AlignmentType, bool)
ParseAlignmentType resolves a wire spelling back to its alignment type.
func (AlignmentType) String
func (a AlignmentType) String() string
String returns the alignment type's wire spelling.
type AngleConstraintSolutionType
AngleConstraintSolutionType discriminates how an angle constraint measures its angle: undirected (the unsigned angle), directed about an explicit reference axis (so the sign and full 0–360° range are meaningful), or the reference-vector form that names the third axis directly.
type AngleConstraintSolutionType uint32
const (
// AngleSolutionUndirected is the default: the unsigned angle between the directions.
AngleSolutionUndirected AngleConstraintSolutionType = 0
// AngleSolutionDirected measures the signed angle about an implied reference axis.
AngleSolutionDirected AngleConstraintSolutionType = 1
// AngleSolutionReferenceVector measures the angle about an explicit reference vector.
AngleSolutionReferenceVector AngleConstraintSolutionType = 2
)
func (AngleConstraintSolutionType) String
func (s AngleConstraintSolutionType) String() string
String returns a stable lowercase name.
type AnisotropicElastic
AnisotropicElastic holds the direction-dependent elastic constants of an orthotropic material (a transversely-isotropic material is the constrained special case E2=E3, G12=G13, ν12=ν13), expressed in the material's principal axes. Axis convention: for wood 1 = longitudinal (along grain), 2 = radial, 3 = tangential; for a unidirectional fibre lamina 1 = fibre, 2 = 3 = transverse. A solver uses these in place of the scalar Mechanical E/ν when IsotropyClass is not isotropic; yield and ultimate strengths still come from Mechanical as an equivalent scalar until directional strength allowables are added (ADR-0025).
The nine constants are the independent entries of the orthotropic compliance matrix; νIJ is the Poisson contraction along J from a load along I, with the symmetry νIJ/Ei = νJI/Ej. Alpha1..3 are the linear thermal expansion coefficients along each axis, for orthotropic thermal-stress analysis (these can be negative, e.g. the fibre direction of carbon/aramid laminates).
type AnisotropicElastic struct {
E1 float64 `json:"e1" yaml:"e1"` // GPa, axis-1 Young's modulus
E2 float64 `json:"e2" yaml:"e2"` // GPa, axis-2 Young's modulus
E3 float64 `json:"e3" yaml:"e3"` // GPa, axis-3 Young's modulus
G12 float64 `json:"g12" yaml:"g12"` // GPa, shear modulus in the 1-2 plane
G23 float64 `json:"g23" yaml:"g23"` // GPa, shear modulus in the 2-3 plane
G13 float64 `json:"g13" yaml:"g13"` // GPa, shear modulus in the 1-3 plane
Nu12 float64 `json:"nu12" yaml:"nu12"` // major Poisson's ratio, load on 1 → strain on 2
Nu23 float64 `json:"nu23" yaml:"nu23"` // major Poisson's ratio, load on 2 → strain on 3
Nu13 float64 `json:"nu13" yaml:"nu13"` // major Poisson's ratio, load on 1 → strain on 3
Alpha1 float64 `json:"alpha1" yaml:"alpha1"` // 1/K, axis-1 linear thermal expansion
Alpha2 float64 `json:"alpha2" yaml:"alpha2"` // 1/K, axis-2 linear thermal expansion
Alpha3 float64 `json:"alpha3" yaml:"alpha3"` // 1/K, axis-3 linear thermal expansion
}
type AssemblyConstraintType
AssemblyConstraintType discriminates the assembly relationship kinds. The classic set (mate…symmetry) positions geometry; the motion set (rotate-rotate… translate-translate) couples driven values; transitional models sliding contact; custom is solved by an add-in.
type AssemblyConstraintType uint32
const (
// ConstraintUnknown is the zero value: an unresolved or not-yet-typed constraint.
ConstraintUnknown AssemblyConstraintType = 0
// ConstraintMate makes two faces/edges/points coincident (normals opposed by default).
ConstraintMate AssemblyConstraintType = 1
// ConstraintFlush aligns two faces so their normals point the same way (co-planar).
ConstraintFlush AssemblyConstraintType = 2
// ConstraintAngle holds a fixed angle between two directions.
ConstraintAngle AssemblyConstraintType = 3
// ConstraintTangent keeps a face tangent to a curved face (inside or outside).
ConstraintTangent AssemblyConstraintType = 4
// ConstraintInsert combines an axis mate with a plane mate (a bolt into a hole).
ConstraintInsert AssemblyConstraintType = 5
// ConstraintSymmetry positions two occurrences symmetrically about a plane.
ConstraintSymmetry AssemblyConstraintType = 6
// ConstraintRotateRotate couples two rotations by a gear ratio.
ConstraintRotateRotate AssemblyConstraintType = 7
// ConstraintRotateTranslate couples a rotation to a translation (rack and pinion).
ConstraintRotateTranslate AssemblyConstraintType = 8
// ConstraintTranslateTranslate couples two translations by a ratio.
ConstraintTranslateTranslate AssemblyConstraintType = 9
// ConstraintTransitional keeps a face in sliding contact with a set of faces.
ConstraintTransitional AssemblyConstraintType = 10
// ConstraintCustom is a relationship solved by an add-in, not the built-in solver.
ConstraintCustom AssemblyConstraintType = 11
)
func (AssemblyConstraintType) IsValid
func (t AssemblyConstraintType) IsValid() bool
IsValid reports whether t names a real constraint kind (not unknown).
func (AssemblyConstraintType) String
func (t AssemblyConstraintType) String() string
String returns a stable lowercase name, used in diagnostics and the wire DTOs. The value, not this name, is the persisted identity.
type AssemblyJointOriginDefinitionType
AssemblyJointOriginDefinitionType discriminates how a joint origin (the frame the joint is built on, on each component) is defined: from a point, an edge/axis, or a planar face.
type AssemblyJointOriginDefinitionType uint32
const (
// JointOriginUnknown is the zero value.
JointOriginUnknown AssemblyJointOriginDefinitionType = 0
// JointOriginPoint derives the origin frame from a vertex / work point.
JointOriginPoint AssemblyJointOriginDefinitionType = 1
// JointOriginEdge derives the origin frame from an edge / axis (its line).
JointOriginEdge AssemblyJointOriginDefinitionType = 2
// JointOriginPlane derives the origin frame from a planar face / work plane (its normal).
JointOriginPlane AssemblyJointOriginDefinitionType = 3
)
func (AssemblyJointOriginDefinitionType) String
func (t AssemblyJointOriginDefinitionType) String() string
String returns a stable lowercase name.
type AssemblyJointType
AssemblyJointType discriminates the standard joint kinds, ordered by remaining freedom: rigid (0 DOF) through ball (3 rotational DOF). A joint reduces the relative placement of two occurrences to exactly its degrees of freedom.
type AssemblyJointType uint32
const (
// JointUnknown is the zero value: an unresolved or not-yet-typed joint.
JointUnknown AssemblyJointType = 0
// JointRigid fully fixes the two occurrences together (0 DOF).
JointRigid AssemblyJointType = 1
// JointRotational allows one rotation about the joint axis (1 DOF).
JointRotational AssemblyJointType = 2
// JointSlider allows one translation along the joint axis (1 DOF).
JointSlider AssemblyJointType = 3
// JointCylindrical allows translation along and rotation about the axis (2 DOF).
JointCylindrical AssemblyJointType = 4
// JointPlanar allows two translations in a plane and one rotation about its normal (3 DOF).
JointPlanar AssemblyJointType = 5
// JointBall allows three rotations about a common point (3 DOF).
JointBall AssemblyJointType = 6
)
func (AssemblyJointType) DegreesOfFreedom
func (t AssemblyJointType) DegreesOfFreedom() int
DegreesOfFreedom returns the number of free DOF a joint of this kind leaves between the two occurrences (rigid 0 … ball 3) — the value the solver's rank analysis must produce.
func (AssemblyJointType) IsValid
func (t AssemblyJointType) IsValid() bool
IsValid reports whether t names a real joint kind (not unknown).
func (AssemblyJointType) String
func (t AssemblyJointType) String() string
String returns a stable lowercase name. The value, not this name, is the persisted identity.
type AssetSource
AssetSource says where an appearance or material asset comes from, which fixes its edit policy and resolution priority. A document-embedded copy is authoritative for portability, then the project library (the shared catalog), then the shipped built-ins (read-only). This follows the standard library/document asset distinction.
This is the canonical, Apache-2.0 definition; the GPL model aliases it (model/material.Source = types.AssetSource).
type AssetSource string
const (
// AssetBuiltin is a shipped, read-only catalog asset.
AssetBuiltin AssetSource = "builtin"
// AssetProject is a user asset in the active project's shared library.
AssetProject AssetSource = "project"
// AssetDocument is a copy embedded in a document (so the .obk is self-contained).
AssetDocument AssetSource = "document"
)
func (AssetSource) Editable
func (s AssetSource) Editable() bool
Editable reports whether the user may modify an asset of this source (everything but the read-only built-ins).
type AttachmentKind
AttachmentKind classifies a document's reference to a foreign (non-native) file: linked in place, embedded as a payload carried inside the document, or a generic tracked path (M03-F08, Oblikovati/Oblikovati#609).
The values are a frozen block matching the reference API's foreign-document type enum; never renumber them.
type AttachmentKind int32
const (
// AttachmentGeneric is an opaque tracked path: the document records the
// file but assigns it no further semantics.
AttachmentGeneric AttachmentKind = 3329
// AttachmentEmbedded carries the foreign file's bytes inside the document
// (as an embedded resource), so it travels with the .obk.
AttachmentEmbedded AttachmentKind = 3330
// AttachmentLinked references the foreign file in place; the document
// tracks its path and last-known modification time.
AttachmentLinked AttachmentKind = 3331
)
func ParseAttachmentKind
func ParseAttachmentKind(s string) (AttachmentKind, bool)
ParseAttachmentKind resolves a wire spelling back to its AttachmentKind.
func (AttachmentKind) String
func (k AttachmentKind) String() string
String returns the attachment kind's wire spelling.
type BOMStructure
BOMStructure is how a placed component participates in the bill of materials (M11-F05, Oblikovati/Oblikovati#730). The wire spelling matches the model's bom.Structure.String().
type BOMStructure string
const (
// BOMNormal is a counted row whose sub-assembly children are expanded.
BOMNormal BOMStructure = "normal"
// BOMPhantom is not a row of its own: its children are promoted into its parent.
BOMPhantom BOMStructure = "phantom"
// BOMReference is shown for context but never counted.
BOMReference BOMStructure = "reference"
// BOMPurchased is a bought item counted as one line; its children are not broken out.
BOMPurchased BOMStructure = "purchased"
// BOMInseparable is a welded/glued sub-assembly counted as one line; not broken out.
BOMInseparable BOMStructure = "inseparable"
)
type BOMViewKind
BOMViewKind selects a bill-of-materials view.
type BOMViewKind string
const (
// BOMStructured is the hierarchical view: top-level rows with sub-assembly children
// nested, quantities counted per parent.
BOMStructured BOMViewKind = "structured"
// BOMPartsOnly is the flat view: every unique counted part once, with its total
// quantity across the whole assembly.
BOMPartsOnly BOMViewKind = "partsOnly"
)
type BSplineCurve2dDef
BSplineCurve2dDef is the 2D NURBS curve recipe.
type BSplineCurve2dDef struct {
Degree int `json:"degree"`
Poles []Point2d `json:"poles"`
Weights []float64 `json:"weights,omitempty"`
Knots []float64 `json:"knots"`
}
type BSplineCurveDef
BSplineCurveDef is the complete NURBS curve recipe — the BSplineCurveDefinition equivalent as pure data, usable locally by an add-in and as the wire encoding of a spline crossing the boundary. Weights may be nil for a non-rational curve (all 1).
type BSplineCurveDef struct {
Degree int `json:"degree"`
Poles []Point `json:"poles"`
Weights []float64 `json:"weights,omitempty"`
Knots []float64 `json:"knots"`
}
type BSplineSurfaceDef
BSplineSurfaceDef is the NURBS surface recipe: poles in row-major (u-major) order, PolesU×PolesV of them, with optional weights in the same layout.
type BSplineSurfaceDef struct {
DegreeU int `json:"degreeU"`
DegreeV int `json:"degreeV"`
PolesU int `json:"polesU"`
PolesV int `json:"polesV"`
Poles []Point `json:"poles"`
Weights []float64 `json:"weights,omitempty"`
KnotsU []float64 `json:"knotsU"`
KnotsV []float64 `json:"knotsV"`
}
type BackFaceCullingEnum
BackFaceCullingEnum is which triangle winding the renderer culls: none, clockwise, or counter-clockwise. Frozen ids 96769–96771.
type BackFaceCullingEnum int32
const (
// CullNone draws both faces of every triangle (96769).
CullNone BackFaceCullingEnum = 96769
// CullClockwise culls clockwise-wound faces (96770).
CullClockwise BackFaceCullingEnum = 96770
// CullCounterClockwise culls counter-clockwise-wound faces (96771).
CullCounterClockwise BackFaceCullingEnum = 96771
)
func AllBackFaceCullings
func AllBackFaceCullings() []BackFaceCullingEnum
AllBackFaceCullings returns every defined back-face-culling mode.
func (BackFaceCullingEnum) IsValid
func (b BackFaceCullingEnum) IsValid() bool
IsValid reports whether b is a defined back-face-culling mode.
func (BackFaceCullingEnum) String
func (b BackFaceCullingEnum) String() string
String returns the back-face-culling mode's user-facing name.
type BackgroundTypeEnum
BackgroundTypeEnum is how the viewport background is painted: a single solid color, a vertical two-color gradient, or a background image. The numeric ids are stable, frozen values (52737–52739).
First consumed by the color-scheme palette (which carries the background colors); the display-settings surface reuses it. This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.BackgroundTypeEnum).
type BackgroundTypeEnum int32
const (
// OneColorBackground paints a single solid background color (52737).
OneColorBackground BackgroundTypeEnum = 52737
// GradientBackground paints a top-to-bottom two-color gradient (52738).
GradientBackground BackgroundTypeEnum = 52738
// ImageBackground paints a background image (52739).
ImageBackground BackgroundTypeEnum = 52739
)
func AllBackgroundTypes
func AllBackgroundTypes() []BackgroundTypeEnum
AllBackgroundTypes returns every defined background type, in picker order.
func (BackgroundTypeEnum) IsValid
func (b BackgroundTypeEnum) IsValid() bool
IsValid reports whether b is a defined background type.
func (BackgroundTypeEnum) String
func (b BackgroundTypeEnum) String() string
String returns the background type's user-facing name.
type BaseViewOrientation
BaseViewOrientation names the standard orientation a base view projects from. The zero value is BaseViewFront.
type BaseViewOrientation int32
const (
// BaseViewFront looks along +Y (the front elevation).
BaseViewFront BaseViewOrientation = iota
// BaseViewTop looks straight down (-Z), the plan.
BaseViewTop
// BaseViewRight looks along -X (the right side).
BaseViewRight
// BaseViewBack looks along -Y.
BaseViewBack
// BaseViewLeft looks along +X.
BaseViewLeft
// BaseViewBottom looks straight up (+Z).
BaseViewBottom
// BaseViewIso is the top-front-right isometric.
BaseViewIso
)
func ParseBaseViewOrientation
func ParseBaseViewOrientation(s string) (BaseViewOrientation, bool)
ParseBaseViewOrientation resolves a wire spelling back to its orientation.
func (BaseViewOrientation) String
func (o BaseViewOrientation) String() string
String returns the orientation's wire spelling ("front", "iso").
type BendPartType
BendPartType discriminates how a Bend Part feature's geometry is driven (parity: BendPartTypeEnum). A bend wraps a solid body around a sketch bend line; exactly two of {radius, angle, arc length} are supplied and the third is derived, so the type names which pair the definition carries. The numeric values are frozen at the reference API's ids and must never be renumbered.
This is the canonical, Apache-2.0 definition; the GPL implementation aliases it (ADR-0018) and maps it onto the bend kernel op.
type BendPartType int32
const (
// ArcLengthAndAngleBend drives the bend by its arc length and bend angle (radius derived).
ArcLengthAndAngleBend BendPartType = 83457
// RadiusAndAngleBend drives the bend by its bend radius and angle (arc length derived).
RadiusAndAngleBend BendPartType = 83458
// RadiusAndArcLengthBend drives the bend by its radius and arc length (angle derived).
RadiusAndArcLengthBend BendPartType = 83459
)
func ParseBendPartType
func ParseBendPartType(s string) (BendPartType, bool)
ParseBendPartType resolves a wire spelling back to its bend type.
func (BendPartType) String
func (t BendPartType) String() string
String returns the bend type's wire spelling.
type BooleanType
BooleanType selects the transient B-rep boolean operation (TransientBRep.DoBoolean).
type BooleanType int32
const (
BooleanDifference BooleanType = 74241
BooleanUnion BooleanType = 74242
BooleanIntersect BooleanType = 74243
)
func ParseBooleanType
func ParseBooleanType(s string) (BooleanType, bool)
ParseBooleanType resolves a wire spelling back to its operation.
func (BooleanType) String
func (b BooleanType) String() string
String returns the operation's wire spelling.
type Box
Box is an axis-aligned 3D bounding range. An empty box has Min > Max in some component (the zero value, with both at the origin, is the degenerate single-point box; use NewEmptyBox for the absorbing identity of Union).
type Box struct {
Min Point `json:"min"`
Max Point `json:"max"`
}
func NewEmptyBox
func NewEmptyBox() Box
NewEmptyBox returns the Union identity: extending it with anything yields exactly that thing.
func (Box) Center
func (b Box) Center() Point
Center returns the box midpoint (meaningless for an empty box).
func (Box) Contains
func (b Box) Contains(p Point) bool
Contains reports whether p lies inside (inclusive).
func (Box) Extend
func (b Box) Extend(p Point) Box
Extend returns the box grown to include p.
func (Box) IsEmpty
func (b Box) IsEmpty() bool
IsEmpty reports whether the box contains no points.
func (Box) Size
func (b Box) Size() Vector
Size returns the per-axis extents.
func (Box) Union
func (b Box) Union(o Box) Box
Union returns the smallest box containing both.
type Box2d
Box2d is an axis-aligned 2D bounding range.
type Box2d struct {
Min Point2d `json:"min"`
Max Point2d `json:"max"`
}
func NewEmptyBox2d
func NewEmptyBox2d() Box2d
NewEmptyBox2d returns the Union identity.
func (Box2d) Center
func (b Box2d) Center() Point2d
Center returns the box midpoint.
func (Box2d) Contains
func (b Box2d) Contains(p Point2d) bool
Contains reports whether p lies inside (inclusive).
func (Box2d) Extend
func (b Box2d) Extend(p Point2d) Box2d
Extend returns the box grown to include p.
func (Box2d) IsEmpty
func (b Box2d) IsEmpty() bool
IsEmpty reports whether the box contains no points.
func (Box2d) Union
func (b Box2d) Union(o Box2d) Box2d
Union returns the smallest box containing both.
type BreakOrientation
BreakOrientation is the axis along which a break view compresses: a horizontal break removes a vertical band (shortening a wide part), a vertical break removes a horizontal band. The zero value is BreakHorizontal.
type BreakOrientation int32
const (
// BreakHorizontal removes a vertical band, compressing the view horizontally.
BreakHorizontal BreakOrientation = iota
// BreakVertical removes a horizontal band, compressing the view vertically.
BreakVertical
)
func ParseBreakOrientation
func ParseBreakOrientation(s string) (BreakOrientation, bool)
ParseBreakOrientation resolves a wire spelling back to its break orientation.
func (BreakOrientation) String
func (o BreakOrientation) String() string
String returns the break orientation's wire spelling.
type BrepBodyDefinition
BrepBodyDefinition is the whole bottom-up graph.
type BrepBodyDefinition struct {
Solid bool `json:"solid,omitempty"`
Vertices []BrepVertexDef `json:"vertices,omitempty"`
Edges []BrepEdgeDef `json:"edges,omitempty"`
Faces []BrepFaceDef `json:"faces,omitempty"`
Lumps []BrepLumpDef `json:"lumps,omitempty"`
}
type BrepCurveDef
BrepCurveDef is one edge's model-space curve, tagged by Kind.
type BrepCurveDef struct {
// Kind is "lineSegment", "arc" or "polyline".
Kind string `json:"kind"`
// Points are flattened xyz triplets: the two ends of a lineSegment, the
// vertices of a polyline (unused for an arc).
Points []float64 `json:"points,omitempty"`
// Arc geometry: center, plane normal, the radius direction at angle 0.
Center []float64 `json:"center,omitempty"`
Normal []float64 `json:"normal,omitempty"`
RefDir []float64 `json:"refDir,omitempty"`
Radius float64 `json:"radius,omitempty"`
// StartAngle/SweepAngle in radians; positive sweep is counterclockwise
// about Normal.
StartAngle float64 `json:"startAngle,omitempty"`
SweepAngle float64 `json:"sweepAngle,omitempty"`
}
type BrepDefinitionIssue
BrepDefinitionIssue is one construction problem, addressed by its graph path (e.g. "edges[3]").
type BrepDefinitionIssue struct {
Path string `json:"path"`
Problem string `json:"problem"`
}
type BrepEdgeDef
BrepEdgeDef is one edge: curve plus endpoint vertex indices.
type BrepEdgeDef struct {
Curve BrepCurveDef `json:"curve"`
StartVertex int `json:"startVertex"`
EndVertex int `json:"endVertex"`
AssociativeID int `json:"associativeId,omitempty"`
}
type BrepEdgeUseDef
BrepEdgeUseDef is one oriented edge use within a loop.
type BrepEdgeUseDef struct {
Edge int `json:"edge"`
// Opposed traverses the edge against its natural start→end direction.
Opposed bool `json:"opposed,omitempty"`
}
type BrepFaceDef
BrepFaceDef is one face: surface, loops, material sense.
type BrepFaceDef struct {
Surface BrepSurfaceDef `json:"surface"`
// ParamReversed marks the material side opposing the surface normal.
ParamReversed bool `json:"paramReversed,omitempty"`
Loops []BrepLoopDef `json:"loops,omitempty"`
AssociativeID int `json:"associativeId,omitempty"`
}
type BrepLoopDef
BrepLoopDef is one boundary loop; a face's FIRST loop is its outer.
type BrepLoopDef struct {
Uses []BrepEdgeUseDef `json:"uses"`
}
type BrepLumpDef
BrepLumpDef groups shells and wires (one connected region).
type BrepLumpDef struct {
Shells []BrepShellDef `json:"shells,omitempty"`
Wires []BrepWireDef `json:"wires,omitempty"`
}
type BrepShellDef
BrepShellDef groups face indices into one shell.
type BrepShellDef struct {
Faces []int `json:"faces"`
}
type BrepSurfaceDef
BrepSurfaceDef is one face's surface, tagged by Kind.
type BrepSurfaceDef struct {
// Kind is "plane", "cylinder", "cone", "sphere" or "torus".
Kind string `json:"kind"`
// Origin is the plane origin / cylinder base / cone apex / sphere or
// torus center.
Origin []float64 `json:"origin,omitempty"`
// Normal is the plane normal; Axis the cylinder/cone/torus axis.
Normal []float64 `json:"normal,omitempty"`
Axis []float64 `json:"axis,omitempty"`
Radius float64 `json:"radius,omitempty"`
// HalfAngle is the cone half-angle in radians.
HalfAngle float64 `json:"halfAngle,omitempty"`
MajorRadius float64 `json:"majorRadius,omitempty"`
MinorRadius float64 `json:"minorRadius,omitempty"`
}
type BrepVertexDef
BrepVertexDef is one definition-graph vertex.
type BrepVertexDef struct {
Position []float64 `json:"position"`
// AssociativeID (non-zero) keys the vertex's reference identity so the
// caller's picks survive recompute; 0 falls back to the definition index.
AssociativeID int `json:"associativeId,omitempty"`
}
type BrepWireDef
BrepWireDef is an ordered face-less edge chain.
type BrepWireDef struct {
Edges []int `json:"edges"`
}
type ButtonStyle
ButtonStyle is how a command renders in the ribbon, narrowed to the four styles we support. The control's behavior is identical; only its size and how the icon and display name combine differ.
This is the canonical, Apache-2.0 definition; the GPL implementation aliases it (app.ButtonStyle) so existing call sites are unaffected.
type ButtonStyle uint8
const (
// TextOnlyButton shows the display name as a plain button (the zero value).
TextOnlyButton ButtonStyle = 0
// SmallIconButton shows a small (16px) icon with the display name beside it —
// the stacked rows of a ribbon panel (Move / Copy / Rotate).
SmallIconButton ButtonStyle = 1
// LargeIconButton shows a large (32px) icon with the name as a caption beneath.
LargeIconButton ButtonStyle = 2
// CompactIconButton shows a small (16px) icon only, no label — dense tool grids
// like the sketch constraint palette, where the glyph is the whole affordance.
CompactIconButton ButtonStyle = 3
)
func (ButtonStyle) ShowsIcon
func (s ButtonStyle) ShowsIcon() bool
ShowsIcon reports whether the style renders an icon (small or large), so a renderer knows to resolve the command's icon key.
func (ButtonStyle) String
func (s ButtonStyle) String() string
String returns the style's stable name.
type CachedGraphicsStatusEnum
CachedGraphicsStatusEnum is the freshness of a document's cached (persistent) client graphics: none, out-of-date (needs rebuild), or up-to-date. Frozen ids 103169–103171.
type CachedGraphicsStatusEnum int32
const (
// NoneCachedGraphics means no cached graphics exist (103169).
NoneCachedGraphics CachedGraphicsStatusEnum = 103169
// OutOfDateCachedGraphics means the cache needs a rebuild (103170).
OutOfDateCachedGraphics CachedGraphicsStatusEnum = 103170
// UpToDateCachedGraphics means the cache is current (103171).
UpToDateCachedGraphics CachedGraphicsStatusEnum = 103171
)
func AllCachedGraphicsStatuses
func AllCachedGraphicsStatuses() []CachedGraphicsStatusEnum
AllCachedGraphicsStatuses returns every defined cached-graphics status.
func (CachedGraphicsStatusEnum) IsValid
func (c CachedGraphicsStatusEnum) IsValid() bool
IsValid reports whether c is a defined cached-graphics status.
func (CachedGraphicsStatusEnum) String
func (c CachedGraphicsStatusEnum) String() string
String returns the cached-graphics-status's user-facing name.
type ChamferConcaveStrategy
ChamferConcaveStrategy selects how an edge chamfer treats a CONCAVE (internal) edge — one where the two faces fold over the material so the dihedral exceeds π (e.g. the inside corner where a rib meets a plate). A convex edge always cuts its corner and ignores this. An Oblikovati extension with no reference-API equivalent, so the numeric block below is OURS (chosen clear of the frozen reference blocks) — but, once shipped, equally frozen: never renumber.
- ChamferConcaveOutward — fill the inside corner with material: a flat 45° gusset that bridges the two faces (Boolean union). The DEFAULT; the zero value resolves to it.
- ChamferConcaveInward — instead cut a recessed groove into the corner, relieving it (Boolean cut on the material side).
type ChamferConcaveStrategy int32
const (
// ChamferConcaveOutward fills the inside corner with material (the default, also the zero value).
ChamferConcaveOutward ChamferConcaveStrategy = 200101
// ChamferConcaveInward cuts a recessed relief groove into the inside corner instead.
ChamferConcaveInward ChamferConcaveStrategy = 200102
)
func ParseChamferConcaveStrategy
func ParseChamferConcaveStrategy(s string) (ChamferConcaveStrategy, bool)
ParseChamferConcaveStrategy resolves a wire spelling back to its strategy.
func (ChamferConcaveStrategy) String
func (t ChamferConcaveStrategy) String() string
String returns the concave strategy's wire spelling.
type ChamferType
ChamferType discriminates how an edge chamfer's setback is specified (parity: ChamferDefinitionType): an equal distance on both faces, a distance on one face plus the chamfer-face angle, or two independent distances (asymmetric). The numeric values are frozen at the reference API's ids and must never be renumbered.
type ChamferType int32
const (
// ChamferDistance — equal setback distance along both adjacent faces.
ChamferDistance ChamferType = 26881
// ChamferDistanceAndAngle — a distance on the first face and the chamfer-face angle.
ChamferDistanceAndAngle ChamferType = 26882
// ChamferTwoDistances — independent setback distances on each adjacent face (asymmetric).
ChamferTwoDistances ChamferType = 26883
)
func ParseChamferType
func ParseChamferType(s string) (ChamferType, bool)
ParseChamferType resolves a wire spelling back to its type.
func (ChamferType) String
func (t ChamferType) String() string
String returns the chamfer type's wire spelling.
type ClientGraphicsTypeEnum
ClientGraphicsTypeEnum is whether a client-graphics collection is transient (rebuilt every interaction) or a preview. Frozen ids 45313–45314.
type ClientGraphicsTypeEnum int32
const (
// TransientClientGraphics is rebuilt each interaction (45313).
TransientClientGraphics ClientGraphicsTypeEnum = 45313
// PreviewClientGraphics is a command preview (45314).
PreviewClientGraphics ClientGraphicsTypeEnum = 45314
)
func AllClientGraphicsTypes
func AllClientGraphicsTypes() []ClientGraphicsTypeEnum
AllClientGraphicsTypes returns every defined client-graphics type.
func (ClientGraphicsTypeEnum) IsValid
func (c ClientGraphicsTypeEnum) IsValid() bool
IsValid reports whether c is a defined client-graphics type.
func (ClientGraphicsTypeEnum) String
func (c ClientGraphicsTypeEnum) String() string
String returns the client-graphics-type's user-facing name.
type Color
Color is the universal color value object: the currency of the whole visual surface (render styles, lights, highlight sets, client-graphics color sets, display settings all traffic in it). It is plain data — 8-bit R/G/B components, a 0–1 Opacity (0 fully transparent, 1 fully opaque), and a Source discriminating an override from an inherited color. It mirrors the reference Color object's Red/Green/Blue/Opacity/ColorSourceType.
This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.Color = types.Color) so the head, renderer, and model share one color type.
c := types.NewColor(255, 0, 0) // opaque red, override source
c.Opacity = 0.5 // half-transparent
type Color struct {
R uint8 `json:"r"`
G uint8 `json:"g"`
B uint8 `json:"b"`
Opacity float64 `json:"opacity"`
Source ColorSourceTypeEnum `json:"source"`
}
func NewColor
func NewColor(r, g, b uint8) Color
NewColor builds an opaque override Color from 8-bit R/G/B components — the common case.
func (Color) Hex
func (c Color) Hex() string
Hex formats the color as "#RRGGBB" (lower-case), ignoring opacity — the form a scheme file stores for an opaque swatch.
func (Color) Rgba
func (c Color) Rgba() Rgba
Rgba converts to the renderer's Rgba (float32 channels in [0,1], Opacity → alpha), so a Color crosses to the draw path without a bespoke conversion at every call site.
type ColorBindingEnum
ColorBindingEnum is how a primitive's colors bind to its geometry: per-vertex, per-strip, per-item (per line/triangle), or one overall color. Frozen ids 19457–19460.
type ColorBindingEnum int32
const (
// PerVertexColors binds one color per vertex (19457).
PerVertexColors ColorBindingEnum = 19457
// PerStripColors binds one color per strip (19458).
PerStripColors ColorBindingEnum = 19458
// PerItemColors binds one color per line/triangle (19459).
PerItemColors ColorBindingEnum = 19459
// OverallColor binds one color to the whole primitive (19460).
OverallColor ColorBindingEnum = 19460
)
func AllColorBindings
func AllColorBindings() []ColorBindingEnum
AllColorBindings returns every defined color binding.
func (ColorBindingEnum) IsValid
func (c ColorBindingEnum) IsValid() bool
IsValid reports whether c is a defined color binding.
func (ColorBindingEnum) String
func (c ColorBindingEnum) String() string
String returns the color-binding's user-facing name.
type ColorSourceTypeEnum
ColorSourceTypeEnum is where an object's color comes from: an explicit per-object override, an automatic (by-object-class) color, the object's layer, or its sheet. The numeric ids are stable, frozen values (79105–79108).
This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.ColorSourceTypeEnum).
type ColorSourceTypeEnum int32
const (
// OverrideColorSource: the color is an explicit per-object override (79105).
OverrideColorSource ColorSourceTypeEnum = 79105
// AutomaticColorSource: the color is the automatic (by-class) color (79106).
AutomaticColorSource ColorSourceTypeEnum = 79106
// LayerColorSource: the color is inherited from the object's layer (79107).
LayerColorSource ColorSourceTypeEnum = 79107
// SheetColorSource: the color is inherited from the object's sheet (79108).
SheetColorSource ColorSourceTypeEnum = 79108
)
func AllColorSources
func AllColorSources() []ColorSourceTypeEnum
AllColorSources returns every defined color source, in picker order.
func (ColorSourceTypeEnum) IsValid
func (c ColorSourceTypeEnum) IsValid() bool
IsValid reports whether c is a defined color source.
func (ColorSourceTypeEnum) String
func (c ColorSourceTypeEnum) String() string
String returns the color-source's user-facing name.
type ConstraintInferenceKind
ConstraintInferenceKind types one geometric constraint the inference engine proposed or auto-applied while sketching (M06-F10).
The values are a frozen block matching the reference API's constraint-inference enum. They are individual bit flags (1 << n) so a set of inference kinds can travel as a mask; never renumber them.
type ConstraintInferenceKind int32
const (
InferCoincident ConstraintInferenceKind = 1
InferHorizontal ConstraintInferenceKind = 2
InferIntersection ConstraintInferenceKind = 4
InferMidpoint ConstraintInferenceKind = 8
InferOnCurve ConstraintInferenceKind = 16
InferParallel ConstraintInferenceKind = 32
InferPerpendicular ConstraintInferenceKind = 64
InferTangent ConstraintInferenceKind = 128
InferVertical ConstraintInferenceKind = 256
)
func ParseConstraintInferenceKind
func ParseConstraintInferenceKind(s string) (ConstraintInferenceKind, bool)
ParseConstraintInferenceKind resolves a wire spelling back to its kind.
func (ConstraintInferenceKind) String
func (k ConstraintInferenceKind) String() string
String returns the inference kind's wire spelling.
type ConstraintInferencePriority
ConstraintInferencePriority is the user preference for which constraint family wins when the inference engine could apply either (M06-F10).
The values are a frozen block matching the reference API's constraint-priority enum; never renumber them.
type ConstraintInferencePriority int32
const (
// PriorityParallelPerpendicular prefers parallel/perpendicular over
// horizontal/vertical when both fit.
PriorityParallelPerpendicular ConstraintInferencePriority = 50433
// PriorityHorizontalVertical prefers horizontal/vertical (the default).
PriorityHorizontalVertical ConstraintInferencePriority = 50434
// PriorityNone applies no family preference.
PriorityNone ConstraintInferencePriority = 50435
)
func ParseConstraintInferencePriority
func ParseConstraintInferencePriority(s string) (ConstraintInferencePriority, bool)
ParseConstraintInferencePriority resolves a wire spelling back to its priority.
func (ConstraintInferencePriority) String
func (p ConstraintInferencePriority) String() string
String returns the priority's wire spelling.
type ConstraintStatus
ConstraintStatus is a sketch's (or entity's) constraint state, derived from the solver's DOF analysis. String values are frozen.
type ConstraintStatus string
const (
ConstraintWell ConstraintStatus = "well" // fully constrained: 0 DOF, no redundancy
ConstraintUnder ConstraintStatus = "under" // free degrees of freedom remain
ConstraintOver ConstraintStatus = "over" // redundant or conflicting constraints
)
type Containment
Containment is the result vocabulary for box/region containment queries.
type Containment int32
const (
UnknownContainment Containment = 30977
InsideContainment Containment = 30978
OnContainment Containment = 30979
OutsideContainment Containment = 30980
)
func ParseContainment
func ParseContainment(s string) (Containment, bool)
ParseContainment resolves a wire spelling back to its containment (M07-F07, Oblikovati/Oblikovati#630 — point-inside queries reply with it).
func (Containment) String
func (c Containment) String() string
String returns the containment's stable name.
type ControlKind
ControlKind is how a command behaves as a ribbon control — the CommandControl-type discriminator. The kind decides interaction (one-shot, on/off, pick-one, numeric, menu), while ButtonStyle decides only its look.
This is the canonical, Apache-2.0 definition; the GPL implementation aliases it (app.ControlKind) so existing call sites are unaffected.
type ControlKind uint8
const (
// ButtonControl runs its command on click — a one-shot action (the zero value).
ButtonControl ControlKind = 0
// ToggleControl is a stateful on/off control; its active state renders pressed.
ToggleControl ControlKind = 1
// ComboControl is one mutually-exclusive choice of its panel's commands; a
// panel of combo controls renders as a single drop-down selection box.
ComboControl ControlKind = 2
// SpinnerControl is a numeric stepper.
SpinnerControl ControlKind = 3
// PopupControl opens a menu of other registered commands (the CommandBarPopUp
// equivalent): the control itself runs nothing; each menu item runs its own
// command (M05-F03, #247).
PopupControl ControlKind = 4
)
func (ControlKind) String
func (k ControlKind) String() string
String returns the kind's stable name.
type Curve2dType
Curve2dType identifies a 2D transient curve's concrete kind.
type Curve2dType int32
const (
UnknownCurve2d Curve2dType = 5249
LineCurve2d Curve2dType = 5250
LineSegmentCurve2d Curve2dType = 5251
CircleCurve2d Curve2dType = 5252
CircularArcCurve2d Curve2dType = 5253
EllipseFullCurve2d Curve2dType = 5254
EllipticalArcCurve2d Curve2dType = 5255
BSplineCurve2dKind Curve2dType = 5256
PolylineCurve2d Curve2dType = 5257
)
func (Curve2dType) String
func (t Curve2dType) String() string
String returns the kind's stable name.
type CurveGeometryForm
CurveGeometryForm is whether a curve is exactly representable as NURBS data.
type CurveGeometryForm int32
const (
CurveFormNURBS CurveGeometryForm = 1
CurveFormNotNURBS CurveGeometryForm = 2
)
type CurveType
CurveType identifies a 3D transient curve's concrete kind.
type CurveType int32
const (
UnknownCurve CurveType = 5121
LineCurve CurveType = 5122
LineSegmentCurve CurveType = 5123
CircleCurve CurveType = 5124
CircularArcCurve CurveType = 5125
EllipseFullCurve CurveType = 5126
EllipticalArcCurve CurveType = 5127
BSplineCurveKind CurveType = 5128
PolylineCurve CurveType = 5129
// HelixCurve is the Oblikovati extension for kernel/geom's Helix3d.
HelixCurve CurveType = 5130
)
func (CurveType) String
func (t CurveType) String() string
String returns the kind's stable name.
type CustomPropertyPrecision
CustomPropertyPrecision is the precision used when formatting a parameter value published as a custom document property (parity: CustomPropertyPrecisionEnum): decimal places, fractional denominators for lengths, or angular sexagesimal forms. The numeric values are frozen at the reference API's ids.
type CustomPropertyPrecision int32
const (
PrecisionZeroDecimalPlace CustomPropertyPrecision = 85505
PrecisionOneDecimalPlace CustomPropertyPrecision = 85506
PrecisionTwoDecimalPlaces CustomPropertyPrecision = 85507
PrecisionThreeDecimalPlaces CustomPropertyPrecision = 85508
PrecisionFourDecimalPlaces CustomPropertyPrecision = 85509
PrecisionFiveDecimalPlaces CustomPropertyPrecision = 85510
PrecisionSixDecimalPlaces CustomPropertyPrecision = 85511
PrecisionSevenDecimalPlaces CustomPropertyPrecision = 85512
PrecisionEightDecimalPlaces CustomPropertyPrecision = 85513
PrecisionZeroFractional CustomPropertyPrecision = 85514
PrecisionHalfFractional CustomPropertyPrecision = 85515
PrecisionQuarterFractional CustomPropertyPrecision = 85516
PrecisionEighthsFractional CustomPropertyPrecision = 85517
PrecisionSixteenthsFractional CustomPropertyPrecision = 85518
PrecisionThirtySecondsFractional CustomPropertyPrecision = 85519
PrecisionSixtyFourthsFractional CustomPropertyPrecision = 85520
PrecisionOneTwentyEighthsFractional CustomPropertyPrecision = 85521
PrecisionDegreesAngle CustomPropertyPrecision = 85522
PrecisionMinutesAngle CustomPropertyPrecision = 85523
PrecisionSecondsAngle CustomPropertyPrecision = 85524
PrecisionSecondsOneDecimalAngle CustomPropertyPrecision = 85525
PrecisionSecondsTwoDecimalAngle CustomPropertyPrecision = 85526
PrecisionSecondsThreeDecimalAngle CustomPropertyPrecision = 85527
PrecisionSecondsFourDecimalAngle CustomPropertyPrecision = 85528
)
func ParseCustomPropertyPrecision
func ParseCustomPropertyPrecision(s string) (CustomPropertyPrecision, bool)
ParseCustomPropertyPrecision resolves a wire spelling back to its CustomPropertyPrecision.
func (CustomPropertyPrecision) String
func (p CustomPropertyPrecision) String() string
String returns the precision's wire spelling.
type CustomPropertyType
CustomPropertyType is whether a parameter exposed as a custom document property is published as text or as a number (parity: CustomPropertyTypeEnum). The numeric values are frozen at the reference API's ids.
type CustomPropertyType int32
const (
CustomPropertyText CustomPropertyType = 85249
CustomPropertyNumber CustomPropertyType = 85250
)
func ParseCustomPropertyType
func ParseCustomPropertyType(s string) (CustomPropertyType, bool)
ParseCustomPropertyType resolves a wire spelling back to its CustomPropertyType.
func (CustomPropertyType) String
func (t CustomPropertyType) String() string
String returns the property type's wire spelling.
type DSDOFImposedMotionType
DSDOFImposedMotionType discriminates how a single DS degree of freedom is driven: free to move, driven to an imposed value (a motor / drive, M12-F03), or locked at its value.
type DSDOFImposedMotionType uint32
const (
// DSDOFFree: the DOF moves freely (no imposed motion).
DSDOFFree DSDOFImposedMotionType = 0
// DSDOFDriven: the DOF is driven to an imposed value (a motor).
DSDOFDriven DSDOFImposedMotionType = 1
// DSDOFLocked: the DOF is held fixed at its current value.
DSDOFLocked DSDOFImposedMotionType = 2
)
func (DSDOFImposedMotionType) String
func (t DSDOFImposedMotionType) String() string
String returns a stable lowercase name.
type DSJointType
DSJointType discriminates the DS-joint kinds — the degrees-of-freedom view of a joint, named in the mechanism vocabulary (prismatic = slider, spherical = ball).
type DSJointType uint32
const (
// DSJointUnknown is the zero value.
DSJointUnknown DSJointType = 0
// DSJointRigid fixes the two bodies (0 DOF).
DSJointRigid DSJointType = 1
// DSJointRotational allows one rotation (1 DOF).
DSJointRotational DSJointType = 2
// DSJointPrismatic allows one translation (1 DOF) — the slider.
DSJointPrismatic DSJointType = 3
// DSJointCylindrical allows one translation and one rotation (2 DOF).
DSJointCylindrical DSJointType = 4
// DSJointPlanar allows two translations and one rotation (3 DOF).
DSJointPlanar DSJointType = 5
// DSJointSpherical allows three rotations (3 DOF) — the ball.
DSJointSpherical DSJointType = 6
)
func (DSJointType) String
func (t DSJointType) String() string
String returns a stable lowercase name.
type DXFVersion
DXFVersion selects the generation an exported DXF targets. The geometry is identical across versions; the version sets $ACADVER and the surrounding section scaffolding. The zero value "" is treated as R2000.
Example:
req := wire.ExportDXFArgs{Path: "part.dxf", Version: string(types.DXFR2018)}
type DXFVersion string
const (
// DXFR2000 is the AutoCAD 2000 (AC1015) generation — broadest compatibility.
DXFR2000 DXFVersion = "r2000"
// DXFR2018 is the AutoCAD 2018 (AC1032) generation.
DXFR2018 DXFVersion = "r2018"
)
func (DXFVersion) Normalized
func (v DXFVersion) Normalized() DXFVersion
Normalized maps the zero value to R2000, leaving any explicit value unchanged.
type DeriveStyle
DeriveStyle controls how one source occurrence contributes to a derived assembly's base body — the reference API's per-occurrence derive style. The zero value is DeriveInclude, so an unstyled occurrence is merged in.
type DeriveStyle int32
const (
// DeriveInclude merges the occurrence's bodies into the derived base.
DeriveInclude DeriveStyle = iota
// DeriveExclude omits the occurrence entirely.
DeriveExclude
// DeriveSubtract cuts the occurrence's bodies from the merged base.
DeriveSubtract
)
func ParseDeriveStyle
func ParseDeriveStyle(s string) (DeriveStyle, bool)
ParseDeriveStyle resolves a wire spelling back to its DeriveStyle.
func (DeriveStyle) String
func (s DeriveStyle) String() string
String returns the derive style's wire spelling.
type Dimension3DConstraintKind
Dimension3DConstraintKind discriminates a 3D dimensional (driving/driven) constraint — the value of oblikovati.org/api/wire.AddSketch3DDimensionArgs.Kind and of each enumerated 3D dimension's Kind. String values are frozen. Members are wired in across M22-F06.
type Dimension3DConstraintKind string
const (
Dim3DDistance Dimension3DConstraintKind = "distance"
Dim3DLineLength Dimension3DConstraintKind = "lineLength"
Dim3DRadius Dimension3DConstraintKind = "radius"
Dim3DPointPlaneDistance Dimension3DConstraintKind = "pointPlaneDistance"
Dim3DTwoLineAngle Dimension3DConstraintKind = "twoLineAngle"
Dim3DSplineLength Dimension3DConstraintKind = "splineLength"
Dim3DUnknown Dimension3DConstraintKind = "unknown"
)