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"
)
type DimensionConstraintKind
DimensionConstraintKind discriminates a sketch dimensional (driving/driven) constraint. Used by oblikovati.org/api/wire.AddDimensionArgs.Kind and by the enumerated dimension's Kind. String values are frozen.
type DimensionConstraintKind string
const (
DimConstraintDistance DimensionConstraintKind = "distance"
DimConstraintAngle DimensionConstraintKind = "angle"
DimConstraintRadius DimensionConstraintKind = "radius"
DimConstraintDiameter DimensionConstraintKind = "diameter"
DimConstraintArcLength DimensionConstraintKind = "arcLength"
DimConstraintOffset DimensionConstraintKind = "offsetDim"
DimConstraintThreePointAngle DimensionConstraintKind = "threePointAngle"
DimConstraintEllipseRadius DimensionConstraintKind = "ellipseRadius"
// DimConstraintTangentDistance dimensions the distance from a line to a circle/arc
// measured to its tangent point — the near side by default, the far side with
// AddDimensionArgs.FarSide (Oblikovati/Oblikovati#152).
DimConstraintTangentDistance DimensionConstraintKind = "tangentDistance"
DimConstraintUnknown DimensionConstraintKind = "unknown"
)
type DimensionDisplayType
DimensionDisplayType controls how dimensions tied to parameters render in sketches: the evaluated value, the parameter name, the authored expression, the value with its tolerance, or the precise (unrounded) value (parity: DimensionDisplayTypeEnum, M02-F07, Oblikovati/Oblikovati#606). The numeric values are frozen at the reference API's ids and must never be renumbered.
type DimensionDisplayType int32
const (
DimensionDisplayValue DimensionDisplayType = 34817
DimensionDisplayName DimensionDisplayType = 34818
DimensionDisplayExpression DimensionDisplayType = 34819
DimensionDisplayTolerance DimensionDisplayType = 34820
DimensionDisplayPreciseValue DimensionDisplayType = 34821
)
func ParseDimensionDisplayType
func ParseDimensionDisplayType(s string) (DimensionDisplayType, bool)
ParseDimensionDisplayType resolves a wire spelling back to its DimensionDisplayType.
func (DimensionDisplayType) String
func (d DimensionDisplayType) String() string
String returns the display type's wire spelling.
type DimensionUnit
DimensionUnit names the unit a dimension is measured and displayed in. The zero value is DimensionMillimeter (the ISO default).
type DimensionUnit int32
const (
// DimensionMillimeter measures dimensions in millimetres (ISO).
DimensionMillimeter DimensionUnit = iota
// DimensionInch measures dimensions in inches (ANSI).
DimensionInch
)
func ParseDimensionUnit
func ParseDimensionUnit(s string) (DimensionUnit, bool)
ParseDimensionUnit resolves a wire spelling back to its dimension unit.
func (DimensionUnit) String
func (u DimensionUnit) String() string
String returns the unit's wire spelling ("mm" / "in").
type DirectEditOperationType
DirectEditOperationType discriminates the consolidated direct-edit feature's operation (#332).
type DirectEditOperationType int32
const (
DirectEditMoveOperation DirectEditOperationType = 105729
DirectEditSizeOperation DirectEditOperationType = 105730
DirectEditRotateOperation DirectEditOperationType = 105731
DirectEditDeleteOperation DirectEditOperationType = 105732
// DirectEditUnknownOperation is the reference's placeholder for an
// operation the API version doesn't know; it is never a valid input.
DirectEditUnknownOperation DirectEditOperationType = 105733
DirectEditScaleOperation DirectEditOperationType = 105734
)
func ParseDirectEditOperationType
func ParseDirectEditOperationType(s string) (DirectEditOperationType, bool)
ParseDirectEditOperationType resolves a wire spelling back to its operation.
func (DirectEditOperationType) String
func (t DirectEditOperationType) String() string
String returns the operation's wire spelling.
type DisplayModeEnum
DisplayModeEnum is the viewport's display mode — the way a view of a document is drawn. The numeric ids are stable, frozen values (8706–8716); two names share 8707 (the aliases HiddenEdgeRendering and ShadedWithHiddenEdgesRendering). This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.DisplayModeEnum) and maps it onto the renderer's visual style.
type DisplayModeEnum int32
const (
// WireframeRendering — every edge, no shaded faces, no hidden-line removal (8706).
WireframeRendering DisplayModeEnum = 8706
// HiddenEdgeRendering / ShadedWithHiddenEdgesRendering — shaded faces with visible edges
// solid and occluded edges dashed (8707; the two names are aliases).
HiddenEdgeRendering DisplayModeEnum = 8707
ShadedWithHiddenEdgesRendering DisplayModeEnum = 8707
// ShadedRendering — lit faces, no edges (8708).
ShadedRendering DisplayModeEnum = 8708
// RealisticRendering — physically based (PBR) shading (8709).
RealisticRendering DisplayModeEnum = 8709
// ShadedWithEdgesRendering — lit faces with the edge wireframe (8710).
ShadedWithEdgesRendering DisplayModeEnum = 8710
// WireframeNoHiddenEdges — wireframe with the occluded edges removed (8711).
WireframeNoHiddenEdges DisplayModeEnum = 8711
// WireframeWithHiddenEdgesRendering — wireframe with occluded edges drawn dashed (8712).
WireframeWithHiddenEdgesRendering DisplayModeEnum = 8712
// MonochromeRendering — desaturated, posterized NPR (8713).
MonochromeRendering DisplayModeEnum = 8713
// WatercolorRendering — soft pigment washes on paper, NPR (8714).
WatercolorRendering DisplayModeEnum = 8714
// IllustrationRendering — flat/cel shading with outlines, NPR (8715).
IllustrationRendering DisplayModeEnum = 8715
// TechnicalIllustrationRendering — Gooch cool-warm shading with emphasized edges (8716).
TechnicalIllustrationRendering DisplayModeEnum = 8716
)
func AllDisplayModes
func AllDisplayModes() []DisplayModeEnum
AllDisplayModes returns every display mode in gallery order — the source list for a display-mode picker. The 8707 alias appears once (as the canonical 8707 entry).
func (DisplayModeEnum) IsValid
func (m DisplayModeEnum) IsValid() bool
IsValid reports whether m is a defined display mode.
func (DisplayModeEnum) String
func (m DisplayModeEnum) String() string
String returns the mode's stable, user-facing name (the Visual Style gallery label).
type DisplayModeSourceTypeEnum
DisplayModeSourceTypeEnum is whether a view's display mode comes from the application default or an explicit per-view override (the default-vs-override chain a new window resolves). Frozen ids 54273–54274.
type DisplayModeSourceTypeEnum int32
const (
// DefaultDisplayModeSource takes the display mode from the application default (54273).
DefaultDisplayModeSource DisplayModeSourceTypeEnum = 54273
// OverrideDisplayModeSource takes the display mode from a per-view override (54274).
OverrideDisplayModeSource DisplayModeSourceTypeEnum = 54274
)
func AllDisplayModeSources
func AllDisplayModeSources() []DisplayModeSourceTypeEnum
AllDisplayModeSources returns every defined display-mode source.
func (DisplayModeSourceTypeEnum) IsValid
func (d DisplayModeSourceTypeEnum) IsValid() bool
IsValid reports whether d is a defined display-mode source.
func (DisplayModeSourceTypeEnum) String
func (d DisplayModeSourceTypeEnum) String() string
String returns the display-mode-source's user-facing name.
type DisplayQualityEnum
DisplayQualityEnum is the surface-display quality the viewport renders at: it binds to the tessellation tolerance, trading smoothness for triangle count. The numeric ids are stable, frozen values (58881–58884).
This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.DisplayQualityEnum).
type DisplayQualityEnum int32
const (
// SmoothDisplayQuality is the smoothest (finest tessellation) quality (58881).
SmoothDisplayQuality DisplayQualityEnum = 58881
// MediumDisplayQuality is the medium quality (58882).
MediumDisplayQuality DisplayQualityEnum = 58882
// RoughDisplayQuality is the roughest (coarsest tessellation) quality (58883).
RoughDisplayQuality DisplayQualityEnum = 58883
// SmootherDisplayQuality is finer than Smooth, the highest quality (58884).
SmootherDisplayQuality DisplayQualityEnum = 58884
)
func AllDisplayQualities
func AllDisplayQualities() []DisplayQualityEnum
AllDisplayQualities returns every defined display quality, in picker order.
func (DisplayQualityEnum) IsValid
func (d DisplayQualityEnum) IsValid() bool
IsValid reports whether d is a defined display quality.
func (DisplayQualityEnum) String
func (d DisplayQualityEnum) String() string
String returns the display-quality's user-facing name.
type DisplaySeparateColorsTypeEnum
DisplaySeparateColorsTypeEnum is the granularity at which the "display separate colors" option assigns a distinct color: none, per unique top-level component, per top-level component, per unique part, or per part. Frozen ids 127489–127493.
type DisplaySeparateColorsTypeEnum int32
const (
// NoneDisplaySeparateColors assigns no separate colors (127489).
NoneDisplaySeparateColors DisplaySeparateColorsTypeEnum = 127489
// EachUniqueTopLevelComponentColors colors each unique top-level component (127490).
EachUniqueTopLevelComponentColors DisplaySeparateColorsTypeEnum = 127490
// EachTopLevelComponentColors colors each top-level component instance (127491).
EachTopLevelComponentColors DisplaySeparateColorsTypeEnum = 127491
// EachUniquePartColors colors each unique part (127492).
EachUniquePartColors DisplaySeparateColorsTypeEnum = 127492
// EachPartColors colors each part instance (127493).
EachPartColors DisplaySeparateColorsTypeEnum = 127493
)
func AllDisplaySeparateColors
func AllDisplaySeparateColors() []DisplaySeparateColorsTypeEnum
AllDisplaySeparateColors returns every defined display-separate-colors mode.
func (DisplaySeparateColorsTypeEnum) IsValid
func (d DisplaySeparateColorsTypeEnum) IsValid() bool
IsValid reports whether d is a defined display-separate-colors mode.
func (DisplaySeparateColorsTypeEnum) String
func (d DisplaySeparateColorsTypeEnum) String() string
String returns the display-separate-colors mode's user-facing name.
type DisplayTransformBehaviorEnum
DisplayTransformBehaviorEnum is how a view-relative graphic (an image billboard, a screen label) reacts to the camera: it may always face the viewer (front-facing), keep a constant pixel size regardless of zoom (pixel-scaling), both, or neither. The numeric ids are stable, frozen values (26113–26116).
Used by the display-options surface and by client-graphics image/text primitives. This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.DisplayTransformBehaviorEnum).
type DisplayTransformBehaviorEnum int32
const (
// FrontFacingBehavior keeps the graphic facing the viewer (billboarding) (26113).
FrontFacingBehavior DisplayTransformBehaviorEnum = 26113
// PixelScalingBehavior keeps a constant pixel size regardless of zoom (26114).
PixelScalingBehavior DisplayTransformBehaviorEnum = 26114
// FrontFacingAndPixelScalingBehavior applies both front-facing and pixel-scaling (26115).
FrontFacingAndPixelScalingBehavior DisplayTransformBehaviorEnum = 26115
// NoTransformBehaviors applies neither — the graphic transforms with the model (26116).
NoTransformBehaviors DisplayTransformBehaviorEnum = 26116
)
func AllDisplayTransformBehaviors
func AllDisplayTransformBehaviors() []DisplayTransformBehaviorEnum
AllDisplayTransformBehaviors returns every defined transform behavior.
func (DisplayTransformBehaviorEnum) IsValid
func (d DisplayTransformBehaviorEnum) IsValid() bool
IsValid reports whether d is a defined transform behavior.
func (DisplayTransformBehaviorEnum) String
func (d DisplayTransformBehaviorEnum) String() string
String returns the transform-behavior's user-facing name.
type DockingState
DockingState is where a dockable window sits — the DockingStateEnum equivalent, narrowed to the positions the host's dockspace honors (M05-F03, #247). It is the window's INITIAL placement; the user may re-dock it afterwards and the host's layout persistence keeps their arrangement.
type DockingState uint8
const (
// DockFloating is a free-floating window (the zero value).
DockFloating DockingState = 0
// DockLeft docks into the left band (beside the model browser).
DockLeft DockingState = 1
// DockRight docks into the right band.
DockRight DockingState = 2
// DockBottom docks into the bottom band (above the status bar).
DockBottom DockingState = 3
)
func (DockingState) String
func (d DockingState) String() string
String returns the state's stable name.
type DocumentInterestRecord
DocumentInterestRecord is one entry of a document's add-in data registry: client X has data in / depends on this document. Unlike attribute sets (arbitrary payload on arbitrary objects), an interest is a lightweight discovery contract readable without activating the owning add-in.
type DocumentInterestRecord struct {
// ClientID uniquely identifies the owning client (an add-in id).
ClientID string `json:"clientId"`
// Name names this interest, typically the data's sub-type; (ClientID,
// Name) is the record's identity.
Name string `json:"name"`
// InterestType is the interest's strength.
InterestType DocumentInterestType `json:"interestType"`
// DataVersion is the client-managed migration version; 0 declares a
// non-migrating interest.
DataVersion int `json:"dataVersion,omitempty"`
// ClientData is an uninterpreted client payload — use with extreme
// economy (attribute sets are the payload layer).
ClientData string `json:"clientData,omitempty"`
}
type DocumentInterestType
DocumentInterestType is the strength of a client's registered interest in a document (M03-F10, Oblikovati/Oblikovati#611).
The values are a frozen block matching the reference API's document-interest enum; never renumber them.
type DocumentInterestType int32
const (
// InterestNone marks an interest record as withdrawn while keeping it
// addressable (the reference API's "not interested").
InterestNone DocumentInterestType = 68865
// Interested declares the client has data in / depends on the document.
Interested DocumentInterestType = 68866
)
func ParseDocumentInterestType
func ParseDocumentInterestType(s string) (DocumentInterestType, bool)
ParseDocumentInterestType resolves a wire spelling back to its type.
func (DocumentInterestType) String
func (t DocumentInterestType) String() string
String returns the interest type's wire spelling.
type DocumentSubTypeID
DocumentSubTypeID refines a document's base DocumentType with a flavored sub-type: a sheet-metal part is a part document carrying the sheet-metal sub-type id (M03-F11, Oblikovati/Oblikovati#612). The empty id is a plain document. Add-ins register their own ids over documents.registerSubType (M05-F15); ids under ReservedSubTypePrefix are built-in and cannot be registered by clients.
type DocumentSubTypeID string
const (
// SubTypePlain is the absent sub-type: an unflavored document.
SubTypePlain DocumentSubTypeID = ""
// SubTypeSheetMetalPart flavors a part document as sheet metal — reserved
// now so .obk files persist the discriminator from the first release; the
// sheet-metal environment itself lands with M20.
SubTypeSheetMetalPart DocumentSubTypeID = "org.oblikovati.part.sheetMetal"
)
func (DocumentSubTypeID) BuiltIn
func (id DocumentSubTypeID) BuiltIn() bool
BuiltIn reports whether the id is reserved by the host (or plain).
type DocumentType
DocumentType discriminates the four document kinds plus an unknown sentinel.
Values are STABLE ACROSS SESSIONS and must never be renumbered: they are persisted in package manifests and the document reference graph (architecture core/05). This is the canonical, Apache-2.0 definition; the GPL implementation aliases it (model/doc.DocumentType) so existing call sites are unaffected.
type DocumentType uint32
const (
// DocumentUnknown is the zero value: a document whose kind has not been
// resolved (e.g. an unresolved reference stub before its manifest is read).
DocumentUnknown DocumentType = 0
// DocumentPart holds a single modeled part.
DocumentPart DocumentType = 1
// DocumentAssembly holds component occurrences and constraints.
DocumentAssembly DocumentType = 2
// DocumentDrawing holds annotated sheets/views of other documents.
DocumentDrawing DocumentType = 3
// DocumentPresentation holds exploded/animated views of an assembly.
DocumentPresentation DocumentType = 4
)
func DocumentTypeFromExtension
func DocumentTypeFromExtension(ext string) DocumentType
DocumentTypeFromExtension maps a file extension (leading dot, any case) to its document kind, returning DocumentUnknown for the project extension or anything unrecognized. It is the inverse of DocumentType.Extension.
types.DocumentTypeFromExtension(".OAD") // DocumentAssembly
func (DocumentType) Extension
func (t DocumentType) Extension() string
Extension returns the on-disk file extension (leading dot) for the document kind, or "" for DocumentUnknown.
types.DocumentPart.Extension() // ".opd"
func (DocumentType) IsValid
func (t DocumentType) IsValid() bool
IsValid reports whether t is one of the four real document kinds (not unknown).
func (DocumentType) String
func (t DocumentType) String() string
String returns a stable lowercase name for the kind, used in diagnostics and the package manifest. The values, not these names, are the persisted identity.
type DraftingStandard
DraftingStandard names the drawing's drafting convention. The zero value is DraftingISO (metric, the default for a new drawing).
type DraftingStandard int32
const (
// DraftingISO is the ISO (metric) drafting standard — millimetres, the default.
DraftingISO DraftingStandard = iota
// DraftingANSI is the ANSI/ASME (imperial) drafting standard — inches.
DraftingANSI
)
func ParseDraftingStandard
func ParseDraftingStandard(s string) (DraftingStandard, bool)
ParseDraftingStandard resolves a wire spelling back to its drafting standard.
s, ok := types.ParseDraftingStandard("ansi") // DraftingANSI, true
func (DraftingStandard) String
func (d DraftingStandard) String() string
String returns the standard's wire spelling ("iso" / "ansi").
type DrawingAnnotationKind
DrawingAnnotationKind classifies a drawing annotation. The zero value is CoGMarkerAnnotation.
type DrawingAnnotationKind int32
const (
// CoGMarkerAnnotation is a centre-of-gravity indicator on a view, driven by the model's mass.
CoGMarkerAnnotation DrawingAnnotationKind = iota
// RevisionCloudAnnotation is a scalloped cloud highlighting a changed sheet region.
RevisionCloudAnnotation
// CenterMarkAnnotation is a crosshair at a circular edge's centre, associative to that edge.
CenterMarkAnnotation
// CenterlineAnnotation is the horizontal+vertical dash-dot symmetry axes through a view's
// centre, spanning its extent; associative to the view (re-derives from its bounds).
CenterlineAnnotation
// FeatureControlFrameAnnotation is a GD&T feature control frame: a boxed geometric-tolerance
// callout (characteristic symbol · tolerance · datum references) placed on the sheet.
FeatureControlFrameAnnotation
// DatumFeatureAnnotation is a GD&T datum feature symbol: a letter in a box with a filled
// datum triangle, marking the datum a feature control frame references.
DatumFeatureAnnotation
// SurfaceTextureAnnotation is an ISO 1302 surface texture symbol: the checkmark glyph with a
// roughness value, stating a surface's finish requirement.
SurfaceTextureAnnotation
// PartsListAnnotation is a parts list table sourced from the referenced assembly's BOM (item
// number, part number, description, quantity), updating with the assembly.
PartsListAnnotation
// BalloonAnnotation is a balloon: a circle holding a parts-list item number, with an optional
// leader to the component it tags.
BalloonAnnotation
// HoleTableAnnotation is a hole table: a row per circular edge in a base view, with its X/Y
// position from a datum origin and its diameter, updating with the model.
HoleTableAnnotation
// RevisionTableAnnotation is a revision table: a row per revision (revision, date, description),
// recording the drawing's change history.
RevisionTableAnnotation
// RevisionTagAnnotation is a revision tag: a triangle holding a revision letter, placed on the
// sheet to flag where that revision changed the drawing.
RevisionTagAnnotation
// DrawingNoteAnnotation is a free text note on the sheet, with an optional leader line to the
// point it annotates.
DrawingNoteAnnotation
// CustomTableAnnotation is a general-purpose table: arbitrary column headers and rows in a grid.
CustomTableAnnotation
// HoleNoteAnnotation is a feature note on a base view's holes: a leadered diameter callout per
// hole, computed from the hole's circular edge and re-resolved when the model changes.
HoleNoteAnnotation
)
func ParseDrawingAnnotationKind
func ParseDrawingAnnotationKind(s string) (DrawingAnnotationKind, bool)
ParseDrawingAnnotationKind resolves a wire spelling back to its annotation kind.
func (DrawingAnnotationKind) String
func (k DrawingAnnotationKind) String() string
String returns the annotation kind's wire spelling.
type DrawingCurveKind
DrawingCurveKind classifies a drawing curve so the head can style it: an edge of the model (visible/hidden), a section-cut outline, a hatch line, or a break-line glyph. The zero value is DrawingEdgeCurve, so the existing visible/hidden edge curves keep their meaning.
type DrawingCurveKind int32
const (
// DrawingEdgeCurve is a projected model edge (the visible/hidden flag styles it solid/dashed).
DrawingEdgeCurve DrawingCurveKind = iota
// DrawingSectionCurve is a section-cut outline (drawn bold).
DrawingSectionCurve
// DrawingHatchCurve is one hatch line filling a section face.
DrawingHatchCurve
// DrawingBreakCurve is a break-line glyph segment.
DrawingBreakCurve
)
func ParseDrawingCurveKind
func ParseDrawingCurveKind(s string) (DrawingCurveKind, bool)
ParseDrawingCurveKind resolves a wire spelling back to its curve kind.
func (DrawingCurveKind) String
func (k DrawingCurveKind) String() string
String returns the curve kind's wire spelling.
type DrawingDimensionType
DrawingDimensionType names how a linear dimension is measured between its two attachment points. The zero value is AlignedDimension (the true point-to-point distance).
type DrawingDimensionType int32
const (
// AlignedDimension measures the straight distance between the two points.
AlignedDimension DrawingDimensionType = iota
// HorizontalDimension measures the horizontal (view-X) component of the distance.
HorizontalDimension
// VerticalDimension measures the vertical (view-Y) component of the distance.
VerticalDimension
// RadiusDimension measures the radius of a circular edge (annotated "R<value>").
RadiusDimension
// DiameterDimension measures the diameter of a circular edge (annotated "⌀<value>").
DiameterDimension
// AngularDimension measures the angle between two straight edges, in degrees.
AngularDimension
// OrdinateDimension measures a point's view-X or view-Y offset from a common datum, shown as a
// leader to the value with no dimension line (the running-coordinate callout). Which axis it
// measures is chosen when the dimension is created (the "axis" request field).
OrdinateDimension
// ArcLengthDimension measures the length along a circular edge — the arc's swept length, or a
// full circle's circumference — with the dimension line following the arc.
ArcLengthDimension
)
func ParseDrawingDimensionType
func ParseDrawingDimensionType(s string) (DrawingDimensionType, bool)
ParseDrawingDimensionType resolves a wire spelling back to its dimension type.
t, ok := types.ParseDrawingDimensionType("horizontal") // HorizontalDimension, true
func (DrawingDimensionType) String
func (t DrawingDimensionType) String() string
String returns the dimension type's wire spelling ("aligned", "horizontal", "vertical").
type DrawingSketchEntityKind
DrawingSketchEntityKind classifies a drawing-sketch entity. The zero value is SketchLineEntity.
type DrawingSketchEntityKind int32
const (
// SketchLineEntity is a straight segment between two sheet points.
SketchLineEntity DrawingSketchEntityKind = iota
// SketchCircleEntity is a full circle from a centre point and a radius.
SketchCircleEntity
// SketchRectangleEntity is an axis-aligned rectangle from two opposite corner points.
SketchRectangleEntity
)
func ParseDrawingSketchEntityKind
func ParseDrawingSketchEntityKind(s string) (DrawingSketchEntityKind, bool)
ParseDrawingSketchEntityKind resolves a wire spelling back to its entity kind.
k, ok := types.ParseDrawingSketchEntityKind("circle") // SketchCircleEntity, true
func (DrawingSketchEntityKind) String
func (k DrawingSketchEntityKind) String() string
String returns the entity kind's wire spelling ("line", "circle", "rectangle").
type DrawingViewStyle
DrawingViewStyle fixes how a view's edges are rendered. The zero value is HiddenLineViewStyle (visible solid + hidden dashed).
type DrawingViewStyle int32
const (
// HiddenLineViewStyle shows visible edges solid and hidden edges dashed (the default).
HiddenLineViewStyle DrawingViewStyle = iota
// WireframeViewStyle shows every edge as visible (no hidden-line removal).
WireframeViewStyle
// ShadedViewStyle shades the view (reserved; renders as hidden-line until shading lands).
ShadedViewStyle
)
func ParseDrawingViewStyle
func ParseDrawingViewStyle(s string) (DrawingViewStyle, bool)
ParseDrawingViewStyle resolves a wire spelling back to its style.
func (DrawingViewStyle) String
func (s DrawingViewStyle) String() string
String returns the style's wire spelling.
type DrawingViewType
DrawingViewType discriminates the kind of a drawing view. The reference contracts model auxiliary/overlay/slice as a base DrawingView carrying this discriminator (not distinct interfaces); only section and detail are also distinct contracts. The zero value is DrawingViewBase.
type DrawingViewType int32
const (
// DrawingViewBase projects a standard orientation of the model.
DrawingViewBase DrawingViewType = iota
// DrawingViewProjected is an orthographic view derived from a base view by a direction.
DrawingViewProjected
// DrawingViewAuxiliary is projected perpendicular to a fold line drawn on a parent view —
// it shows an inclined face true-size.
DrawingViewAuxiliary
// DrawingViewSection shows the model cut by a plane (with cut-face hatching).
DrawingViewSection
// DrawingViewDetail magnifies a circular region of a parent view at a larger scale.
DrawingViewDetail
// DrawingViewBreak removes a band of a view to compress a long part (with break lines).
DrawingViewBreak
// DrawingViewSlice shows only the zero-thickness slice at a section line (no projection behind).
DrawingViewSlice
// DrawingViewBreakout reveals the interior within a bounded region of a parent view (a local
// cut-away).
DrawingViewBreakout
// DrawingViewDraft is a model-less view: a framed container for manually-drawn 2D geometry.
DrawingViewDraft
)
func ParseDrawingViewType
func ParseDrawingViewType(s string) (DrawingViewType, bool)
ParseDrawingViewType resolves a wire spelling back to its view type.
func (DrawingViewType) String
func (t DrawingViewType) String() string
String returns the view type's wire spelling ("base", "auxiliary").
type DriveVariable
DriveVariable selects which of a relationship's driven variables a drive sweeps. A rotational joint has one angular variable; a slider one linear; a cylindrical joint both, so the caller must pick. The zero value asks for the relationship's natural variable.
type DriveVariable uint32
const (
// DriveNatural sweeps the relationship's single natural driven variable (the rotation of
// a rotational joint, the translation of a slider). Ambiguous for multi-DOF kinds.
DriveNatural DriveVariable = 0
// DriveAngular sweeps a rotation about the joint axis (radians).
DriveAngular DriveVariable = 1
// DriveLinear sweeps a translation along the joint axis (centimetres).
DriveLinear DriveVariable = 2
)
func (DriveVariable) IsValid
func (v DriveVariable) IsValid() bool
IsValid reports whether v names a real selector value.
func (DriveVariable) String
func (v DriveVariable) String() string
String returns a stable lowercase name. The value, not this name, is the persisted identity.
type EdgeCollectionKind
EdgeCollectionKind identifies a body's classified edge collection (SurfaceBody.ConvexEdges / ConcaveEdges and tangentially connected sets).
type EdgeCollectionKind int32
const (
TangentiallyConnectedEdges EdgeCollectionKind = 27649
AllConcaveEdges EdgeCollectionKind = 27650
AllConvexEdges EdgeCollectionKind = 27651
UndefinedEdgeCollection EdgeCollectionKind = 27652
)
func ParseEdgeCollectionKind
func ParseEdgeCollectionKind(s string) (EdgeCollectionKind, bool)
ParseEdgeCollectionKind resolves a wire spelling back to its collection.
func (EdgeCollectionKind) String
func (k EdgeCollectionKind) String() string
String returns the collection's wire spelling.
type Electrical
Electrical groups a material's electrical properties. Common mechanical-CAD material models stop at mechanical/thermal; electrical is added here because the user models it explicitly.
type Electrical struct {
Resistivity float64 `json:"resistivity" yaml:"resistivity"` // Ω·m
RelativePermittivity float64 `json:"relativePermittivity" yaml:"relativePermittivity"` // dimensionless (εr)
}
type Environment
Environment is a ribbon context within a document. The base environment is always shown; a contextual environment (e.g. sketch editing) contributes its tabs only while it is active — the mechanism behind a contextual tab such as the Sketch tab. An add-in scopes a control to an environment so it appears only in that context.
This is the canonical, Apache-2.0 definition; the GPL implementation aliases it (app.Environment) so existing call sites are unaffected.
type Environment uint8
const (
// BaseEnvironment is the document's normal environment; its controls always show.
BaseEnvironment Environment = 0
// SketchEnvironment is active while a 2D sketch is open for editing; its controls form the
// contextual Sketch tab and show only then.
SketchEnvironment Environment = 1
// Sketch3DEnvironment is active while a 3D sketch is open for editing; its controls form the
// contextual 3D Sketch tab and show only then. Distinct from SketchEnvironment so the 2D and
// 3D sketch tabs never appear together.
Sketch3DEnvironment Environment = 2
)
func (Environment) String
func (e Environment) String() string
String returns the environment's stable name.
type ExchangeFormat
ExchangeFormat names a foreign file format the host can import from or export to. It is a pure value enum (a stable wire string); the parser/encoder lives in the GPL host, never here. STEP is reserved (its translator ships separately, M17-F02).
Example:
req := wire.ExportRequest{Path: "part.stl", Format: string(types.FormatSTL)}
type ExchangeFormat string
const (
// FormatSTL is the STL triangle-soup format (binary on export; binary or ASCII on import).
FormatSTL ExchangeFormat = "stl"
// FormatOBJ is the Wavefront OBJ format (v/f records).
FormatOBJ ExchangeFormat = "obj"
// Format3MF is the 3D Manufacturing Format (a ZIP container around a 3D-model XML part).
Format3MF ExchangeFormat = "3mf"
// FormatPLY is the Stanford PLY format (ASCII or binary), the common export of 3D scanners
// (structured-light / photogrammetry). It carries a vertex list (and, for a mesh, faces); the
// host imports it as a POINT CLOUD — as-built reference scan data — not as a solid/mesh body,
// so it is a point-cloud format (IsPointCloud), not a mesh format (#645).
FormatPLY ExchangeFormat = "ply"
// FormatE57 is the ASTM E2807 (E57) format, the vendor-neutral, structured export of most
// laser/structured-light scanners (its points live in a bit-packed CompressedVector inside a
// checksummed-page container). Like PLY the host imports it as a POINT CLOUD — as-built scan
// data — so it is a point-cloud format (IsPointCloud), not a mesh format (#645).
FormatE57 ExchangeFormat = "e57"
// FormatLAS is the ASPRS LAS format, the standard interchange for LiDAR point data (airborne
// and terrestrial surveys); each fixed-length record carries a scaled-integer XYZ. The host
// imports it as a POINT CLOUD — scan data — so it is a point-cloud format (IsPointCloud), not a
// mesh format. The compressed LAZ variant is not handled (#645).
FormatLAS ExchangeFormat = "las"
// FormatSTEP reserves the ISO 10303 B-rep format (translator ships separately, M17-F02).
FormatSTEP ExchangeFormat = "step"
// FormatDWG is the AutoCAD DWG drawing format. Unlike the mesh/B-rep formats it
// carries 2D/3D curve geometry, so it imports into a sketch (2D Sketch on a chosen
// plane, or Sketch3D) rather than into surface bodies.
FormatDWG ExchangeFormat = "dwg"
// FormatDXF is the ASCII DXF drawing-exchange format — DWG's open, text sibling. Like
// DWG it carries curve geometry and imports into a sketch; on export the version is
// selectable (see DXFVersion).
FormatDXF ExchangeFormat = "dxf"
// FormatPDF is a vector PDF whose page content was generated from a CAD drawing
// (e.g. an AutoCAD plot-to-PDF). Like DWG/DXF it carries 2D curve geometry — page
// paths (lines and cubic Béziers) — so it imports into a sketch (one 2D Sketch per
// page on the chosen plane) rather than into surface bodies. Text and raster images
// in the page are skipped; only vector paths become sketch curves.
FormatPDF ExchangeFormat = "pdf"
)
func (ExchangeFormat) IsMesh
func (f ExchangeFormat) IsMesh() bool
IsMesh reports whether the format is a faceted-mesh format (STL/OBJ/3MF) — the set the mesh-exchange translator handles. STEP is a B-rep format (a different translator).
func (ExchangeFormat) IsPointCloud
func (f ExchangeFormat) IsPointCloud() bool
IsPointCloud reports whether the format imports as point-cloud scan data (a referenced display object the design is modeled against) rather than as a body or sketch — the 3D-scanner / LiDAR formats (PLY, E57, LAS). Such an import attaches a point cloud, not a solid (#645).
func (ExchangeFormat) IsSketch
func (f ExchangeFormat) IsSketch() bool
IsSketch reports whether the format imports as sketch curve geometry (DWG/DXF/PDF) rather than as surface bodies (mesh/STEP). Such an import targets a sketch and, when 2D, a chosen work plane.
type FeatureApproximationType
FeatureApproximationType is the approximation a thicken / face-offset feature may accept when the exact offset is not computable (#331 parity). An exact result satisfies every bound below, so a kernel computing the exact offset honours any requested approximation.
type FeatureApproximationType int32
const (
NoApproximation FeatureApproximationType = 60673
MeanApproximation FeatureApproximationType = 60674
NeverTooThickApproximation FeatureApproximationType = 60675
NeverTooThinApproximation FeatureApproximationType = 60676
)
func ParseFeatureApproximationType
func ParseFeatureApproximationType(s string) (FeatureApproximationType, bool)
ParseFeatureApproximationType resolves a wire spelling back to its type.
func (FeatureApproximationType) String
func (t FeatureApproximationType) String() string
String returns the approximation's wire spelling.
type FileLocationType
FileLocationType classifies where a referenced file lives relative to the design project's search roots — the editable workspace, a shared workgroup, a read-only library, or somewhere unmanaged (M03-F07, Oblikovati/Oblikovati#608).
The values are a frozen block matching the reference API's location-type enum; never renumber them.
type FileLocationType int32
const (
// LocationWorkspace is the project's primary editable root.
LocationWorkspace FileLocationType = 45057
// LocationLocal is an auxiliary local workspace root.
LocationLocal FileLocationType = 45058
// LocationWorkgroup is a shared root of files being concurrently worked on.
LocationWorkgroup FileLocationType = 45059
// LocationLibrary is a shared, typically read-only catalog root.
LocationLibrary FileLocationType = 45060
// LocationUnknown is a path outside every configured root.
LocationUnknown FileLocationType = 45061
// LocationOwnerDirectory is the directory of the file holding the reference
// (sibling-relative resolution).
LocationOwnerDirectory FileLocationType = 45062
// LocationCloud is a connected/synchronized network location.
LocationCloud FileLocationType = 45063
)
func ParseFileLocationType
func ParseFileLocationType(s string) (FileLocationType, bool)
ParseFileLocationType resolves a wire spelling back to its FileLocationType.
func (FileLocationType) String
func (l FileLocationType) String() string
String returns the location type's wire spelling.
type FilletConcaveStrategy
FilletConcaveStrategy selects how a fillet treats a CONCAVE (internal) edge — one where the two faces fold over the material (dihedral > π), e.g. the inside corner where a rib meets a plate. A convex edge always rounds its corner away and ignores this. The fillet keeps an exact rolling-ball cylinder face either way; only which side the ball rolls on (and thus whether material is added or removed) changes. An Oblikovati extension (no reference-API equivalent); the block is OURS but, once shipped, equally frozen: never renumber.
- FilletConcaveOutward — fill the inside corner with material (a concave fillet bridging the two faces). The DEFAULT; the zero value resolves to it.
- FilletConcaveInward — round a recess into the corner instead (material removed).
type FilletConcaveStrategy int32
const (
// FilletConcaveOutward fills the inside corner with material (the default, also the zero value).
FilletConcaveOutward FilletConcaveStrategy = 200111
// FilletConcaveInward rounds a recess into the inside corner instead (material removed).
FilletConcaveInward FilletConcaveStrategy = 200112
)
func ParseFilletConcaveStrategy
func ParseFilletConcaveStrategy(s string) (FilletConcaveStrategy, bool)
ParseFilletConcaveStrategy resolves a wire spelling back to its strategy.
func (FilletConcaveStrategy) String
func (t FilletConcaveStrategy) String() string
String returns the concave strategy's wire spelling.
type FilletCornerType
FilletCornerType selects how an edge fillet treats a corner where two filleted edges meet at a vertex whose third edge stays sharp (the two rolling-ball cylinders cannot be joined by a single sphere unless that third edge is also rounded). It is an Oblikovati extension with no reference-API equivalent, so the numeric block below is OURS (chosen clear of the frozen reference blocks above) — but, once shipped, it is equally frozen: never renumber.
- FilletCornerMiter — the two cylinders mutually trim along their intersection seam (a crease); the geometrically exact rolling-ball result for rounding only two of a corner's three edges.
- FilletCornerSetback — a spherical corner patch tangent to the three faces, set back from the sharp edge by a small planar setback face (a smoothed corner; not the exact rolling-ball form).
- FilletCornerRound — round the corner fully into a single sphere octant by also rolling over the third edge (the true 3-edge blend; the corner becomes G1-smooth all round).
type FilletCornerType int32
const (
// FilletCornerMiter is the default: a crease seam where the two cylinders mutually trim.
FilletCornerMiter FilletCornerType = 200001
// FilletCornerSetback is a spherical patch set back from the sharp edge by a planar face.
FilletCornerSetback FilletCornerType = 200002
// FilletCornerRound rounds the corner fully into a sphere octant (rolls over the third edge).
FilletCornerRound FilletCornerType = 200003
)
func ParseFilletCornerType
func ParseFilletCornerType(s string) (FilletCornerType, bool)
ParseFilletCornerType resolves a wire spelling back to its corner type.
func (FilletCornerType) String
func (t FilletCornerType) String() string
String returns the corner type's wire spelling.
type FilletCrossSection
FilletCrossSection selects the shape of an edge blend's cross-section profile (M36-F08): the default circular arc (G1 — tangent to both walls), a curvature-continuous G2 profile (zero curvature at the tangency lines, so a blend between flat walls has no curvature jump), or a conic (rho-controlled) profile whose shoulder fullness is set by a separate rho parameter. It is a string enum so the empty value reads as the arc default; the kernel maps it to its blend builder.
type FilletCrossSection string
const (
// FilletSectionArc is the circular rolling-ball cross-section (G1; the empty/default value).
FilletSectionArc FilletCrossSection = "arc"
// FilletSectionG2 is a curvature-continuous cross-section (no curvature jump at the tangency lines).
FilletSectionG2 FilletCrossSection = "g2"
// FilletSectionConic is a conic (rho-controlled) cross-section; pair it with a rho fullness value.
FilletSectionConic FilletCrossSection = "conic"
)
func ParseFilletCrossSection
func ParseFilletCrossSection(s string) (FilletCrossSection, bool)
ParseFilletCrossSection resolves a wire spelling to a cross-section; the empty string is the arc.
func (FilletCrossSection) IsArc
func (c FilletCrossSection) IsArc() bool
IsArc reports whether the cross-section is the circular arc (the empty/default value or "arc").
func (FilletCrossSection) String
func (c FilletCrossSection) String() string
String returns the cross-section's wire spelling ("arc" for the empty default).
type FilletType
FilletType discriminates the fillet definition: edge sets, a face-pair fillet, or a full round across three face sets.
type FilletType int32
const (
EdgeFillet FilletType = 61697
FaceFillet FilletType = 61698
FullRoundFillet FilletType = 61699
)
func ParseFilletType
func ParseFilletType(s string) (FilletType, bool)
ParseFilletType resolves a wire spelling back to its type.
func (FilletType) String
func (t FilletType) String() string
String returns the fillet type's wire spelling.
type FlatPatternEdgeType
FlatPatternEdgeType classifies an edge of the developed flat for manufacturing and drawing: a fold line where the sheet bends up or down, or a tangent line where a curved wall met the flat tangentially. Outer-profile (cut) edges carry no flat-pattern type.
type FlatPatternEdgeType int32
const (
// BendUpFlatPatternEdge is a fold line whose bend lifts the material toward the front
// (top) face when the flat is refolded.
BendUpFlatPatternEdge FlatPatternEdgeType = iota
// BendDownFlatPatternEdge is a fold line whose bend lifts the material toward the back.
BendDownFlatPatternEdge
// TangentFlatPatternEdge is the tangent line where a rolled/curved wall meets the flat.
TangentFlatPatternEdge
)
func ParseFlatPatternEdgeType
func ParseFlatPatternEdgeType(s string) (FlatPatternEdgeType, bool)
ParseFlatPatternEdgeType resolves a wire spelling back to its edge type.
func (FlatPatternEdgeType) String
func (e FlatPatternEdgeType) String() string
String returns the edge type's wire spelling.
type FlatPatternFaceType
FlatPatternFaceType classifies a face of the developed flat: the front (top) face the orientation presents, the back (bottom) face, a detail face, or unknown.
type FlatPatternFaceType int32
const (
// UnknownFlatPatternFace is a face the flat pattern does not classify.
UnknownFlatPatternFace FlatPatternFaceType = iota
// FrontFlatPatternFace is the top face the active orientation presents.
FrontFlatPatternFace
// BackFlatPatternFace is the bottom face.
BackFlatPatternFace
// DetailFlatPatternFace is a face carrying punch/relief detail.
DetailFlatPatternFace
)
func ParseFlatPatternFaceType
func ParseFlatPatternFaceType(s string) (FlatPatternFaceType, bool)
ParseFlatPatternFaceType resolves a wire spelling back to its face type.
func (FlatPatternFaceType) String
func (f FlatPatternFaceType) String() string
String returns the face type's wire spelling.
type Geometric3DConstraintKind
Geometric3DConstraintKind discriminates a 3D geometric (non-dimensional) constraint — the value of oblikovati.org/api/wire.AddSketch3DConstraintArgs.Kind and of each enumerated 3D constraint's Kind. String values are frozen. Members are wired in across M22-F05.
type Geometric3DConstraintKind string
const (
Geo3DCoincident Geometric3DConstraintKind = "coincident"
Geo3DCollinear Geometric3DConstraintKind = "collinear"
Geo3DConcentric Geometric3DConstraintKind = "concentric"
Geo3DEqual Geometric3DConstraintKind = "equal"
Geo3DParallel Geometric3DConstraintKind = "parallel"
Geo3DPerpendicular Geometric3DConstraintKind = "perpendicular"
Geo3DTangent Geometric3DConstraintKind = "tangent"
Geo3DSmooth Geometric3DConstraintKind = "smooth"
Geo3DMidpoint Geometric3DConstraintKind = "midpoint"
Geo3DGround Geometric3DConstraintKind = "ground"
Geo3DParallelToXAxis Geometric3DConstraintKind = "parallelToXAxis"
Geo3DParallelToYAxis Geometric3DConstraintKind = "parallelToYAxis"
Geo3DParallelToZAxis Geometric3DConstraintKind = "parallelToZAxis"
Geo3DParallelToXYPlane Geometric3DConstraintKind = "parallelToXYPlane"
Geo3DParallelToXZPlane Geometric3DConstraintKind = "parallelToXZPlane"
Geo3DParallelToYZPlane Geometric3DConstraintKind = "parallelToYZPlane"
Geo3DSplineFitPoints Geometric3DConstraintKind = "splineFitPoints"
Geo3DBend Geometric3DConstraintKind = "bend"
Geo3DHelical Geometric3DConstraintKind = "helical"
Geo3DUnknown Geometric3DConstraintKind = "unknown"
)
type GeometricCharacteristic
GeometricCharacteristic is the geometric-tolerance symbol carried by a feature-control frame in a model GD&T annotation (parity: GeometricCharacteristicEnum). The values are the reference API's frozen bit ids and must never be renumbered.
This is the canonical, Apache-2.0 definition; the GPL implementation aliases it (ADR-0018). Used by the model-tolerance carrier (a metadata feature; #866).
type GeometricCharacteristic int32
const (
CharacteristicStraightness GeometricCharacteristic = 1
CharacteristicFlatness GeometricCharacteristic = 2
CharacteristicCircularity GeometricCharacteristic = 4
CharacteristicProfileOfAnyLine GeometricCharacteristic = 8
CharacteristicProfileOfAnySurface GeometricCharacteristic = 16
CharacteristicAngularity GeometricCharacteristic = 32
CharacteristicPerpendicularity GeometricCharacteristic = 64
CharacteristicParallelism GeometricCharacteristic = 128
CharacteristicPosition GeometricCharacteristic = 256
CharacteristicConcentricity GeometricCharacteristic = 512
CharacteristicCircularRunout GeometricCharacteristic = 1024
CharacteristicSymmetry GeometricCharacteristic = 2048
CharacteristicTotalRunout GeometricCharacteristic = 4096
CharacteristicCylindricity GeometricCharacteristic = 8192
CharacteristicParallelProfile GeometricCharacteristic = 16384
CharacteristicAxisIntersection GeometricCharacteristic = 32768
CharacteristicCircularRunoutFilled GeometricCharacteristic = 65536
CharacteristicTotalRunoutFilled GeometricCharacteristic = 131072
CharacteristicProfileOfASection GeometricCharacteristic = 262144
CharacteristicAxiality GeometricCharacteristic = 524288
)
func ParseGeometricCharacteristic
func ParseGeometricCharacteristic(s string) (GeometricCharacteristic, bool)
ParseGeometricCharacteristic resolves a wire spelling back to its characteristic.
func (GeometricCharacteristic) String
func (c GeometricCharacteristic) String() string
String returns the characteristic's wire spelling.
type GeometricConstraintKind
GeometricConstraintKind discriminates a sketch geometric (non-dimensional) constraint. Used by oblikovati.org/api/wire.AddConstraintArgs.Kind and by the enumerated constraint's Kind. String values are frozen.
type GeometricConstraintKind string
const (
GeoConstraintCoincident GeometricConstraintKind = "coincident"
GeoConstraintPointOnLine GeometricConstraintKind = "pointOnLine"
GeoConstraintMidpoint GeometricConstraintKind = "midpoint"
GeoConstraintPointOnCircle GeometricConstraintKind = "pointOnCircle"
GeoConstraintHorizontal GeometricConstraintKind = "horizontal"
GeoConstraintVertical GeometricConstraintKind = "vertical"
GeoConstraintParallel GeometricConstraintKind = "parallel"
GeoConstraintPerpendicular GeometricConstraintKind = "perpendicular"
GeoConstraintCollinear GeometricConstraintKind = "collinear"
GeoConstraintConcentric GeometricConstraintKind = "concentric"
GeoConstraintEqualLength GeometricConstraintKind = "equalLength"
GeoConstraintEqualRadius GeometricConstraintKind = "equalRadius"
GeoConstraintTangent GeometricConstraintKind = "tangent"
GeoConstraintSymmetry GeometricConstraintKind = "symmetry"
GeoConstraintFix GeometricConstraintKind = "fix"
GeoConstraintSmooth GeometricConstraintKind = "smooth"
GeoConstraintGround GeometricConstraintKind = "ground"
GeoConstraintOffset GeometricConstraintKind = "offset"
GeoConstraintPattern GeometricConstraintKind = "patternLink"
// GeoConstraintTextBox is the auto-created anchor tying a text box to its
// anchor geometry; it is never deletable on its own (M06-F11,
// Oblikovati/Oblikovati#626).
GeoConstraintTextBox GeometricConstraintKind = "textBox"
// GeoConstraintCustom is an add-in-owned tag constraint: a named,
// attribute-carrying record on sketch entities, not a solver callback
// (M06-F11).
GeoConstraintCustom GeometricConstraintKind = "custom"
GeoConstraintUnknown GeometricConstraintKind = "unknown"
)
type GeometryMoveableStatus
GeometryMoveableStatus answers "can this sketch entity be dragged?" for interactive tools — derived from the solver's per-entity constraint analysis (M06-F11, Oblikovati/Oblikovati#626).
The values are a frozen block matching the reference API's geometry-moveable-status enum; never renumber them.
type GeometryMoveableStatus int32
const (
// MoveableFree geometry has free degrees of freedom and drags directly.
MoveableFree GeometryMoveableStatus = 53505
// MoveableByDimensionChange geometry only moves if a driving dimension
// is relaxed — dragging it would re-solve other geometry.
MoveableByDimensionChange GeometryMoveableStatus = 53506
// MoveableFixed geometry is grounded/fixed (or reference) and never drags.
MoveableFixed GeometryMoveableStatus = 53507
// MoveableUnknown is reported when the solver cannot classify the entity.
MoveableUnknown GeometryMoveableStatus = 53508
)
func ParseGeometryMoveableStatus
func ParseGeometryMoveableStatus(s string) (GeometryMoveableStatus, bool)
ParseGeometryMoveableStatus resolves a wire spelling back to its status.
func (GeometryMoveableStatus) String
func (m GeometryMoveableStatus) String() string
String returns the status's wire spelling.
type GraphicsColorBinding
GraphicsColorBinding says how a primitive's colors map onto its geometry. With per-vertex each vertex carries its own color (the heatmap case); overall uses the single primitive color; per-item colors each line/triangle.
type GraphicsColorBinding string
const (
GraphicsColorOverall GraphicsColorBinding = "overall"
GraphicsColorPerVertex GraphicsColorBinding = "perVertex"
GraphicsColorPerItem GraphicsColorBinding = "perItem"
)
type GraphicsLane
GraphicsLane selects which display lane a graphics group lives in — the bridge between the two graphics surfaces. "persistent" is client graphics (document-owned, lives until deleted); "overlay" and "preview" are the interaction-graphics lanes (command-scoped, cleared when the interaction ends). Overlay graphics draw on top of the scene (depth-test off); preview graphics draw depth-tested with the scene.
type GraphicsLane string
const (
GraphicsLanePersistent GraphicsLane = "persistent"
GraphicsLaneOverlay GraphicsLane = "overlay"
GraphicsLanePreview GraphicsLane = "preview"
)
type GraphicsLineType
GraphicsLineType is a line primitive's dash pattern (a subset of the line-type styles).
type GraphicsLineType string
const (
GraphicsLineContinuous GraphicsLineType = "continuous"
GraphicsLineDashed GraphicsLineType = "dashed"
GraphicsLineDotted GraphicsLineType = "dotted"
)
type GraphicsNormalBinding
GraphicsNormalBinding says how normals map onto a triangle primitive. Per-vertex gives smooth shading; overall a single face normal.
type GraphicsNormalBinding string
const (
GraphicsNormalOverall GraphicsNormalBinding = "overall"
GraphicsNormalPerVertex GraphicsNormalBinding = "perVertex"
)
type GraphicsPointStyle
GraphicsPointStyle is the glyph drawn for a points primitive (a subset of the point render styles). The host expands each point into screen-constant glyph geometry.
type GraphicsPointStyle string
const (
GraphicsPointDot GraphicsPointStyle = "dot"
GraphicsPointCross GraphicsPointStyle = "cross" // diagonal X
GraphicsPointPlus GraphicsPointStyle = "plus" // axis-aligned +
GraphicsPointSquare GraphicsPointStyle = "square"
GraphicsPointCircle GraphicsPointStyle = "circle"
)
type GraphicsPrimitiveKind
GraphicsPrimitiveKind names the topology of one graphics primitive (line, point, triangle, or text graphics). It is the discriminator of a oblikovati.org/api/wire.GraphicsPrimitive.
type GraphicsPrimitiveKind string
const (
// GraphicsLines is an indexed line list (segment pairs).
GraphicsLines GraphicsPrimitiveKind = "lines"
// GraphicsLineStrip is a connected polyline (each vertex joins the previous).
GraphicsLineStrip GraphicsPrimitiveKind = "lineStrip"
// GraphicsPoints is a set of point markers drawn with a [GraphicsPointStyle] glyph.
GraphicsPoints GraphicsPrimitiveKind = "points"
// GraphicsTriangles is an indexed triangle mesh (the heatmap/surface primitive).
GraphicsTriangles GraphicsPrimitiveKind = "triangles"
// GraphicsTriangleStrip is a triangle strip (each vertex extends the previous two).
GraphicsTriangleStrip GraphicsPrimitiveKind = "triangleStrip"
// GraphicsTriangleFan is a triangle fan (each vertex joins the first and the previous).
GraphicsTriangleFan GraphicsPrimitiveKind = "triangleFan"
// GraphicsText is a world-anchored text label.
GraphicsText GraphicsPrimitiveKind = "text"
// GraphicsSurface renders an existing B-rep body/face by reference key, with an optional
// override color/transform — the SurfaceGraphics equivalent (geometry stays host-side).
GraphicsSurface GraphicsPrimitiveKind = "surface"
// GraphicsCurve renders an existing B-rep edge by reference key — the CurveGraphics equivalent.
GraphicsCurve GraphicsPrimitiveKind = "curve"
// GraphicsImage is a world- or screen-anchored image billboard (a textured quad).
GraphicsImage GraphicsPrimitiveKind = "image"
)
type GraphicsSelectabilityEnum
GraphicsSelectabilityEnum is whether none, some, or all of a graphics node's geometry can be picked. Frozen ids 25345–25347.
type GraphicsSelectabilityEnum int32
const (
// NoGraphicsSelectable makes none of the node selectable (25345).
NoGraphicsSelectable GraphicsSelectabilityEnum = 25345
// SomeGraphicsSelectable makes part of the node selectable (25346).
SomeGraphicsSelectable GraphicsSelectabilityEnum = 25346
// AllGraphicsSelectable makes all of the node selectable (25347).
AllGraphicsSelectable GraphicsSelectabilityEnum = 25347
)
func AllGraphicsSelectabilities
func AllGraphicsSelectabilities() []GraphicsSelectabilityEnum
AllGraphicsSelectabilities returns every defined selectability.
func (GraphicsSelectabilityEnum) IsValid
func (g GraphicsSelectabilityEnum) IsValid() bool
IsValid reports whether g is a defined selectability.
func (GraphicsSelectabilityEnum) String
func (g GraphicsSelectabilityEnum) String() string
String returns the selectability's user-facing name.
type GraphicsVisibilityEnum
GraphicsVisibilityEnum is whether none, some, or all of a graphics node is visible. Frozen ids 25089–25091.
type GraphicsVisibilityEnum int32
const (
// NoGraphicsVisible hides the whole node (25089).
NoGraphicsVisible GraphicsVisibilityEnum = 25089
// SomeGraphicsVisible shows part of the node (25090).
SomeGraphicsVisible GraphicsVisibilityEnum = 25090
// AllGraphicsVisible shows the whole node (25091).
AllGraphicsVisible GraphicsVisibilityEnum = 25091
)
func AllGraphicsVisibilities
func AllGraphicsVisibilities() []GraphicsVisibilityEnum
AllGraphicsVisibilities returns every defined visibility.
func (GraphicsVisibilityEnum) IsValid
func (g GraphicsVisibilityEnum) IsValid() bool
IsValid reports whether g is a defined visibility.
func (GraphicsVisibilityEnum) String
func (g GraphicsVisibilityEnum) String() string
String returns the visibility's user-facing name.
type GridCell
GridCell is the explicit placement of one child inside its parent grid. Col is the 0-based column; ColSpan (>=1; 0 is treated as 1) is how many columns the child covers. A child with no Cell (nil pointer on the wire) auto-flows into the next free cell.
Row and RowSpan are reserved for a later slice: the wire shape accepts them so it stays forward-stable, but the host renders rows as content-height auto-flow, so RowSpan must be 1 in this version (the router rejects RowSpan > 1).
type GridCell struct {
Col int `json:"col,omitempty"`
Row int `json:"row,omitempty"`
ColSpan int `json:"colSpan,omitempty"`
RowSpan int `json:"rowSpan,omitempty"`
}
type GridTrack
GridTrack is one column track of a grid. Value is pixels when Fixed and the fraction weight when Fraction (ignored when Auto). MinPx/MaxPx (0 = unset) clamp the resolved width, expressing CSS minmax(): e.g. a 1fr track that never shrinks below 80px is {Kind: GridTrackFraction, Value: 1, MinPx: 80}.
Example: a label/field form is two tracks — TrackAuto() for labels, TrackFr(1) for fields.
type GridTrack struct {
Kind GridTrackKind `json:"kind,omitempty"`
Value float64 `json:"value,omitempty"`
MinPx float64 `json:"minPx,omitempty"`
MaxPx float64 `json:"maxPx,omitempty"`
}
type GridTrackKind
GridTrackKind is how one grid column track is sized.
type GridTrackKind uint8
const (
// GridTrackAuto sizes the track to its content (the zero value).
GridTrackAuto GridTrackKind = 0
// GridTrackFixed sizes the track to exactly Value pixels.
GridTrackFixed GridTrackKind = 1
// GridTrackFraction sizes the track to a share of the leftover space; Value is the
// fraction weight (CSS "fr"): a 2fr track gets twice the leftover a 1fr track gets.
GridTrackFraction GridTrackKind = 2
)
type GroundShadowEnum
GroundShadowEnum is how the scene casts shadows onto the ground plane: none, a standard ground shadow, or an X-ray (see-through) ground shadow. The numeric ids are stable, frozen values (69121–69123).
This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.GroundShadowEnum).
type GroundShadowEnum int32
const (
// NoGroundShadow casts no ground shadow (69121).
NoGroundShadow GroundShadowEnum = 69121
// GroundShadow casts a standard ground shadow (69122).
GroundShadow GroundShadowEnum = 69122
// XRayGroundShadow casts a see-through (X-ray) ground shadow (69123).
XRayGroundShadow GroundShadowEnum = 69123
)
func AllGroundShadows
func AllGroundShadows() []GroundShadowEnum
AllGroundShadows returns every defined ground-shadow mode, in picker order.
func (GroundShadowEnum) IsValid
func (g GroundShadowEnum) IsValid() bool
IsValid reports whether g is a defined ground-shadow mode.
func (GroundShadowEnum) String
func (g GroundShadowEnum) String() string
String returns the ground-shadow mode's user-facing name.
type HatchPattern
HatchPattern is a built-in hatch line family. The zero value is HatchGeneral (single 45° lines).
type HatchPattern int32
const (
// HatchGeneral is the general-purpose single hatch: parallel lines at 45°.
HatchGeneral HatchPattern = iota
// HatchCross is cross-hatch: two perpendicular line families at ±45°.
HatchCross
// HatchANSI31 is the ANSI iron/general pattern: parallel lines at 45° (a closer spacing).
HatchANSI31
)
func ParseHatchPattern
func ParseHatchPattern(s string) (HatchPattern, bool)
ParseHatchPattern resolves a wire spelling back to its pattern.
p, ok := types.ParseHatchPattern("cross") // HatchCross, true
func (HatchPattern) String
func (p HatchPattern) String() string
String returns the pattern's wire spelling ("general", "cross", "ansi31").
type HealthStatus
HealthStatus is the condition a constraint (or any modeling entity) reports when it cannot be fully evaluated — the public, Apache-2.0 form of the host's health vocabulary (model/health). A constraint whose geometry vanished goes Sick and is re-selectable; an over-constrained assembly that still solved reports Warning.
type HealthStatus uint8
const (
// HealthOK: the entity is fully evaluated and valid.
HealthOK HealthStatus = 0
// HealthWarning: usable but flagged (e.g. redundant constraints that still solved).
HealthWarning HealthStatus = 1
// HealthSick: cannot be evaluated and needs user attention (e.g. a lost reference).
HealthSick HealthStatus = 2
// HealthSuppressed: intentionally excluded from evaluation by the user.
HealthSuppressed HealthStatus = 3
)
func (HealthStatus) String
func (h HealthStatus) String() string
String returns a stable lowercase name, byte-compatible with the host's health.Status.String() so the two vocabularies agree on the wire.
type HelicalShapeDefinitionKind
HelicalShapeDefinitionKind discriminates how a helical curve's shape is specified (M06-F09, Oblikovati/Oblikovati#624). The wire spellings double as the helix Mode strings already accepted by sketch3d.addEntity since M22-F04.
The values are a frozen block matching the reference API's helical-shape definition enum; never renumber them.
type HelicalShapeDefinitionKind int32
const (
// HelixShapePitchRevolution fixes pitch and turn count (height follows).
HelixShapePitchRevolution HelicalShapeDefinitionKind = 115713
// HelixShapePitchHeight fixes pitch and total height (turns follow).
HelixShapePitchHeight HelicalShapeDefinitionKind = 115714
// HelixShapeRevolutionHeight fixes turn count and total height (pitch follows).
HelixShapeRevolutionHeight HelicalShapeDefinitionKind = 115715
// HelixShapeSpiral is a flat spiral: no axial advance, radial growth per turn.
HelixShapeSpiral HelicalShapeDefinitionKind = 115716
)
func ParseHelicalShapeDefinitionKind
func ParseHelicalShapeDefinitionKind(s string) (HelicalShapeDefinitionKind, bool)
ParseHelicalShapeDefinitionKind resolves a wire spelling back to its kind.
func (HelicalShapeDefinitionKind) String
func (k HelicalShapeDefinitionKind) String() string
String returns the shape kind's wire spelling.
type HelixEndKind
HelixEndKind is the transition condition at one end of a helical curve (M06-F09). A natural end stops on the helix; a flat end appends a planar transition (governed by the definition's transition/flat angles) so the coil seats flat — the standard spring end treatment.
The values are a frozen block matching the reference API's helix-end enum; never renumber them.
type HelixEndKind int32
const (
HelixEndNatural HelixEndKind = 115969
HelixEndFlat HelixEndKind = 115970
)
func ParseHelixEndKind
func ParseHelixEndKind(s string) (HelixEndKind, bool)
ParseHelixEndKind resolves a wire spelling back to its kind.
func (HelixEndKind) String
func (k HelixEndKind) String() string
String returns the end kind's wire spelling.
type HoleNoteQuantity
HoleNoteQuantity is how hole notes treat multiple holes of the same size. The zero value is HoleNotePerHole (one callout per hole).
type HoleNoteQuantity int32
const (
// HoleNotePerHole gives every hole its own diameter callout.
HoleNotePerHole HoleNoteQuantity = iota
// HoleNoteCombined groups holes by diameter into one "<n>x Ø<d>" callout per distinct diameter.
HoleNoteCombined
)
func ParseHoleNoteQuantity
func ParseHoleNoteQuantity(s string) (HoleNoteQuantity, bool)
ParseHoleNoteQuantity resolves a wire spelling back to its quantity mode.
q, ok := types.ParseHoleNoteQuantity("combined") // HoleNoteCombined, true
func (HoleNoteQuantity) String
func (q HoleNoteQuantity) String() string
String returns the quantity mode's wire spelling ("perHole", "combined").
type IsotropyClass
IsotropyClass declares a material's elastic symmetry, telling a structural (FEA) solver how to read its stiffness. An isotropic material is fully described by the scalar Mechanical group (E, ν); orthotropic and transversely-isotropic materials additionally carry an AnisotropicElastic group of direction-dependent constants. The zero value ("") is treated as Isotropic, so existing materials need no migration.
type IsotropyClass string
const (
Isotropic IsotropyClass = "isotropic"
Orthotropic IsotropyClass = "orthotropic"
TransverselyIsotropic IsotropyClass = "transversely-isotropic"
)
func (IsotropyClass) Anisotropic
func (c IsotropyClass) Anisotropic() bool
Anisotropic reports whether the class needs an AnisotropicElastic group — i.e. it is not isotropic. The empty class counts as isotropic.
type KeyChord
KeyChord is a keyboard shortcut: a key token plus held modifiers. This is the canonical, Apache-2.0 definition shared by the typed client and the host's binding engine; the GPL implementation maps it onto its internal modifier bitmask. The canonical text form (KeyChord.String) is "Ctrl+Alt+Shift+Key" with the modifiers in that fixed order, so two chords are equal iff their String values match — that string is the comparison key the engine uses for conflict detection.
Example: KeyChord{Key: "E"}.String() == "E"; KeyChord{Key: "z", Ctrl: true}.String() == "Ctrl+Z".
type KeyChord struct {
Key string `json:"key"`
Ctrl bool `json:"ctrl,omitempty"`
Alt bool `json:"alt,omitempty"`
Shift bool `json:"shift,omitempty"`
}
func ParseChord
func ParseChord(s string) (KeyChord, error)
ParseChord parses a canonical chord string into a KeyChord. The final '+'-separated token is the key; the rest are modifiers (case-insensitive: Ctrl/Control, Alt/Option, Shift). An empty string parses to the unbound zero chord; an empty key after modifiers or an unknown modifier is an error naming the offending input and the expected "[Ctrl+][Alt+][Shift+]Key" shape.
func (KeyChord) IsZero
func (k KeyChord) IsZero() bool
IsZero reports whether the chord is unbound (no key) — the sentinel for "this action has no shortcut".
func (KeyChord) String
func (k KeyChord) String() string
String renders the chord in canonical form ("Ctrl+Shift+E"). An unbound chord (empty key) renders as "".
type LightDefinitionTypeEnum
LightDefinitionTypeEnum is the emission shape of a light: a directional (parallel-ray) sun, an omnidirectional point, or a cone spotlight. The numeric ids are stable, frozen values (53249–53251).
This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.LightDefinitionTypeEnum) and maps it onto the renderer's LightKind.
type LightDefinitionTypeEnum int32
const (
// DirectionalLight emits parallel rays (a sun); only its direction matters (53249).
DirectionalLight LightDefinitionTypeEnum = 53249
// PointLight emits from a position in all directions, with distance attenuation (53250).
PointLight LightDefinitionTypeEnum = 53250
// SpotLight emits from a position within a cone about its direction (53251).
SpotLight LightDefinitionTypeEnum = 53251
)
func AllLightDefinitionTypes
func AllLightDefinitionTypes() []LightDefinitionTypeEnum
AllLightDefinitionTypes returns every defined light-definition type, for building a picker.
func (LightDefinitionTypeEnum) IsValid
func (t LightDefinitionTypeEnum) IsValid() bool
IsValid reports whether t is a defined light-definition type.
func (LightDefinitionTypeEnum) String
func (t LightDefinitionTypeEnum) String() string
String returns the definition type's user-facing name.
type LightTypeEnum
LightTypeEnum is the coordinate space a light lives in. A model-space light is fixed to the model; a view-space light follows the camera (a headlight); a ground-plane-space light is fixed to the ground/orientation-cube frame. The numeric ids are stable, frozen values (52993–52995).
This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.LightTypeEnum) and maps it onto the renderer's lighting rig.
type LightTypeEnum int32
const (
// ModelSpaceLight is fixed in model space (52993).
ModelSpaceLight LightTypeEnum = 52993
// ViewSpaceLight follows the camera — a headlight (52994).
ViewSpaceLight LightTypeEnum = 52994
// GroundPlaneSpaceLight is fixed to the ground-plane/ViewCube frame (52995).
GroundPlaneSpaceLight LightTypeEnum = 52995
)
func AllLightTypes
func AllLightTypes() []LightTypeEnum
AllLightTypes returns every defined light type, for building a picker.
func (LightTypeEnum) IsValid
func (t LightTypeEnum) IsValid() bool
IsValid reports whether t is a defined light type.
func (LightTypeEnum) String
func (t LightTypeEnum) String() string
String returns the light type's user-facing name.
type LightingStyleTypeEnum
LightingStyleTypeEnum says whether a lighting style is a traditional multi-light rig or an image-based (HDR environment) style. The numeric ids are stable, frozen values (50750977–50750978).
This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.LightingStyleTypeEnum).
type LightingStyleTypeEnum int32
const (
// StandardLightingStyle is a traditional rig of discrete lights (50750977).
StandardLightingStyle LightingStyleTypeEnum = 50750977
// ImageBasedLightingStyle derives illumination from an HDR environment image (50750978).
ImageBasedLightingStyle LightingStyleTypeEnum = 50750978
)
func AllLightingStyleTypes
func AllLightingStyleTypes() []LightingStyleTypeEnum
AllLightingStyleTypes returns every defined lighting-style type.
func (LightingStyleTypeEnum) IsValid
func (t LightingStyleTypeEnum) IsValid() bool
IsValid reports whether t is a defined lighting-style type.
func (LightingStyleTypeEnum) String
func (t LightingStyleTypeEnum) String() string
String returns the lighting-style type's user-facing name.
type LineDefinitionSpaceEnum
LineDefinitionSpaceEnum is the coordinate space a line graphic's width/pattern is defined in: screen space (constant pixels), model space (scales with zoom), or hybrid. Frozen ids 49921–49923.
type LineDefinitionSpaceEnum int32
const (
// ScreenSpace defines line width in constant screen pixels (49921).
ScreenSpace LineDefinitionSpaceEnum = 49921
// ModelSpace defines line width in model units (scales with zoom) (49922).
ModelSpace LineDefinitionSpaceEnum = 49922
// HybridSpace mixes screen and model space (49923).
HybridSpace LineDefinitionSpaceEnum = 49923
)
func AllLineDefinitionSpaces
func AllLineDefinitionSpaces() []LineDefinitionSpaceEnum
AllLineDefinitionSpaces returns every defined line-definition space.
func (LineDefinitionSpaceEnum) IsValid
func (l LineDefinitionSpaceEnum) IsValid() bool
IsValid reports whether l is a defined line-definition space.
func (LineDefinitionSpaceEnum) String
func (l LineDefinitionSpaceEnum) String() string
String returns the line-definition-space's user-facing name.
type LoftAreaStop
LoftAreaStop is one control point of a loft area graph (the kLoftWithAreaGraphSections mode): at fractional position T along the loft (0=start, 1=end) the cross-section's area is scaled by Scale (1 = unchanged). The graph is interpolated linearly between stops, so a stop set of {{0,1},{0.5,2},{1,1}} doubles the mid cross-section's area — a barrel controlled by area.
type LoftAreaStop struct {
T float64 `json:"t"`
Scale float64 `json:"scale"`
}
type LoftCondition
LoftCondition selects how a loft surface leaves the starting section (or arrives at the ending section) — the boundary tangency control that lets a loft curve away from a flat ruled blend. It mirrors the established loft-condition set: a free (natural) end, an angled takeoff measured against the section's sketch plane, tangency/curvature continuity with adjacent faces, and the point-section cases.
This is the canonical, Apache-2.0 definition; the GPL model aliases it (model/feature.LoftCondition = types.LoftCondition).
type LoftCondition string
const (
// LoftFree imposes no tangency: the surface ends naturally, so a two-section Free loft is
// ruled (a straight blend). Angle and impact are ignored.
LoftFree LoftCondition = "free"
// LoftAngle makes the surface leave the section at a fixed angle to the section's sketch
// plane, weighted by an impact (takeoff weight). This is the control that curves a
// two-section loft (e.g. a flared or necked transition).
LoftAngle LoftCondition = "angle"
// LoftDirection is an alias of LoftAngle (the angle/direction takeoff is one condition with
// two exposed names).
LoftDirection LoftCondition = "direction"
// LoftTangent makes the surface tangent to the faces adjacent to the section (requires the
// section to coincide with an existing body's edge).
LoftTangent LoftCondition = "tangent"
// LoftSmooth imposes curvature (G2) continuity with the adjacent faces.
LoftSmooth LoftCondition = "smooth"
// LoftG3 imposes curvature-rate (G3) continuity with the adjacent faces (a level beyond Smooth).
LoftG3 LoftCondition = "g3"
// LoftSharpPoint ends the loft in a sharp point (a point section).
LoftSharpPoint LoftCondition = "sharp"
// LoftTangentToPlane makes the surface tangent to a plane at a point section.
LoftTangentToPlane LoftCondition = "tangent-to-plane"
)
func (LoftCondition) ContinuityOrder
func (c LoftCondition) ContinuityOrder() int
ContinuityOrder is the geometric-continuity order a face-continuity condition imposes across the section edge: Tangent = 1 (G1), Smooth = 2 (G2), G3 = 3. Non-face conditions return 0.
func (LoftCondition) CurvesViaAngle
func (c LoftCondition) CurvesViaAngle() bool
CurvesViaAngle reports whether the condition is the angle/direction takeoff — the case driven by an angle-to-plane and impact (the others need adjacent faces or point sections).
func (LoftCondition) IsFaceContinuity
func (c LoftCondition) IsFaceContinuity() bool
IsFaceContinuity reports the conditions that continue an adjacent face's surface across the section edge: Tangent (G1), Smooth (G2) and G3. They require the section to be a body face.
func (LoftCondition) IsFree
func (c LoftCondition) IsFree() bool
IsFree reports whether the condition leaves the end natural (the zero value "" is treated as Free, so an unset condition keeps the ruled/natural blend).
func (LoftCondition) IsPointCondition
func (c LoftCondition) IsPointCondition() bool
IsPointCondition reports whether the condition applies to a point (apex) section.
func (LoftCondition) IsSharp
func (c LoftCondition) IsSharp() bool
IsSharp reports the sharp-point point-section condition (a straight cone apex).
func (LoftCondition) IsTangentToPlane
func (c LoftCondition) IsTangentToPlane() bool
IsTangentToPlane reports the tangent-to-plane point-section condition (a domed apex).
type LoftType
LoftType is the loft mode — a plain blend through the sections, or one additionally guided by rails / a centerline / area-graph sections. It mirrors the established loft-type set.
This is the canonical, Apache-2.0 definition; the GPL model derives it (model/feature.LoftDefinition.LoftType()).
type LoftType string
const (
// RegularLoft blends through the sections with no extra guides.
RegularLoft LoftType = "regular"
// LoftWithRails additionally constrains the surface to follow guide rails.
LoftWithRails LoftType = "rails"
// LoftWithCenterline sweeps the sections along a centerline (reserved).
LoftWithCenterline LoftType = "centerline"
// LoftWithAreaGraphSections places sections by an area graph along a centerline (reserved).
LoftWithAreaGraphSections LoftType = "area-graph"
)
type Magnetic
Magnetic groups a material's magnetic properties — the constitutive data a 2D/3D magnetostatics solver (e.g. the FEMM bridge add-in) needs to assign a block material. It serves both soft-magnetic cores and permanent magnets, distinguished by [Class]:
- Soft-magnetic: RelativePermeability is the (initial/amplitude) μr and SaturationFluxDensity caps the linear region; Remanence/Coercivity are zero.
- Hard-magnetic (PM): Remanence (Br) and Coercivity (Hc) define the demagnetisation line, and RelativePermeability is the recoil μr ≈ Br/(μ0·Hc) (typically ~1.05).
The zero value (Class == "", all fields 0) is a non-magnetic material; the solver treats it as free space (μr = 1). Existing materials therefore need no migration.
Example (NdFeB N42 permanent magnet):
Magnetic{Class: HardMagnetic, Remanence: 1.30, Coercivity: 915, RelativePermeability: 1.05}
type Magnetic struct {
// Class selects the constitutive model (soft vs hard); "" == non-magnetic.
Class MagneticClass `json:"class,omitempty" yaml:"class,omitempty"`
// RelativePermeability is μr [-]: the amplitude permeability for a soft-magnetic core,
// or the recoil permeability for a permanent magnet (≈ 1.05 for sintered NdFeB).
RelativePermeability float64 `json:"relativePermeability,omitempty" yaml:"relativePermeability,omitempty"`
// Remanence is the residual flux density Br [T] of a permanent magnet (0 for soft iron).
Remanence float64 `json:"remanence,omitempty" yaml:"remanence,omitempty"`
// Coercivity is the (intrinsic) coercive field Hc [kA/m] of a permanent magnet, the
// field that drives B to zero — the demagnetisation margin a motor design checks.
Coercivity float64 `json:"coercivity,omitempty" yaml:"coercivity,omitempty"`
// SaturationFluxDensity is Bsat [T] where a soft-magnetic core leaves its linear region
// (~1.5–2.0 T for electrical steels, ~2.3 T for cobalt iron). 0 when not applicable.
SaturationFluxDensity float64 `json:"saturationFluxDensity,omitempty" yaml:"saturationFluxDensity,omitempty"`
// CoreLoss is the specific iron loss at 1.5 T, 50 Hz [W/kg] of a lamination grade
// (the W15/50 figure), for downstream loss estimation. 0 when unknown/not applicable.
CoreLoss float64 `json:"coreLoss,omitempty" yaml:"coreLoss,omitempty"`
}
func (Magnetic) IsMagnetic
func (m Magnetic) IsMagnetic() bool
IsMagnetic reports whether the material carries a meaningful magnetic model — i.e. it is soft- or hard-magnetic, not the non-magnetic default. A solver branches on this to decide whether to read the group or treat the region as free space.
type MagneticClass
MagneticClass declares how a material responds to a magnetic field, telling a magnetostatics (FEA) solver which constitutive law to apply. The zero value ("") means the material is effectively non-magnetic (μr ≈ 1, no remanence), so the overwhelming majority of materials — plastics, woods, non-ferrous metals — carry no Magnetic group and need no migration. Only soft-magnetic cores and permanent magnets declare a class.
type MagneticClass string
const (
// NonMagnetic is the default: μr ≈ 1, treated as free space by the solver.
NonMagnetic MagneticClass = "non-magnetic"
// SoftMagnetic is a linear/saturating core material (electrical steel, soft iron,
// ferrite cores) — high permeability, negligible remanence. The solver reads
// [Magnetic.RelativePermeability] (and saturates at SaturationFluxDensity).
SoftMagnetic MagneticClass = "soft-magnetic"
// HardMagnetic is a permanent magnet (NdFeB, SmCo, ferrite, AlNiCo): the solver reads
// the linear-recoil model from [Magnetic.Remanence], [Magnetic.Coercivity] and the
// recoil [Magnetic.RelativePermeability].
HardMagnetic MagneticClass = "hard-magnetic"
)
type MassPropertiesAccuracy
MassPropertiesAccuracy selects the tessellation fidelity a mass-properties computation uses — trading speed for accuracy on curved geometry (planar bodies are exact at any level). The zero value is MassPropertiesMedium.
type MassPropertiesAccuracy int32
const (
// MassPropertiesMedium is the default tessellation fidelity.
MassPropertiesMedium MassPropertiesAccuracy = iota
// MassPropertiesLow is a coarse, faster tessellation.
MassPropertiesLow
// MassPropertiesHigh is a fine, slower tessellation for tighter accuracy on curved bodies.
MassPropertiesHigh
)
func ParseMassPropertiesAccuracy
func ParseMassPropertiesAccuracy(s string) (MassPropertiesAccuracy, bool)
ParseMassPropertiesAccuracy resolves a wire spelling back to its accuracy level.
func (MassPropertiesAccuracy) String
func (a MassPropertiesAccuracy) String() string
String returns the accuracy level's wire spelling ("medium", "low", "high").
type MateConstraintSolutionType
MateConstraintSolutionType discriminates how a mate between two directional faces resolves: opposed normals (a true mate) or aligned normals (a flush). It is the directed sense the solver enforces on the two faces' normals.
type MateConstraintSolutionType uint32
const (
// MateSolutionOpposed is the default mate: the two face normals point at each other.
MateSolutionOpposed MateConstraintSolutionType = 0
// MateSolutionAligned is the flush sense: the two face normals point the same way.
MateSolutionAligned MateConstraintSolutionType = 1
)
func (MateConstraintSolutionType) String
func (s MateConstraintSolutionType) String() string
String returns a stable lowercase name.
type MaterialRemoval
MaterialRemoval is the surface-texture symbol variant — whether material removal (machining) is allowed, required or forbidden. The zero value is MaterialRemovalAny (the basic √ symbol).
type MaterialRemoval int32
const (
// MaterialRemovalAny is the basic surface texture symbol (the open checkmark): material removal
// is permitted but not mandated.
MaterialRemovalAny MaterialRemoval = iota
// MaterialRemovalRequired adds the horizontal bar across the checkmark: machining is required.
MaterialRemovalRequired
// MaterialRemovalProhibited adds a circle in the checkmark's vertex: machining is forbidden.
MaterialRemovalProhibited
)
func ParseMaterialRemoval
func ParseMaterialRemoval(s string) (MaterialRemoval, bool)
ParseMaterialRemoval resolves a wire spelling back to its variant.
m, ok := types.ParseMaterialRemoval("required") // MaterialRemovalRequired, true
func (MaterialRemoval) String
func (m MaterialRemoval) String() string
String returns the variant's wire spelling ("any", "required", "prohibited").
type Matrix
Matrix is a 4×4 affine 3D transform, row-major, with the bottom row expected to stay [0,0,0,1] (the builders guarantee it; a hand-built matrix is the caller's responsibility). JSON form: the 16 cells as one array.
type Matrix struct {
Cells [16]float64
}
func CoordinateSystemMatrix
func CoordinateSystemMatrix(origin Point, xAxis, yAxis, zAxis UnitVector) Matrix
CoordinateSystemMatrix returns the transform mapping the standard frame onto the frame (origin, xAxis, yAxis, zAxis) — column-axes form.
func IdentityMatrix
func IdentityMatrix() Matrix
IdentityMatrix returns the do-nothing transform.
func RotationMatrix
func RotationMatrix(angle float64, axis UnitVector, center Point) Matrix
RotationMatrix returns the rotation by angle (radians) about the axis through center (Rodrigues, composed T·R·T⁻¹).
func TranslationMatrix
func TranslationMatrix(v Vector) Matrix
TranslationMatrix returns the transform that displaces by v.
func (Matrix) At
func (m Matrix) At(row, col int) float64
At returns the cell at (row, col), both 0-based.
func (Matrix) Determinant
func (m Matrix) Determinant() float64
Determinant returns the determinant of the linear (3×3) part — affine matrices' bottom row contributes nothing.
func (Matrix) Invert
func (m Matrix) Invert() (Matrix, error)
Invert returns the inverse transform, erroring on a singular linear part.
func (Matrix) MarshalJSON
func (m Matrix) MarshalJSON() ([]byte, error)
MarshalJSON encodes the 16 cells as one array.
func (Matrix) Mul
func (m Matrix) Mul(o Matrix) Matrix
Mul returns m·o (apply o first, then m).
func (Matrix) TransformPoint
func (m Matrix) TransformPoint(p Point) Point
TransformPoint applies the full affine transform to a position.
func (Matrix) TransformVector
func (m Matrix) TransformVector(v Vector) Vector
TransformVector applies the linear part only (displacements ignore translation).
func (Matrix) Translation
func (m Matrix) Translation() Vector
Translation returns the transform's displacement column.
func (*Matrix) UnmarshalJSON
func (m *Matrix) UnmarshalJSON(b []byte) error
UnmarshalJSON decodes a 16-cell array.
type Matrix2d
Matrix2d is a 3×3 affine 2D transform, row-major, bottom row [0,0,1].
type Matrix2d struct {
Cells [9]float64
}
func IdentityMatrix2d
func IdentityMatrix2d() Matrix2d
IdentityMatrix2d returns the do-nothing 2D transform.
func RotationMatrix2d
func RotationMatrix2d(angle float64, center Point2d) Matrix2d
RotationMatrix2d returns the rotation by angle (radians) about center.
func TranslationMatrix2d
func TranslationMatrix2d(v Vector2d) Matrix2d
TranslationMatrix2d returns the transform that displaces by v.
func (Matrix2d) At
func (m Matrix2d) At(row, col int) float64
At returns the cell at (row, col), both 0-based.
func (Matrix2d) MarshalJSON
func (m Matrix2d) MarshalJSON() ([]byte, error)
MarshalJSON encodes the 9 cells as one array.
func (Matrix2d) Mul
func (m Matrix2d) Mul(o Matrix2d) Matrix2d
Mul returns m·o (apply o first, then m).
func (Matrix2d) TransformPoint
func (m Matrix2d) TransformPoint(p Point2d) Point2d
TransformPoint applies the full affine transform to a position.
func (Matrix2d) TransformVector
func (m Matrix2d) TransformVector(v Vector2d) Vector2d
TransformVector applies the linear part only.
func (Matrix2d) Translation
func (m Matrix2d) Translation() Vector2d
Translation returns the transform's displacement column.
func (*Matrix2d) UnmarshalJSON
func (m *Matrix2d) UnmarshalJSON(b []byte) error
UnmarshalJSON decodes a 9-cell array.
type MeasureType
MeasureType is the quantity a measurement reports. The zero value is MeasureLength.
type MeasureType int32
const (
// MeasureLength is the length of a single edge.
MeasureLength MeasureType = iota
// MeasureArea is the area of a single face.
MeasureArea
// MeasureDistance is the straight-line distance between two vertices.
MeasureDistance
// MeasureMinDistance is the minimum distance between two entities of any kind
// (vertex, edge or face) — their closest approach. Zero when they touch or intersect.
MeasureMinDistance
// MeasureAngle is the angle in degrees between two entities (an edge's direction or a planar
// face's normal), or — with a third vertex — the angle at the apex of three vertices.
MeasureAngle
// MeasureLoopLength is the length of a face's outer boundary loop — its perimeter.
MeasureLoopLength
)
func ParseMeasureType
func ParseMeasureType(s string) (MeasureType, bool)
ParseMeasureType resolves a wire spelling back to its measure type.
func (MeasureType) String
func (m MeasureType) String() string
String returns the measure type's wire spelling ("length", "area", "distance", "minDistance", "angle", "loopLength").
type Mechanical
Mechanical groups a material's structural properties. Units follow common mechanical-CAD conventions so values transfer 1:1 from existing material libraries. The yaml tags keep the on-disk document/library form readable (the tags are plain strings, so types still has no yaml dependency).
type Mechanical struct {
YoungsModulus float64 `json:"youngsModulus" yaml:"youngsModulus"` // GPa
PoissonsRatio float64 `json:"poissonsRatio" yaml:"poissonsRatio"` // dimensionless
YieldStrength float64 `json:"yieldStrength" yaml:"yieldStrength"` // MPa
UltimateTensileStrength float64 `json:"ultimateTensileStrength" yaml:"ultimateTensileStrength"` // MPa
}
type MeshResolution
MeshResolution selects the tessellation density of an exported mesh: coarser (low) to finer (high). It maps in the host to chord/angle tolerances — higher resolution yields more triangles for curved bodies (planar bodies are unaffected; they triangulate exactly). The zero value "" is treated as Medium.
Example:
req := wire.ExportRequest{Path: "p.stl", Format: "stl", Resolution: string(types.ResolutionHigh)}
type MeshResolution string
const (
// ResolutionLow is a coarse preview density.
ResolutionLow MeshResolution = "low"
// ResolutionMedium is the default display density.
ResolutionMedium MeshResolution = "medium"
// ResolutionHigh is a fine print/CAM density.
ResolutionHigh MeshResolution = "high"
)
func (MeshResolution) Normalized
func (r MeshResolution) Normalized() MeshResolution
Normalized maps the zero value to Medium, leaving any explicit value unchanged, so callers can treat an unset resolution as the sensible default.
type MessageSeverity
MessageSeverity grades a message-center entry (M05-F09, #616). The zero value is informational so a bare message is never accidentally an error.
type MessageSeverity uint8
const (
// SeverityInfo is a neutral notice.
SeverityInfo MessageSeverity = 0
// SeverityWarning flags a recoverable problem the user should know about.
SeverityWarning MessageSeverity = 1
// SeverityError flags a failure; the message center's error state turns on.
SeverityError MessageSeverity = 2
)
func (MessageSeverity) String
func (m MessageSeverity) String() string
String returns the severity's stable name ("info", "warning", "error").
type MiniToolbarControlKind
MiniToolbarControlKind is the kind of one declarative control on an in-canvas mini-toolbar — the MiniToolbarControlTypeEnum equivalent (M05-F07, #614). Like the dockable-window panel controls, a mini-toolbar is declared data the host renders, not a widget toolkit.
type MiniToolbarControlKind uint8
const (
// MiniToolbarButton is a clickable button (the zero value); clicks arrive as
// change events.
MiniToolbarButton MiniToolbarControlKind = 0
// MiniToolbarCheckbox is an on/off toggle.
MiniToolbarCheckbox MiniToolbarControlKind = 1
// MiniToolbarCombo is a pick-one dropdown of its Options.
MiniToolbarCombo MiniToolbarControlKind = 2
// MiniToolbarSlider is a numeric slider over [Min, Max].
MiniToolbarSlider MiniToolbarControlKind = 3
// MiniToolbarTextBox is a single-line text input.
MiniToolbarTextBox MiniToolbarControlKind = 4
// MiniToolbarValueEditor is a unit-aware numeric input: its text Value is an
// expression the host's parameter engine evaluates ("12 mm", "width/2").
MiniToolbarValueEditor MiniToolbarControlKind = 5
// MiniToolbarTextEditor is a multi-line text input.
MiniToolbarTextEditor MiniToolbarControlKind = 6
)
func (MiniToolbarControlKind) String
func (k MiniToolbarControlKind) String() string
String returns the kind's stable name.
type ModelDiameterFromThread
ModelDiameterFromThread selects which diameter of a thread definition the modeled cylindrical face represents (#325 parity).
type ModelDiameterFromThread int32
const (
ThreadMajorDiameter ModelDiameterFromThread = 21761
ThreadMinorDiameter ModelDiameterFromThread = 21762
ThreadPitchDiameter ModelDiameterFromThread = 21763
ThreadTapDrillDiameter ModelDiameterFromThread = 21764
)
func ParseModelDiameterFromThread
func ParseModelDiameterFromThread(s string) (ModelDiameterFromThread, bool)
ParseModelDiameterFromThread resolves a wire spelling back to its value.
func (ModelDiameterFromThread) String
func (t ModelDiameterFromThread) String() string
String returns the model diameter's wire spelling.
type ModelValueType
ModelValueType selects which value within a tolerance band the model actually consumes when recomputing (parity: ModelValueTypeEnum). The numeric values are frozen at the reference API's ids and must never be renumbered.
type ModelValueType int32
const (
// ModelValueNominal uses the authored value, ignoring the tolerance band.
ModelValueNominal ModelValueType = 31489
// ModelValueLower uses nominal + the lower deviation.
ModelValueLower ModelValueType = 31490
// ModelValueUpper uses nominal + the upper deviation.
ModelValueUpper ModelValueType = 31491
// ModelValueMedian uses nominal + the midpoint of the deviation band.
ModelValueMedian ModelValueType = 31492
)
func ParseModelValueType
func ParseModelValueType(s string) (ModelValueType, bool)
ParseModelValueType resolves a wire spelling back to its ModelValueType.
func (ModelValueType) String
func (m ModelValueType) String() string
String returns the model-value type's wire spelling.
type MoveOperationType
MoveOperationType discriminates one entry in a Move feature's ordered operation list (M20·F20 parity). A move definition composes a sequence of independently parametric operations rather than a single baked transform, so "rotate 30° about this edge then slide 5 mm along it" round-trips as two separately driven operations. The reference API models these as typed operation objects (free-drag / move-along-ray / rotate-about-line) with no numeric enum; the string values are the stable wire vocabulary — treat them as frozen.
This is the canonical, Apache-2.0 definition; the GPL implementation maps each to its model operation builder.
type MoveOperationType string
const (
// MoveFreeDrag offsets the body by explicit X/Y/Z distances.
MoveFreeDrag MoveOperationType = "freeDrag"
// MoveAlongRay slides the body a distance along a direction entity.
MoveAlongRay MoveOperationType = "alongRay"
// MoveRotateAboutLine rotates the body by an angle about an axis entity.
MoveRotateAboutLine MoveOperationType = "rotateAboutLine"
)
func AllMoveOperationTypes
func AllMoveOperationTypes() []MoveOperationType
AllMoveOperationTypes returns every move-operation type in definition order — the source list for a builder or a schema enum.
func (MoveOperationType) IsValid
func (t MoveOperationType) IsValid() bool
IsValid reports whether t is a defined move-operation type.
type NewFileMetadata
NewFileMetadata is the typed "new file" descriptor consumed by operations that mint a file the user never explicitly created — save-copy-as targets today; model-state and member exports later (M03-F09, Oblikovati/Oblikovati#610). Zero-value fields inherit from the source document of the operation.
type NewFileMetadata struct {
// FileName is the target full file name, when the operation does not
// already carry one.
FileName string `json:"fileName,omitempty"`
// DisplayName overrides the new file's display name.
DisplayName string `json:"displayName,omitempty"`
// TemplateFile seeds the new file from a template package.
TemplateFile string `json:"templateFile,omitempty"`
// SubType stamps the new file with a flavored document subtype id.
SubType string `json:"subType,omitempty"`
}
type NormalBindingEnum
NormalBindingEnum is how a primitive's normals bind to its geometry: per-vertex (smooth), per-strip, per-item, or one overall normal. Frozen ids 19713–19716.
type NormalBindingEnum int32
const (
// PerVertexNormals binds one normal per vertex — smooth shading (19713).
PerVertexNormals NormalBindingEnum = 19713
// PerStripNormals binds one normal per strip (19714).
PerStripNormals NormalBindingEnum = 19714
// PerItemNormals binds one normal per item (19715).
PerItemNormals NormalBindingEnum = 19715
// OverallNormal binds one normal to the whole primitive (19716).
OverallNormal NormalBindingEnum = 19716
)
func AllNormalBindings
func AllNormalBindings() []NormalBindingEnum
AllNormalBindings returns every defined normal binding.
func (NormalBindingEnum) IsValid
func (n NormalBindingEnum) IsValid() bool
IsValid reports whether n is a defined normal binding.
func (NormalBindingEnum) String
func (n NormalBindingEnum) String() string
String returns the normal-binding's user-facing name.
type ObjectKind
ObjectKind identifies the kind of document object a metadata-mutation event concerns (Oblikovati/Oblikovati#1644): a body, sketch, feature, occurrence, or the document itself. It is the discriminator carried by object.renamed and property.changed so ONE generic event serves every rename / property change instead of a bespoke event per mutation — an add-in matches on Kind to route the event to the right mirror of the document structure.
type ObjectKind string
const (
// ObjectKindBody is a solid/surface body in a part.
ObjectKindBody ObjectKind = "body"
// ObjectKindSketch is a 2D or 3D sketch.
ObjectKindSketch ObjectKind = "sketch"
// ObjectKindFeature is a history feature (extrude, fillet, work plane, …).
ObjectKindFeature ObjectKind = "feature"
// ObjectKindOccurrence is an assembly component occurrence.
ObjectKindOccurrence ObjectKind = "occurrence"
// ObjectKindDocument is the document itself.
ObjectKindDocument ObjectKind = "document"
)
type ObjectRef
ObjectRef identifies one host-owned object across the contract: the numeric id every wire surface already hands out, qualified by the stable camelCase kind name ("sketchLine", "extrudeFeature", …) so heterogeneous collections stay self-describing (M00-F05, #601). The kind is an open string, not a frozen enum: each surface documents its kind names, and a collection can mix kinds the way the reference ObjectCollection mixes object types.
type ObjectRef struct {
Kind string `json:"kind"`
ID uint64 `json:"id"`
}
func NewObjectRef
func NewObjectRef(kind string, id uint64) ObjectRef
NewObjectRef builds a reference from a kind name and host id.
type OffsetCornerClosureType
OffsetCornerClosureType selects how a planar wire offset closes a gap corner (Wire.OffsetPlanarWire).
type OffsetCornerClosureType int32
const (
// CircularCornerClosure rounds the gap with an arc about the corner.
CircularCornerClosure OffsetCornerClosureType = 96257
// LinearCornerClosure extends both sides tangentially to a miter.
LinearCornerClosure OffsetCornerClosureType = 96258
// ExtendCornerClosure grows the actual curves (an arc stays an arc).
ExtendCornerClosure OffsetCornerClosureType = 96259
)
func ParseOffsetCornerClosureType
func ParseOffsetCornerClosureType(s string) (OffsetCornerClosureType, bool)
ParseOffsetCornerClosureType resolves a wire spelling back to its closure.
func (OffsetCornerClosureType) String
func (c OffsetCornerClosureType) String() string
String returns the closure's wire spelling.
type OrbitTypeEnum
OrbitTypeEnum is how the orbit gesture is constrained: a free (trackball) orbit or a constrained (turntable) orbit about vertical. Frozen ids 86017–86018.
type OrbitTypeEnum int32
const (
// FreeOrbit is an unconstrained trackball orbit (86017).
FreeOrbit OrbitTypeEnum = 86017
// ConstrainedOrbit is a turntable orbit constrained about vertical (86018).
ConstrainedOrbit OrbitTypeEnum = 86018
)
func AllOrbitTypes
func AllOrbitTypes() []OrbitTypeEnum
AllOrbitTypes returns every defined orbit type.
func (OrbitTypeEnum) IsValid
func (o OrbitTypeEnum) IsValid() bool
IsValid reports whether o is a defined orbit type.
func (OrbitTypeEnum) String
func (o OrbitTypeEnum) String() string
String returns the orbit-type's user-facing name.
type OrientedBox
OrientedBox is a box aligned to its own orthonormal frame: corner point plus three edge DIRECTIONS with per-axis extents (the reference's corner+vectors form, expressed with the unit/length split kept explicit).
type OrientedBox struct {
Corner Point `json:"corner"`
XAxis UnitVector `json:"xAxis"`
YAxis UnitVector `json:"yAxis"`
ZAxis UnitVector `json:"zAxis"`
Extents Vector `json:"extents"` // edge lengths along the three axes
}
func (OrientedBox) Corners
func (b OrientedBox) Corners() [8]Point
Corners returns the eight corner points.
type PanelControlKind
PanelControlKind is the kind of one declarative control inside an add-in panel surface (a dockable window; also mini-toolbars, M05-F07). A panel is declared data the host renders, not a widget toolkit (M05-F03, #247). The editable kinds mirror a conventional mini-toolbar control set (check box / combo box / dropdown / value editor / slider / text box) so add-ins get a familiar form vocabulary. Each editable control carries an ID; when the user changes it the host pushes a [PanelValueChangedEvent] to the add-in.
type PanelControlKind uint8
const (
// PanelLabel is a static text row (the zero value).
PanelLabel PanelControlKind = 0
// PanelButton is a clickable button that executes the command it names — the
// add-in observes the click through the ordinary command-ended event.
PanelButton PanelControlKind = 1
// PanelSeparator is a horizontal rule between control groups.
PanelSeparator PanelControlKind = 2
// PanelTextBox is a single-line free-text input (Value = current text).
PanelTextBox PanelControlKind = 3
// PanelValueEditor is a unit-bearing numeric value editor for a dimension/parameter
// (Value = a unit expression, e.g. "46.7 mm"); the natural input for parametric drivers.
PanelValueEditor PanelControlKind = 4
// PanelCheckBox is a boolean toggle (Value = "true"/"false").
PanelCheckBox PanelControlKind = 5
// PanelDropdown selects exactly one of Options (Value = the selected item).
PanelDropdown PanelControlKind = 6
// PanelComboBox is an editable dropdown: pick from Options or type a value (Value = text).
PanelComboBox PanelControlKind = 7
// PanelSlider is a bounded numeric slider (Value = number, bounded by Min/Max, step Step).
PanelSlider PanelControlKind = 8
// PanelGrid is a container that lays its Children out in a CSS-grid-like grid: Columns
// declares the column tracks, each child may carry a Cell placement, otherwise children
// auto-flow left-to-right wrapping at the column count (ADR-0019). Rows are content-height.
PanelGrid PanelControlKind = 9
// PanelGroup is a titled box (Title is the caption) that stacks its Children vertically —
// the QGroupBox of this vocabulary.
PanelGroup PanelControlKind = 10
// PanelTabs is a tab strip: each direct child is one tab whose Title is the tab caption and
// whose own content (typically a grid or group) is the pane.
PanelTabs PanelControlKind = 11
// PanelReferenceList is a list of picked host geometry references (faces/edges/
// vertices) with host-driven Add-from-selection and per-row Remove. Rows holds the
// current refs; Accepts limits which selection kinds may be added (empty = any).
// Editing the rows pushes a [PanelReferencesChangedEvent] — NOT the scalar
// PanelValueChangedEvent — because the value is a set, not one string.
PanelReferenceList PanelControlKind = 12
)
func (PanelControlKind) String
func (k PanelControlKind) String() string
String returns the kind's stable name.
type ParamAnomaly
ParamAnomaly reports the irregularities of one parameter direction: whether the parameterization wraps (and with what period), hits singular points (a sphere pole, a cone apex, a polyline corner), or runs unbounded.
type ParamAnomaly struct {
Periodic bool `json:"periodic,omitempty"`
Period float64 `json:"period,omitempty"`
Singular bool `json:"singular,omitempty"`
Unbounded bool `json:"unbounded,omitempty"`
}
type ParameterDisplayFormat
ParameterDisplayFormat is how a parameter's numeric value is rendered for display (parity: ParameterDisplayFormatEnum). It affects presentation only, never the stored or model value. 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).
type ParameterDisplayFormat int32
const (
DisplayFormatDecimal ParameterDisplayFormat = 92417
DisplayFormatFractional ParameterDisplayFormat = 92418
DisplayFormatArchitectural ParameterDisplayFormat = 92419
)
func ParseParameterDisplayFormat
func ParseParameterDisplayFormat(s string) (ParameterDisplayFormat, bool)
ParseParameterDisplayFormat resolves a wire spelling back to its ParameterDisplayFormat.
func (ParameterDisplayFormat) String
func (f ParameterDisplayFormat) String() string
String returns the display format's wire spelling.
type ParameterGroupKey
ParameterGroupKey is the immutable, locale-stable internal name that identifies a custom parameter group for its whole life (M02-F05, Oblikovati/Oblikovati#604). The editable, localizable display name lives beside it; persistence, wire methods, and membership all address a group by this key, so renaming the display never breaks references.
key := types.ParameterGroupKey("com.example.gears:ratios")
type ParameterGroupKey string
func (ParameterGroupKey) String
func (k ParameterGroupKey) String() string
String returns the key's raw spelling.
type ParameterKind
ParameterKind is a parameter's category, with stable explicit ids. Model/User/Table parameters are user-editable; Reference (driven by geometry) and Derived (linked from another document) are read-only.
This is the canonical, Apache-2.0 definition; the GPL implementation aliases it (model/param.ParameterKind) so existing call sites are unaffected.
type ParameterKind uint8
const (
ModelParam ParameterKind = 1
UserParam ParameterKind = 2
ReferenceParam ParameterKind = 3
DerivedParam ParameterKind = 4
TableParam ParameterKind = 5
)
func (ParameterKind) Editable
func (k ParameterKind) Editable() bool
Editable reports whether a user may set this kind's expression/value (Model, User and Table parameters are editable; Reference and Derived are read-only).
func (ParameterKind) String
func (k ParameterKind) String() string
String returns the kind's name.
type PatternBoundaryInclusion
PatternBoundaryInclusion decides whether an occurrence inside/outside a bounding profile is kept, by which point of the occurrence is tested (parity: PatternBoundaryInclusionEnum).
type PatternBoundaryInclusion int32
const (
// IncludeEnclosedGeometry keeps an occurrence whose whole geometry is enclosed.
IncludeEnclosedGeometry PatternBoundaryInclusion = 128769
// IncludeByCentroid keeps an occurrence whose centroid is enclosed.
IncludeByCentroid PatternBoundaryInclusion = 128770
// IncludeByBasePoint keeps an occurrence whose base point is enclosed.
IncludeByBasePoint PatternBoundaryInclusion = 128771
)
func ParsePatternBoundaryInclusion
func ParsePatternBoundaryInclusion(s string) (PatternBoundaryInclusion, bool)
ParsePatternBoundaryInclusion resolves a wire spelling back to its inclusion rule.
func (PatternBoundaryInclusion) String
func (t PatternBoundaryInclusion) String() string
String returns the boundary-inclusion's wire spelling.