Pular para o conteúdo principal

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

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.

type PatternComputeType

PatternComputeType selects how each occurrence's geometry is computed (parity: PatternComputeTypeEnum).

type PatternComputeType int32

const (
// ComputeIdentical creates every occurrence identically to the seed (fastest).
ComputeIdentical PatternComputeType = 47361
// ComputeAdjustToModel recomputes each occurrence against the model it lands on.
ComputeAdjustToModel PatternComputeType = 47362
// ComputeOptimized reuses one body transformed into place (lightest representation).
ComputeOptimized PatternComputeType = 47363
)

func ParsePatternComputeType

func ParsePatternComputeType(s string) (PatternComputeType, bool)

ParsePatternComputeType resolves a wire spelling back to its compute type.

func (PatternComputeType) String

func (t PatternComputeType) String() string

String returns the compute type's wire spelling.

type PatternOrientation

PatternOrientation selects how each occurrence is rotated relative to the seed (parity: PatternOrientationEnum).

type PatternOrientation int32

const (
// OrientIdentical keeps every occurrence in the seed's orientation.
OrientIdentical PatternOrientation = 33793
// OrientToDirection1 rotates occurrences to follow the first pattern direction.
OrientToDirection1 PatternOrientation = 33794
// OrientToDirection2 rotates occurrences to follow the second pattern direction.
OrientToDirection2 PatternOrientation = 33795
)

func ParsePatternOrientation

func ParsePatternOrientation(s string) (PatternOrientation, bool)

ParsePatternOrientation resolves a wire spelling back to its orientation.

func (PatternOrientation) String

func (t PatternOrientation) String() string

String returns the orientation's wire spelling.

type PatternPositioningMethod

PatternPositioningMethod selects how occurrences are positioned along a direction (parity: PatternPositioningMethodEnum).

type PatternPositioningMethod int32

const (
// PositionFitted distributes occurrences evenly across the span.
PositionFitted PatternPositioningMethod = 113409
// PositionIncremental steps occurrences by the spacing increment.
PositionIncremental PatternPositioningMethod = 113410
)

func ParsePatternPositioningMethod

func ParsePatternPositioningMethod(s string) (PatternPositioningMethod, bool)

ParsePatternPositioningMethod resolves a wire spelling back to its positioning method.

func (PatternPositioningMethod) String

func (t PatternPositioningMethod) String() string

String returns the positioning method's wire spelling.

type PatternSpacingType

PatternSpacingType interprets a pattern direction's spacing value (parity: PatternSpacingTypeEnum).

type PatternSpacingType int32

const (
// SpacingBetween places occurrences a fixed distance apart (count + spacing).
SpacingBetween PatternSpacingType = 33537
// SpacingFitted fits all occurrences within a span (count + span).
SpacingFitted PatternSpacingType = 33538
// SpacingFitToPathLength fits occurrences along a curve's length (spacing + span).
SpacingFitToPathLength PatternSpacingType = 33539
)

func ParsePatternSpacingType

func ParsePatternSpacingType(s string) (PatternSpacingType, bool)

ParsePatternSpacingType resolves a wire spelling back to its spacing type.

func (PatternSpacingType) String

func (t PatternSpacingType) String() string

String returns the spacing type's wire spelling.

type PhysicalProperties

PhysicalProperties is the computed mass/geometry summary of a body or part given its material's density. Volume/area/centroid come from geometry; mass = density × volume. Lengths are in database units (cm), so volume is cm³, area cm², and — with density in g/cm³ — mass is grams.

type PhysicalProperties struct {
Mass float64 `json:"mass"` // g
Volume float64 `json:"volume"` // cm³
Area float64 `json:"area"` // cm²
Density float64 `json:"density"` // g/cm³
Centroid [3]float64 `json:"centroid"` // center of mass (cm)
}

type Point

Point is a 3D position. Lengths are in database units (cm), like every geometric quantity crossing the contract.

type Point struct {
X, Y, Z float64
}

func NewPoint

func NewPoint(x, y, z float64) Point

NewPoint builds a point from its coordinates (the TransientGeometry.CreatePoint equivalent for local computation).

func (Point) DistanceTo

func (p Point) DistanceTo(o Point) float64

DistanceTo returns the Euclidean distance to o.

func (Point) IsEqualTo

func (p Point) IsEqualTo(o Point, tol float64) bool

IsEqualTo reports coordinate-wise equality within tol.

func (Point) MarshalJSON

func (p Point) MarshalJSON() ([]byte, error)

MarshalJSON encodes the point as [x,y,z].

func (Point) Midpoint

func (p Point) Midpoint(o Point) Point

Midpoint returns the point halfway to o.

func (Point) TranslateBy

func (p Point) TranslateBy(v Vector) Point

TranslateBy returns p displaced by v.

func (*Point) UnmarshalJSON

func (p *Point) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes [x,y,z].

func (Point) VectorTo

func (p Point) VectorTo(o Point) Vector

VectorTo returns the displacement from p to o.

type Point2d

Point2d is a 2D position (sketch space).

type Point2d struct {
X, Y float64
}

func NewPoint2d

func NewPoint2d(x, y float64) Point2d

NewPoint2d builds a 2D point from its coordinates.

func (Point2d) DistanceTo

func (p Point2d) DistanceTo(o Point2d) float64

DistanceTo returns the Euclidean distance to o.

func (Point2d) IsEqualTo

func (p Point2d) IsEqualTo(o Point2d, tol float64) bool

IsEqualTo reports coordinate-wise equality within tol.

func (Point2d) MarshalJSON

func (p Point2d) MarshalJSON() ([]byte, error)

MarshalJSON encodes the point as [x,y].

func (Point2d) Midpoint

func (p Point2d) Midpoint(o Point2d) Point2d

Midpoint returns the point halfway to o.

func (Point2d) TranslateBy

func (p Point2d) TranslateBy(v Vector2d) Point2d

TranslateBy returns p displaced by v.

func (*Point2d) UnmarshalJSON

func (p *Point2d) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes [x,y].

func (Point2d) VectorTo

func (p Point2d) VectorTo(o Point2d) Vector2d

VectorTo returns the displacement from p to o.

type PointInferenceKind

PointInferenceKind is the snap a drag landed on — the PointInferenceEnum equivalent, narrowed to what the host infers today (work/datum points; the sketch-internal kinds stay in the sketch domain).

type PointInferenceKind uint8

const (
// InferenceNone is an unsnapped point (the zero value).
InferenceNone PointInferenceKind = 0
// InferencePoint snapped to a datum/work point.
InferencePoint PointInferenceKind = 1
)

func (PointInferenceKind) String

func (k PointInferenceKind) String() string

String returns the inference kind's stable name.

type PointRenderStyleEnum

PointRenderStyleEnum is the glyph a point primitive draws (the full reference set; the compact GraphicsPointStyle strings are the bulk-transport subset). Frozen ids 20225–20235.

type PointRenderStyleEnum int32

const (
// XPointStyle draws a diagonal X (20225).
XPointStyle PointRenderStyleEnum = 20225
// CirclePointStyle draws an open circle (20226).
CirclePointStyle PointRenderStyleEnum = 20226
// DimCircularPointStyle draws a dim circle (20227).
DimCircularPointStyle PointRenderStyleEnum = 20227
// FilledCirclePointStyle draws a filled circle (20228).
FilledCirclePointStyle PointRenderStyleEnum = 20228
// FilledCircleSelectPointStyle draws a filled circle for selection (20229).
FilledCircleSelectPointStyle PointRenderStyleEnum = 20229
// CrossPointStyle draws an axis-aligned cross (20230).
CrossPointStyle PointRenderStyleEnum = 20230
// FilledCrossPointStyle draws a filled cross (20231).
FilledCrossPointStyle PointRenderStyleEnum = 20231
// OnCurvePointStyle draws the on-curve glyph (20232).
OnCurvePointStyle PointRenderStyleEnum = 20232
// NoSnapPointStyle draws the no-snap glyph (20233).
NoSnapPointStyle PointRenderStyleEnum = 20233
// EndPointStyle draws the endpoint glyph (20234).
EndPointStyle PointRenderStyleEnum = 20234
// CustomImagePointStyle draws a custom image (20235).
CustomImagePointStyle PointRenderStyleEnum = 20235
)

func AllPointRenderStyles

func AllPointRenderStyles() []PointRenderStyleEnum

AllPointRenderStyles returns every defined point render style.

func (PointRenderStyleEnum) IsValid

func (p PointRenderStyleEnum) IsValid() bool

IsValid reports whether p is a defined point render style.

func (PointRenderStyleEnum) String

func (p PointRenderStyleEnum) String() string

String returns the point-render-style's user-facing name.

type ProjectionDirection

ProjectionDirection names where a projected view sits relative to its base view; it also fixes the orthographic direction the projection looks from. The zero value is ProjectRight.

type ProjectionDirection int32

const (
// ProjectRight places the projected view to the right of the base (looking from the right).
ProjectRight ProjectionDirection = iota
// ProjectLeft places it to the left.
ProjectLeft
// ProjectUp places it above the base.
ProjectUp
// ProjectDown places it below the base.
ProjectDown
)

func ParseProjectionDirection

func ParseProjectionDirection(s string) (ProjectionDirection, bool)

ParseProjectionDirection resolves a wire spelling back to its direction.

func (ProjectionDirection) String

func (d ProjectionDirection) String() string

String returns the direction's wire spelling.

type ProjectionTypeEnum

ProjectionTypeEnum is a view's camera projection: orthographic (parallel), perspective, or perspective with the faces of the view cube drawn orthographically. The numeric ids are stable, frozen values (86273–86275).

First consumed by the display-settings new-window default; the views surface reuses it. This is the canonical Apache-2.0 definition; the GPL implementation aliases it.

type ProjectionTypeEnum int32

const (
// OrthographicProjection is a parallel (non-foreshortened) projection (86273).
OrthographicProjection ProjectionTypeEnum = 86273
// PerspectiveProjection is a perspective (foreshortened) projection (86274).
PerspectiveProjection ProjectionTypeEnum = 86274
// PerspectiveWithOrthoFacesProjection is perspective with ortho view-cube faces (86275).
PerspectiveWithOrthoFacesProjection ProjectionTypeEnum = 86275
)

func AllProjectionTypes

func AllProjectionTypes() []ProjectionTypeEnum

AllProjectionTypes returns every defined projection type.

func (ProjectionTypeEnum) IsValid

func (p ProjectionTypeEnum) IsValid() bool

IsValid reports whether p is a defined projection type.

func (ProjectionTypeEnum) String

func (p ProjectionTypeEnum) String() string

String returns the projection type's user-facing name.

type PromptRestriction

PromptRestriction is whether the user may suppress a prompt by remembering their answer — the PromptMessageRestrictionsEnum equivalent, narrowed to the two behaviors the host implements (M05-F09, #616).

type PromptRestriction uint8

const (
// PromptAlwaysAsk shows the prompt every time (the zero value).
PromptAlwaysAsk PromptRestriction = 0
// PromptAllowRemember offers a "remember my answer" choice; a remembered
// prompt resolves instantly from the stored answer until it is reset.
PromptAllowRemember PromptRestriction = 1
)

func (PromptRestriction) String

func (p PromptRestriction) String() string

String returns the restriction's stable name.

type RayTracingQualityEnum

RayTracingQualityEnum is the quality/speed tier of the ray-traced realistic display, from draft (fastest) to best (slowest). Frozen ids 95745–95750.

type RayTracingQualityEnum int32

const (
// InteractiveRayTracingQuality is the interactive (fast preview) tier (95745).
InteractiveRayTracingQuality RayTracingQualityEnum = 95745
// GoodRayTracingQuality is the good tier (95746).
GoodRayTracingQuality RayTracingQualityEnum = 95746
// BestRayTracingQuality is the best (slowest) tier (95747).
BestRayTracingQuality RayTracingQualityEnum = 95747
// LowRayTracingQuality is the low tier (95748).
LowRayTracingQuality RayTracingQualityEnum = 95748
// DraftRayTracingQuality is the draft (fastest) tier (95749).
DraftRayTracingQuality RayTracingQualityEnum = 95749
// HighRayTracingQuality is the high tier (95750).
HighRayTracingQuality RayTracingQualityEnum = 95750
)

func AllRayTracingQualities

func AllRayTracingQualities() []RayTracingQualityEnum

AllRayTracingQualities returns every defined ray-tracing-quality tier, draft→best.

func (RayTracingQualityEnum) IsValid

func (r RayTracingQualityEnum) IsValid() bool

IsValid reports whether r is a defined ray-tracing-quality tier.

func (RayTracingQualityEnum) String

func (r RayTracingQualityEnum) String() string

String returns the ray-tracing-quality tier's user-facing name.

type ReferenceStatus

ReferenceStatus is the resolution state of one file-to-file reference — the single status vocabulary shared by file descriptors (M03-F07), external-file attachments (M03-F08) and, later, drawing/assembly references (Oblikovati/Oblikovati#608).

The values are a frozen block matching the reference API's reference-status enum; never renumber them.

type ReferenceStatus int32

const (
// ReferenceUnknown means the reference has not been resolved yet (e.g. the
// owning file was opened deferred and nothing probed the target).
ReferenceUnknown ReferenceStatus = 49665
// ReferenceUpToDate means the referenced file was found and matches what
// the owner saved against.
ReferenceUpToDate ReferenceStatus = 49666
// ReferenceOutOfDate means the referenced file was found but has been
// saved since the owner last recorded it.
ReferenceOutOfDate ReferenceStatus = 49667
// ReferenceMissing means the referenced file cannot be found at any
// resolvable location.
ReferenceMissing ReferenceStatus = 49668
// ReferenceReplaced means the reference was re-pointed at another file
// (a repair) and the owner has not been saved since.
ReferenceReplaced ReferenceStatus = 49669
)

func ParseReferenceStatus

func ParseReferenceStatus(s string) (ReferenceStatus, bool)

ParseReferenceStatus resolves a wire spelling back to its ReferenceStatus.

func (ReferenceStatus) String

func (s ReferenceStatus) String() string

String returns the reference status's wire spelling.

type ReliefShape

ReliefShape names the cut placed at the ends of a bend (and at corners) so the material can fold without tearing the adjacent web. The zero value is ReliefRound.

type ReliefShape int32

const (
// ReliefRound cuts a rounded (filleted) notch at the bend end — the gentlest on the
// material and the default.
ReliefRound ReliefShape = iota
// ReliefSquare cuts a square notch — simplest to laser/punch, slightly more stress-prone.
ReliefSquare
// ReliefTear leaves no cut: the material tears along the bend end (no relief geometry).
ReliefTear
)

func ParseReliefShape

func ParseReliefShape(s string) (ReliefShape, bool)

ParseReliefShape resolves a wire spelling back to its relief shape.

func (ReliefShape) String

func (r ReliefShape) String() string

String returns the relief shape's wire spelling.

type RepresentationKind

RepresentationKind discriminates the three representation families.

type RepresentationKind uint32

const (
// RepresentationUnknown is the zero value: an unresolved or not-yet-typed representation.
RepresentationUnknown RepresentationKind = 0
// RepresentationDesignView overrides visibility, appearance, section planes, and the camera.
RepresentationDesignView RepresentationKind = 1
// RepresentationPositional overrides constraint/joint values (and per-occurrence flexibility).
RepresentationPositional RepresentationKind = 2
// RepresentationLevelOfDetail suppresses occurrences for performance on large assemblies.
RepresentationLevelOfDetail RepresentationKind = 3
)

func (RepresentationKind) IsValid

func (k RepresentationKind) IsValid() bool

IsValid reports whether k names a real representation family (not unknown).

func (RepresentationKind) String

func (k RepresentationKind) String() string

String returns a stable lowercase name. The value, not this name, is the persisted identity.

type Rgba

Rgba is a straight-alpha color with each channel in [0,1] — the shape Dear ImGui (ImVec4) and the head's draw overlays ([4]float32) both consume, so a theme color crosses to the renderer without conversion. It is plain data; helpers parse/format the "#RRGGBB[AA]" hex used in theme files and on the wire.

This is the canonical, Apache-2.0 definition; the GPL theme package aliases it (theme.Rgba = types.Rgba) so the head and renderer share one color type.

type Rgba struct {
R, G, B, A float32
}

func ParseHex

func ParseHex(s string) (Rgba, error)

ParseHex reads "#RRGGBB" (alpha defaults to opaque) or "#RRGGBBAA" into an Rgba. It errors, naming the offending string, on a missing "#", a bad length, or non-hex digits — so a hand-edited theme file fails loudly rather than rendering black.

func (Rgba) Array

func (c Rgba) Array() [4]float32

Array returns the color as the [4]float32 the head passes to ImGui and the renderer.

tint := theme.Color(types.TokenIconPrimary).Array() // [4]float32 for ImageButton

func (Rgba) Hex

func (c Rgba) Hex() string

Hex formats the color as "#RRGGBBAA" (lower-case), the form stored in theme files.

type RibbonKey

RibbonKey is the internal name of one of the host's ribbons. There is one ribbon per document type plus ZeroDoc (shown when no document is open); the active ribbon is selected by the active document. An add-in targets a ribbon by this name when placing a control. The names are stable wire values and must not be renamed.

This is the canonical, Apache-2.0 definition; the GPL implementation aliases it (app.RibbonKey) so existing call sites are unaffected.

type RibbonKey string

const (
// ZeroDocRibbon is shown when no document is open (the Get Started ribbon).
ZeroDocRibbon RibbonKey = "ZeroDoc"
// PartRibbon is shown for a part document.
PartRibbon RibbonKey = "Part"
// AssemblyRibbon is shown for an assembly document.
AssemblyRibbon RibbonKey = "Assembly"
// DrawingRibbon is shown for a drawing document.
DrawingRibbon RibbonKey = "Drawing"
// PresentationRibbon is shown for a presentation document.
PresentationRibbon RibbonKey = "Presentation"
// IFeaturesRibbon is shown for an iFeature authoring document.
IFeaturesRibbon RibbonKey = "iFeatures"
// UnknownDocumentRibbon is shown for a document whose type is not resolved.
UnknownDocumentRibbon RibbonKey = "UnknownDocument"
)

func (RibbonKey) Valid

func (k RibbonKey) Valid() bool

Valid reports whether k is one of the seven known ribbon names — used by the host to reject an add-in placing a control on a nonexistent ribbon.

type ScreenQuadrant

ScreenQuadrant is one slot of a radial marking menu — the ScreenQuadrantEnum equivalent (M05-F12, #619): eight directions around the cursor, clockwise from north.

type ScreenQuadrant uint8

const (
QuadrantNorth ScreenQuadrant = 0
QuadrantNorthEast ScreenQuadrant = 1
QuadrantEast ScreenQuadrant = 2
QuadrantSouthEast ScreenQuadrant = 3
QuadrantSouth ScreenQuadrant = 4
QuadrantSouthWest ScreenQuadrant = 5
QuadrantWest ScreenQuadrant = 6
QuadrantNorthWest ScreenQuadrant = 7
)

func (ScreenQuadrant) String

func (q ScreenQuadrant) String() string

String returns the quadrant's stable compass name.

type SectionPlane

SectionPlane is a clipping plane carried by a design-view representation: a point on the plane and a normal. When the representation is active the half-space on the normal side is clipped away (Flipped swaps which side is removed), revealing the model's interior.

type SectionPlane struct {
Origin Point `json:"origin"`
Normal Vector `json:"normal"`
Flipped bool `json:"flipped,omitempty"`
}

type ShadowDirectionEnum

ShadowDirectionEnum is the light source that casts the scene's shadows: a fixed 45°/overhead direction, one of the four standard lights, or the environment image. The numeric ids are stable, frozen values (92161–92168).

This is the canonical Apache-2.0 definition; the GPL implementation aliases it (app.ShadowDirectionEnum).

type ShadowDirectionEnum int32

const (
// FortyFiveDegreesLeftShadow casts from 45° to the left (92161).
FortyFiveDegreesLeftShadow ShadowDirectionEnum = 92161
// FortyFiveDegreesRightShadow casts from 45° to the right (92162).
FortyFiveDegreesRightShadow ShadowDirectionEnum = 92162
// AboveShadow casts straight down from above (92163).
AboveShadow ShadowDirectionEnum = 92163
// LightOneShadow follows light 1 (92164).
LightOneShadow ShadowDirectionEnum = 92164
// LightTwoShadow follows light 2 (92165).
LightTwoShadow ShadowDirectionEnum = 92165
// LightThreeShadow follows light 3 (92166).
LightThreeShadow ShadowDirectionEnum = 92166
// LightFourShadow follows light 4 (92167).
LightFourShadow ShadowDirectionEnum = 92167
// EnvironmentShadow follows the environment image's dominant light (92168).
EnvironmentShadow ShadowDirectionEnum = 92168
)

func AllShadowDirections

func AllShadowDirections() []ShadowDirectionEnum

AllShadowDirections returns every defined shadow direction, in picker order.

func (ShadowDirectionEnum) IsValid

func (d ShadowDirectionEnum) IsValid() bool

IsValid reports whether d is a defined shadow direction.

func (ShadowDirectionEnum) String

func (d ShadowDirectionEnum) String() string

String returns the shadow direction's user-facing name.

type SheetOrientation

SheetOrientation is how a sheet's standard dimensions are laid out. The zero value is SheetPortrait (width ≤ height); SheetLandscape swaps them.

type SheetOrientation int32

const (
// SheetPortrait lays the sheet out with width ≤ height (the table's natural form).
SheetPortrait SheetOrientation = iota
// SheetLandscape swaps the standard width and height (the usual drafting layout).
SheetLandscape
)

func ParseSheetOrientation

func ParseSheetOrientation(s string) (SheetOrientation, bool)

ParseSheetOrientation resolves a wire spelling back to its orientation.

func (SheetOrientation) String

func (o SheetOrientation) String() string

String returns the orientation's wire spelling ("portrait" / "landscape").

type SheetSize

SheetSize names a standard drawing sheet size. The zero value is SheetSizeCustom, whose dimensions come from the sheet's explicit width/height rather than the table.

Values are part of the wire contract via SheetSize.String; the names — not the ordinals — are what cross the wire, so reordering is safe but renaming is not.

type SheetSize int32

const (
// SheetSizeCustom takes its dimensions from the sheet's explicit width/height.
SheetSizeCustom SheetSize = iota
// SheetSizeA0 is ISO 216 A0 (841×1189 mm).
SheetSizeA0
// SheetSizeA1 is ISO 216 A1 (594×841 mm).
SheetSizeA1
// SheetSizeA2 is ISO 216 A2 (420×594 mm).
SheetSizeA2
// SheetSizeA3 is ISO 216 A3 (297×420 mm).
SheetSizeA3
// SheetSizeA4 is ISO 216 A4 (210×297 mm).
SheetSizeA4
// SheetSizeAnsiA is ANSI/ASME Y14.1 A (8.5×11 in).
SheetSizeAnsiA
// SheetSizeAnsiB is ANSI/ASME Y14.1 B (11×17 in).
SheetSizeAnsiB
// SheetSizeAnsiC is ANSI/ASME Y14.1 C (17×22 in).
SheetSizeAnsiC
// SheetSizeAnsiD is ANSI/ASME Y14.1 D (22×34 in).
SheetSizeAnsiD
// SheetSizeAnsiE is ANSI/ASME Y14.1 E (34×44 in).
SheetSizeAnsiE
)

func ParseSheetSize

func ParseSheetSize(s string) (SheetSize, bool)

ParseSheetSize resolves a wire spelling back to its sheet size.

sz, ok := types.ParseSheetSize("a3") // SheetSizeA3, true

func (SheetSize) String

func (s SheetSize) String() string

String returns the sheet size's wire spelling ("a3", "ansiC", "custom").

type ShrinkwrapEnvelopeStyle

ShrinkwrapEnvelopeStyle selects how kept parts are replaced by simpler proxy geometry — the reference API's envelopes-replace style. Envelopes erase internal detail (and, by construction, holes) so the result is a lightweight closed solid.

type ShrinkwrapEnvelopeStyle int32

const (
// EnvelopeNone keeps each kept part's real geometry.
EnvelopeNone ShrinkwrapEnvelopeStyle = iota
// EnvelopePerPart replaces each kept part with its axis-aligned bounding box.
EnvelopePerPart
// EnvelopeWhole replaces the entire kept set with one axis-aligned bounding box.
EnvelopeWhole
)

func ParseShrinkwrapEnvelopeStyle

func ParseShrinkwrapEnvelopeStyle(s string) (ShrinkwrapEnvelopeStyle, bool)

ParseShrinkwrapEnvelopeStyle resolves a wire spelling back to its ShrinkwrapEnvelopeStyle.

func (ShrinkwrapEnvelopeStyle) String

func (s ShrinkwrapEnvelopeStyle) String() string

String returns the envelope style's wire spelling.

type ShrinkwrapRemoveStyle

ShrinkwrapRemoveStyle selects which source parts a shrinkwrap drops before merging — the reference API's shrinkwrap remove style. Removal makes the result lighter by discarding parts a viewer never sees or that are too small to matter.

type ShrinkwrapRemoveStyle int32

const (
// RemoveNone keeps every part (the full, unsimplified set).
RemoveNone ShrinkwrapRemoveStyle = iota
// RemoveSmallParts drops parts whose body volume is below a threshold.
RemoveSmallParts
// RemoveInternalParts drops parts fully enclosed by other parts.
RemoveInternalParts
)

func ParseShrinkwrapRemoveStyle

func ParseShrinkwrapRemoveStyle(s string) (ShrinkwrapRemoveStyle, bool)

ParseShrinkwrapRemoveStyle resolves a wire spelling back to its ShrinkwrapRemoveStyle.

func (ShrinkwrapRemoveStyle) String

func (s ShrinkwrapRemoveStyle) String() string

String returns the remove style's wire spelling.

type Sketch3DEntityKind

Sketch3DEntityKind discriminates the kind of a 3D (non-planar) sketch entity in the wire protocol — the value of oblikovati.org/api/wire.AddSketch3DEntityArgs.Kind and of each enumerated 3D entity's Kind. The set is the full 3D-sketch geometry family; the string values are frozen. Members are wired in across M22 (F02 base curves, F03 conics/ splines, F04 helix, F11 surface-derived curves).

type Sketch3DEntityKind string

const (
Sketch3DEntityPoint Sketch3DEntityKind = "point"
Sketch3DEntityLine Sketch3DEntityKind = "line"
Sketch3DEntityCircle Sketch3DEntityKind = "circle"
Sketch3DEntityArc Sketch3DEntityKind = "arc"
Sketch3DEntityBend Sketch3DEntityKind = "bend"
Sketch3DEntityEllipse Sketch3DEntityKind = "ellipse"
Sketch3DEntityEllipticalArc Sketch3DEntityKind = "ellipticalArc"
Sketch3DEntitySpline Sketch3DEntityKind = "spline"
Sketch3DEntityControlPointSpline Sketch3DEntityKind = "controlPointSpline"
Sketch3DEntityFixedSpline Sketch3DEntityKind = "fixedSpline"
Sketch3DEntityEquationCurve Sketch3DEntityKind = "equationCurve"
Sketch3DEntityHelical Sketch3DEntityKind = "helical"
Sketch3DEntityIntersection Sketch3DEntityKind = "intersection"
Sketch3DEntityOnFace Sketch3DEntityKind = "onFace"
Sketch3DEntityProjectToSurface Sketch3DEntityKind = "projectToSurface"
Sketch3DEntitySilhouette Sketch3DEntityKind = "silhouette"
Sketch3DEntityOffset Sketch3DEntityKind = "offset"
// Included reference geometry (Include Geometry: a model vertex/edge linked into the
// 3D sketch, tracking its source — M22-F08).
Sketch3DEntityIncludedPoint Sketch3DEntityKind = "includedPoint"
Sketch3DEntityIncludedCurve Sketch3DEntityKind = "includedCurve"
// Sketch3DEntitySplineHandle is the tangency handle attached to one fit
// point of a 3D interpolation spline (M06-F11, Oblikovati/Oblikovati#626).
Sketch3DEntitySplineHandle Sketch3DEntityKind = "splineHandle"
Sketch3DEntityUnknown Sketch3DEntityKind = "unknown"
)

type SketchEntityKind

SketchEntityKind discriminates the kind of a 2D sketch entity in the wire protocol — the value of oblikovati.org/api/wire.AddSketchEntityArgs.Kind and of each enumerated entity's Kind. The set grows as M21 adds entity families (conics/splines, slots, polygons, …); the string values are frozen.

type SketchEntityKind string

const (
SketchEntityLine SketchEntityKind = "line"
SketchEntityPoint SketchEntityKind = "point"
SketchEntityCircle SketchEntityKind = "circle"
SketchEntityArc SketchEntityKind = "arc"
SketchEntityEllipse SketchEntityKind = "ellipse"
SketchEntityEllipticalArc SketchEntityKind = "ellipticalArc"
// SketchEntitySpline interpolates its points (a fit spline);
// SketchEntityControlPointSpline approximates them (a control-point spline, the 2D
// analog of Sketch3DEntityControlPointSpline). sketch.addEntity accepts either kind;
// enumeration reports which mode a spline is in (Oblikovati/Oblikovati#150).
SketchEntitySpline SketchEntityKind = "spline"
SketchEntityControlPointSpline SketchEntityKind = "controlPointSpline"
SketchEntityRectangle SketchEntityKind = "rectangle"
SketchEntityPolygon SketchEntityKind = "polygon"
SketchEntitySlot SketchEntityKind = "slot"
SketchEntityFillet SketchEntityKind = "fillet"
SketchEntityChamfer SketchEntityKind = "chamfer"
SketchEntityImage SketchEntityKind = "image"
SketchEntityFillRegion SketchEntityKind = "fillRegion"
SketchEntityText SketchEntityKind = "text"
SketchEntityEquationCurve SketchEntityKind = "equationCurve"
SketchEntityFixedSpline SketchEntityKind = "fixedSpline"
SketchEntityOffsetSpline SketchEntityKind = "offsetSpline"
SketchEntityProjectedPoint SketchEntityKind = "projectedPoint"
SketchEntityProjectedCurve SketchEntityKind = "projectedCurve"
// SketchEntitySplineHandle is the tangency handle attached to one fit
// point of an interpolation spline (M06-F11, Oblikovati/Oblikovati#626).
SketchEntitySplineHandle SketchEntityKind = "splineHandle"
SketchEntityUnknown SketchEntityKind = "unknown"
)

type SketchLineType

SketchLineType is a sketch's line-style override. The empty value means "inherit the document default". String values are frozen.

type SketchLineType string

const (
SketchLineContinuous SketchLineType = "continuous"
SketchLineDashed SketchLineType = "dashed"
SketchLineHidden SketchLineType = "hidden"
SketchLineCenter SketchLineType = "center"
SketchLinePhantom SketchLineType = "phantom"
// SketchLineCustom is a definition loaded from an industry-standard .lin
// line-type file via sketch.setCustomLineType; it is set by that method,
// not directly through sketch.setProperty.
SketchLineCustom SketchLineType = "custom"
)

type SketchPatternKind

SketchPatternKind discriminates a sketch pattern. String values are frozen.

type SketchPatternKind string

const (
SketchPatternRectangular SketchPatternKind = "rectangular"
SketchPatternCircular SketchPatternKind = "circular"
)

type SketchPointInferenceKind

SketchPointInferenceKind describes how a placed sketch point was inferred from nearby geometry (M06-F10, Oblikovati/Oblikovati#625). This is the sketch-domain inference vocabulary; the host-level drag-snap kind stays in PointInferenceKind.

The values are a frozen block matching the reference API's point-inference enum; never renumber them.

type SketchPointInferenceKind int32

const (
// SketchInferenceAtIntersection placed the point at two curves' crossing.
SketchInferenceAtIntersection SketchPointInferenceKind = 22273
// SketchInferenceOnCurve placed the point on a curve's body.
SketchInferenceOnCurve SketchPointInferenceKind = 22274
// SketchInferenceOnPoint snapped the point onto an existing sketch point.
SketchInferenceOnPoint SketchPointInferenceKind = 22275
// SketchInferenceAtMidpoint placed the point at a curve's midpoint.
SketchInferenceAtMidpoint SketchPointInferenceKind = 22276
)

func ParseSketchPointInferenceKind

func ParseSketchPointInferenceKind(s string) (SketchPointInferenceKind, bool)

ParseSketchPointInferenceKind resolves a wire spelling back to its kind.

func (SketchPointInferenceKind) String

func (k SketchPointInferenceKind) String() string

String returns the inference kind's wire spelling.

type SketchSettings

SketchSettings is a part document's persisted sketch-authoring defaults (#147) — the per-document surface of the Document Settings dialog's Sketch tab. It lifts the constraint-inference preferences that were previously session-only into the document (persisted in the .obk), so each part keeps its own: whether inference snaps points and auto-applies constraints while sketching, and which constraint family wins when two could apply. (3D-sketch and modeling settings are separate future objects; this starts with the inference toggles the sketch tools already read.)

type SketchSettings struct {
// InferConstraints runs point snapping (endpoint → existing point, intersection, midpoint, …)
// while sketching, surfacing inferred relations.
InferConstraints bool `json:"inferConstraints"`
// AutoApplyConstraints commits the inferred constraints automatically as geometry is placed
// (off leaves the snap as a hint without persisting the relation).
AutoApplyConstraints bool `json:"autoApplyConstraints"`
// ConstraintPriority picks the constraint family when the inference engine could apply either.
ConstraintPriority ConstraintInferencePriority `json:"constraintPriority"`
}

func DefaultSketchSettings

func DefaultSketchSettings() SketchSettings

DefaultSketchSettings is the out-of-the-box configuration: inference and auto-apply on, with horizontal/vertical preferred — matching a new document's behaviour before this surface existed.

type SketchTextStyle

SketchTextStyle is the renderable description of a sketch text entity: the content plus the type-setting parameters MCAD apps split across a text box + text style (font Family, FontSize in cm, the character Height in cm that scales the glyph em, the Rotation about the anchor in radians CCW, and horizontal/vertical alignment). It is the value carried by the wire DTOs and the typed client so an add-in can author/edit text without re-deriving the field set.

Example: SketchTextStyle{Content: "PART A", Family: "Liberation Sans", FontSize: 0.5, Height: 0.5, HAlign: TextAlignCenter, VAlign: TextAlignBaseline}.

type SketchTextStyle struct {
Content string `json:"content"`
Family string `json:"family,omitempty"` // font family ("" ⇒ document default)
FontSize float64 `json:"fontSize,omitempty"` // cm; 0 ⇒ track Height
Height float64 `json:"height"` // character (em) height in cm
Rotation float64 `json:"rotation,omitempty"` // radians CCW about the anchor
HAlign TextHorizontalAlign `json:"hAlign,omitempty"`
VAlign TextVerticalAlign `json:"vAlign,omitempty"`
}

type SolutionNature

SolutionNature classifies the solution set of a geometric query such as closest-point: how many equally good answers exist.

type SolutionNature int32

const (
// UnknownSolutionNature means no solution strategy could be determined.
UnknownSolutionNature SolutionNature = 0
// UniqueSolution means there is exactly one solution.
UniqueSolution SolutionNature = 1
// DistinctlyManySolutions means finitely many, equally good solutions exist.
DistinctlyManySolutions SolutionNature = 2
// InfinitelyManySolutions means a continuum of equally good solutions exists
// (e.g. the closest point to a circle queried from its center).
InfinitelyManySolutions SolutionNature = 3
// NoSolution means no solution exists.
NoSolution SolutionNature = 4
)

func (SolutionNature) String

func (n SolutionNature) String() string

String returns the classification's stable name.

type SplineFitMethod

SplineFitMethod selects the parameterization an interpolation spline uses to fit its points (M06-F11, Oblikovati/Oblikovati#626). The default is SplineFitSmooth, which matches the behavior shipped before the field existed.

The values are a frozen block matching the reference API's spline-fit enum; never renumber them.

type SplineFitMethod int32

const (
// SplineFitSmooth uses centripetal parameterization (the default).
SplineFitSmooth SplineFitMethod = 26369
// SplineFitSweet uses minimum-energy fitting.
SplineFitSweet SplineFitMethod = 26370
// SplineFitChord uses chord-length parameterization — the reference
// API's third, legacy-drafting-compatible fit method.
SplineFitChord SplineFitMethod = 26371
)

func ParseSplineFitMethod

func ParseSplineFitMethod(s string) (SplineFitMethod, bool)

ParseSplineFitMethod resolves a wire spelling back to its method.

func (SplineFitMethod) String

func (m SplineFitMethod) String() string

String returns the fit method's wire spelling.

type SplitType

SplitType is the kind of split a split feature performed: trim a solid to one side of the tool, split its faces only (imprint), or split the body into separate solids. The reference declares kSplitPart sharing id 32769 with kTrimSolid; "trimSolid" is the canonical spelling here.

type SplitType int32

const (
TrimSolidSplit SplitType = 32769
SplitFacesSplit SplitType = 32770
SplitBodySplit SplitType = 32771
)

func ParseSplitType

func ParseSplitType(s string) (SplitType, bool)

ParseSplitType resolves a wire spelling back to its type.

func (SplitType) String

func (t SplitType) String() string

String returns the split type's wire spelling.

type StartupActionType

StartupActionType is what the application opens with — the StartupActionTypeEnum equivalent, narrowed to the actions the host implements (M05-F11, #618). The zero value preserves the historical behavior: a fresh part document ready to model in.

type StartupActionType uint8

const (
// StartupNewPart opens a new part document at launch (the default).
StartupNewPart StartupActionType = 0
// StartupEmptyWorkspace opens with no document — the Get Started (ZeroDoc)
// ribbon, for users who always begin from File ▸ Open.
StartupEmptyWorkspace StartupActionType = 1
)

func (StartupActionType) String

func (a StartupActionType) String() string

String returns the action's stable name ("new-part", "empty").

type StyleLocationEnum

StyleLocationEnum is where a style lives in the cascade: in both the document and the style library, only locally in the document, or only in the library. A local style overrides the library style of the same name. The numeric ids are stable, frozen values (51201–51203).

This is the canonical Apache-2.0 definition; the GPL implementation aliases it.

type StyleLocationEnum int32

const (
// BothStyleLocation: the style exists in both the document and the library (51201).
BothStyleLocation StyleLocationEnum = 51201
// LocalStyleLocation: the style exists only locally in the document (51202).
LocalStyleLocation StyleLocationEnum = 51202
// LibraryStyleLocation: the style exists only in the style library (51203).
LibraryStyleLocation StyleLocationEnum = 51203
)

func AllStyleLocations

func AllStyleLocations() []StyleLocationEnum

AllStyleLocations returns every defined style location.

func (StyleLocationEnum) IsValid

func (s StyleLocationEnum) IsValid() bool

IsValid reports whether s is a defined style location.

func (StyleLocationEnum) String

func (s StyleLocationEnum) String() string

String returns the style-location's user-facing name.

type SurfaceContinuity

SurfaceContinuity is the geometric-continuity order a Class-A surfacing operation holds to its neighbours across a seam: G0 (position), G1 (tangent), G2 (curvature), G3 (curvature-rate). It is the public vocabulary for operations that take a continuity choice — the boundary fill (M36-F07), and reusable by match/extend. It is a string enum so it reads self-describingly on the wire; the kernel maps it to its internal derivative order via SurfaceContinuity.Order.

type SurfaceContinuity string

const (
// ContinuityG0 holds position only (the surfaces meet at the seam; tangents may break).
ContinuityG0 SurfaceContinuity = "g0"
// ContinuityG1 holds tangency (a shared tangent plane along the seam).
ContinuityG1 SurfaceContinuity = "g1"
// ContinuityG2 holds curvature (no curvature jump across the seam) — the common Class-A choice.
ContinuityG2 SurfaceContinuity = "g2"
// ContinuityG3 holds curvature-rate (a level beyond G2).
ContinuityG3 SurfaceContinuity = "g3"
)

func ParseSurfaceContinuity

func ParseSurfaceContinuity(s string, fallback SurfaceContinuity) (SurfaceContinuity, bool)

ParseSurfaceContinuity resolves a wire spelling to a continuity; the empty string maps to the supplied fallback so a caller can pick its own default (e.g. the fill op defaults to G2).

func (SurfaceContinuity) Order

func (c SurfaceContinuity) Order() int

Order returns the derivative order the continuity imposes: G0→0, G1→1, G2→2, G3→3. An empty or unrecognized value returns -1 (use ParseSurfaceContinuity to validate and default first).

func (SurfaceContinuity) String

func (c SurfaceContinuity) String() string

String returns the continuity's wire spelling.

type SurfaceGeometryForm

SurfaceGeometryForm is the surface representation classification (flag values, frozen to the reference).

type SurfaceGeometryForm int32

const (
SurfaceFormClosedUVLoops SurfaceGeometryForm = 1
SurfaceFormNotClosedUVLoops SurfaceGeometryForm = 2
SurfaceFormNURBS SurfaceGeometryForm = 4
SurfaceFormNotNURBS SurfaceGeometryForm = 8
SurfaceFormProceduralToNURBS SurfaceGeometryForm = 16
)

type SurfaceType

SurfaceType identifies a transient surface's concrete kind.

type SurfaceType int32

const (
UnknownSurface SurfaceType = 5889
PlaneSurface SurfaceType = 5890
CylinderSurface SurfaceType = 5891
EllipticalCylinderSurface SurfaceType = 5892
ConeSurface SurfaceType = 5893
EllipticalConeSurface SurfaceType = 5894
TorusSurface SurfaceType = 5895
SphereSurface SurfaceType = 5896
BSplineSurfaceKind SurfaceType = 5897
)

func (SurfaceType) String

func (t SurfaceType) String() string

String returns the kind's stable name.

type SweepDefinitionType

SweepDefinitionType discriminates the sweep definition union.

type SweepDefinitionType int32

const (
PathSweepDef SweepDefinitionType = 59137
PathAndGuideRailSweepDef SweepDefinitionType = 59138
PathAndGuideSurfaceSweepDef SweepDefinitionType = 59139
PathAndSectionTwistsSweepDef SweepDefinitionType = 59140
// SolidSweepDef sweeps a tool BODY along the path (the reference
// SolidSweepDefinition) — Oblikovati extension id.
SolidSweepDef SweepDefinitionType = 59141
)

func ParseSweepDefinitionType

func ParseSweepDefinitionType(s string) (SweepDefinitionType, bool)

ParseSweepDefinitionType resolves a wire spelling back to its type.

func (SweepDefinitionType) String

func (t SweepDefinitionType) String() string

String returns the definition type's wire spelling.

type SweepProfileOrientation

SweepProfileOrientation controls how the profile rides the path.

type SweepProfileOrientation int32

const (
// NormalToPath keeps the profile perpendicular to the path tangent.
NormalToPath SweepProfileOrientation = 59649
// ParallelToOriginalProfile translates the profile without rotating it.
ParallelToOriginalProfile SweepProfileOrientation = 59650
// AlignToVector keeps the profile normal locked to a fixed vector.
AlignToVector SweepProfileOrientation = 59651
)

func ParseSweepProfileOrientation

func ParseSweepProfileOrientation(s string) (SweepProfileOrientation, bool)

ParseSweepProfileOrientation resolves a wire spelling back to its orientation.

func (SweepProfileOrientation) String

func (o SweepProfileOrientation) String() string

String returns the orientation's wire spelling.

type SweepProfileScaling

SweepProfileScaling controls how a guide rail scales the profile.

type SweepProfileScaling int32

const (
// XYProfileScaling scales the whole section with the rail distance.
XYProfileScaling SweepProfileScaling = 59393
// XProfileScaling scales only along the rail direction.
XProfileScaling SweepProfileScaling = 59394
// NoProfileScaling lets the rail control orientation only.
NoProfileScaling SweepProfileScaling = 59395
)

func ParseSweepProfileScaling

func ParseSweepProfileScaling(s string) (SweepProfileScaling, bool)

ParseSweepProfileScaling resolves a wire spelling back to its scaling.

func (SweepProfileScaling) String

func (s SweepProfileScaling) String() string

String returns the scaling's wire spelling.

type SweepType

SweepType is the placed feature's sweep kind (the SweepFeature property mirroring its definition type).

type SweepType int32

const (
PathSweepType SweepType = 104449
PathAndGuideRailSweepType SweepType = 104450
PathAndGuideSurfaceSweepType SweepType = 104451
PathAndSectionTwistSweepType SweepType = 104452
)

func ParseSweepType

func ParseSweepType(s string) (SweepType, bool)

ParseSweepType resolves a wire spelling back to its type.

func (SweepType) String

func (t SweepType) String() string

String returns the sweep type's wire spelling.

type TextHorizontalAlign

TextHorizontalAlign is how sketch text is positioned horizontally about its anchor point (left/center/right, the standard MCAD horizontal text alignments). String values are frozen — they appear in the .obk document and on the wire.

type TextHorizontalAlign string

const (
TextAlignLeft TextHorizontalAlign = "left"
TextAlignCenter TextHorizontalAlign = "center"
TextAlignRight TextHorizontalAlign = "right"
)

type TextVerticalAlign

TextVerticalAlign is how sketch text is positioned vertically about its anchor point (baseline/lower/middle/upper, the standard MCAD vertical text alignments). Baseline keeps the text's baseline on the anchor; the others measure from the text's cap box. String values are frozen.

type TextVerticalAlign string

const (
TextAlignBaseline TextVerticalAlign = "baseline" // baseline on the anchor (sketch-text default)
TextAlignLower TextVerticalAlign = "lower" // text below the anchor
TextAlignMiddle TextVerticalAlign = "middle" // cap box centred on the anchor
TextAlignUpper TextVerticalAlign = "upper" // text above the anchor
)

type ThemeKind

ThemeKind classifies a theme as one of the two shipped built-ins or a user copy. It picks the right default seed and tells the editor which themes are read-only (built-ins) versus editable (custom).

type ThemeKind string

const (
ThemeLight ThemeKind = "light"
ThemeDark ThemeKind = "dark"
ThemeCustom ThemeKind = "custom"
)

func (ThemeKind) Editable

func (k ThemeKind) Editable() bool

Editable reports whether the user may recolor a theme of this kind (only customs).

type ThemeToken

ThemeToken names one semantic color slot of the UI theme — the curated, stable vocabulary the host styles itself from and add-ins read to match the host's look. One token may drive several concrete Dear ImGui colors (e.g. ChromeAccent feeds the active tab, the checkmark, and the slider grab), keeping the user-facing palette small. The string values are the wire/file keys; treat them as frozen.

Tokens cover the application shell only — window, menus, viewport 2D overlays, and 3D gizmos. They deliberately do NOT cover 3D body appearance, which the material/ appearance subsystem owns.

type ThemeToken string

Chrome — the windowed shell drawn by Dear ImGui (menus, panels, ribbon, controls).

const (
TokenChromeWindowBg ThemeToken = "chrome.window_bg"
TokenChromePanelBg ThemeToken = "chrome.panel_bg"
TokenChromePopupBg ThemeToken = "chrome.popup_bg"
TokenChromeMenuBarBg ThemeToken = "chrome.menu_bar_bg"
TokenChromeHeaderBg ThemeToken = "chrome.header_bg"
TokenChromeText ThemeToken = "chrome.text"
TokenChromeTextDisabled ThemeToken = "chrome.text_disabled"
TokenChromeBorder ThemeToken = "chrome.border"
TokenChromeControlBg ThemeToken = "chrome.control_bg"
TokenChromeControlHover ThemeToken = "chrome.control_hover"
TokenChromeControlActive ThemeToken = "chrome.control_active"
TokenChromeButton ThemeToken = "chrome.button"
TokenChromeButtonHover ThemeToken = "chrome.button_hover"
TokenChromeButtonActive ThemeToken = "chrome.button_active"
TokenChromeAccent ThemeToken = "chrome.accent"
TokenChromeScrollbar ThemeToken = "chrome.scrollbar"
// TokenChromeDanger flags an error/required affordance — e.g. a feature panel's
// required-but-empty selector outline, or a validation message.
TokenChromeDanger ThemeToken = "chrome.danger"
)

Viewport 2D — the sketch/grid/dimension overlays drawn into the 3D view.

const (
TokenViewportBg ThemeToken = "viewport.bg"
TokenGridMinor ThemeToken = "viewport.grid_minor"
TokenGridMajor ThemeToken = "viewport.grid_major"
TokenGridAxis ThemeToken = "viewport.grid_axis"
TokenSketchGeometry ThemeToken = "viewport.sketch_geometry"
TokenSketchSelected ThemeToken = "viewport.sketch_selected"
TokenSketchCandidate ThemeToken = "viewport.sketch_candidate"
TokenSketchPreview ThemeToken = "viewport.sketch_preview"
TokenDimensionDriving ThemeToken = "viewport.dimension_driving"
TokenDimensionDriven ThemeToken = "viewport.dimension_driven"
TokenSnapGlyph ThemeToken = "viewport.snap_glyph"
// TokenViewportActiveBorder is the outline drawn around the focused view tile in a
// split (multi-view) layout, so the user can tell which view is active.
TokenViewportActiveBorder ThemeToken = "viewport.active_border"
)

Gizmos 3D — manipulator/affordance geometry (work planes, selection highlight).

const (
TokenPlaneFaint ThemeToken = "gizmo.plane_faint"
TokenPlaneHover ThemeToken = "gizmo.plane_hover"
TokenPlaneSelected ThemeToken = "gizmo.plane_selected"
TokenSelectionHighlight ThemeToken = "gizmo.selection_highlight"
// TokenPlaneFill is the translucent fill of a work plane's display square — its
// alpha sets how see-through the plane is, so the user configures the look here.
TokenPlaneFill ThemeToken = "gizmo.plane_fill"
)

Icons — ribbon glyphs. An icon carries up to four color roles: primary main linework, secondary accent (the action/result element of the glyph), tertiary supporting detail (anchors, construction marks), and a background plate. Each role rasterizes to its own mask and is colored from these tokens when the theme applies, so one glyph set follows every theme.

const (
TokenIconPrimary ThemeToken = "icon.primary"
TokenIconSecondary ThemeToken = "icon.secondary"
TokenIconTertiary ThemeToken = "icon.tertiary"
TokenIconBackground ThemeToken = "icon.background"
)

func AllThemeTokens

func AllThemeTokens() []ThemeToken

AllThemeTokens lists every token once, in display order (Chrome, Viewport, Gizmos, Icons). A complete theme palette defines a color for each; the editor iterates this to render its grouped color rows. Keep new tokens appended to their group.

type Thermal

Thermal groups a material's heat-related properties.

type Thermal struct {
Conductivity float64 `json:"conductivity" yaml:"conductivity"` // W/(m·K)
ExpansionCoeff float64 `json:"expansionCoeff" yaml:"expansionCoeff"` // 1/K (linear)
SpecificHeat float64 `json:"specificHeat" yaml:"specificHeat"` // J/(kg·K)
}

type ThumbnailSaveOption

ThumbnailSaveOption controls whether and how a preview thumbnail is captured when a document is saved (M03-F09, Oblikovati/Oblikovati#610). Thumbnails are git-ignored sidecar images, never document content (ADR-0020).

The values are a frozen block matching the reference API's thumbnail-save enum; never renumber them. A host may implement a subset and reject the rest when the save options are written.

type ThumbnailSaveOption int32

const (
// ThumbnailNone captures no thumbnail.
ThumbnailNone ThumbnailSaveOption = 79873
// ThumbnailIsoViewOnSave captures the isometric view at save time.
ThumbnailIsoViewOnSave ThumbnailSaveOption = 79874
// ThumbnailActiveWindowOnSave captures the active viewport at save time.
ThumbnailActiveWindowOnSave ThumbnailSaveOption = 79875
// ThumbnailActiveWindow captures the active viewport immediately.
ThumbnailActiveWindow ThumbnailSaveOption = 79876
// ThumbnailImportFromFile uses a caller-supplied image file.
ThumbnailImportFromFile ThumbnailSaveOption = 79877
)

func ParseThumbnailSaveOption

func ParseThumbnailSaveOption(s string) (ThumbnailSaveOption, bool)

ParseThumbnailSaveOption resolves a wire spelling back to its option.

func (ThumbnailSaveOption) String

func (o ThumbnailSaveOption) String() string

String returns the thumbnail option's wire spelling.

type Tolerance

Tolerance is an engineering tolerance: a flavor plus the deviation band from the nominal value (Upper, Lower, database units). The zero Tolerance means "standard/default tolerance, no explicit band"; Tolerance.Kind maps the zero Type onto ToleranceDefault, so a `t != Tolerance{}` has-explicit-tolerance check keeps working. Which value within the band the model consumes is the parameter's ModelValueType (the reference API splits Tolerance.ToleranceType from Parameter.ModelValueType).

type Tolerance struct {
Type ToleranceType
Upper float64
Lower float64
}

func (Tolerance) Kind

func (t Tolerance) Kind() ToleranceType

Kind returns the tolerance flavor, mapping the zero value to ToleranceDefault.

type ToleranceType

ToleranceType is the engineering-tolerance flavor attached to a parameter or dimension (parity: ToleranceTypeEnum). 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 ToleranceType int32

const (
ToleranceDefault ToleranceType = 31233
ToleranceOverride ToleranceType = 31234
ToleranceSymmetric ToleranceType = 31235
ToleranceDeviation ToleranceType = 31236
ToleranceLimitsStacked ToleranceType = 31237
ToleranceLimitLinear ToleranceType = 31238
ToleranceMax ToleranceType = 31239
ToleranceMin ToleranceType = 31240
ToleranceLimitsFitsStacked ToleranceType = 31241
ToleranceLimitsFitsLinear ToleranceType = 31242
ToleranceLimitsFitsShowSize ToleranceType = 31243
ToleranceLimitsFitsShowTolerance ToleranceType = 31244
ToleranceBasic ToleranceType = 31245
ToleranceReference ToleranceType = 31246
)

func ParseToleranceType

func ParseToleranceType(s string) (ToleranceType, bool)

ParseToleranceType resolves a wire spelling back to its ToleranceType.

func (ToleranceType) String

func (t ToleranceType) String() string

String returns the tolerance type's wire spelling.

type TransactionPoint

TransactionPoint identifies a position on a document's transaction stream relative to the cursor — which step a transaction event or navigation acts on. A committed edit acts on the current point, undo acts on the previous one, redo on the next (M04-F05, Oblikovati/Oblikovati#613).

The values are a frozen block matching the reference API's transaction-point enum; never renumber them.

type TransactionPoint int32

const (
// TransactionPointUnknown is the sentinel for "no particular step" (e.g.
// a whole stream being deleted on document close).
TransactionPointUnknown TransactionPoint = 3585
// TransactionPointNext is the step ahead of the cursor (what redo acts on).
TransactionPointNext TransactionPoint = 3586
// TransactionPointPrevious is the step behind the cursor (what undo acts on).
TransactionPointPrevious TransactionPoint = 3587
// TransactionPointCurrent is the step at the cursor (what a commit produced).
TransactionPointCurrent TransactionPoint = 3588
// TransactionPointUpToSpecified addresses a span of steps up to a named one
// (multi-step undo navigation).
TransactionPointUpToSpecified TransactionPoint = 3589
)

func ParseTransactionPoint

func ParseTransactionPoint(s string) (TransactionPoint, bool)

ParseTransactionPoint resolves a wire spelling back to its TransactionPoint.

func (TransactionPoint) String

func (p TransactionPoint) String() string

String returns the transaction point's wire spelling.

type TransparencyTypeEnum

TransparencyTypeEnum is how transparency is rendered: per-pixel alpha blending or a screen-door (stipple) approximation. Frozen ids 58625–58626.

type TransparencyTypeEnum int32

const (
// BlendingTransparency renders transparency with alpha blending (58625).
BlendingTransparency TransparencyTypeEnum = 58625
// ScreenDoorTransparency renders transparency with a screen-door stipple (58626).
ScreenDoorTransparency TransparencyTypeEnum = 58626
)

func AllTransparencyTypes

func AllTransparencyTypes() []TransparencyTypeEnum

AllTransparencyTypes returns every defined transparency mode.

func (TransparencyTypeEnum) IsValid

func (t TransparencyTypeEnum) IsValid() bool

IsValid reports whether t is a defined transparency mode.

func (TransparencyTypeEnum) String

func (t TransparencyTypeEnum) String() string

String returns the transparency mode's user-facing name.

type TriadMoveType

TriadMoveType is the motion a drag produces — the TriadMoveTypeEnum equivalent.

type TriadMoveType uint8

const (
// TriadTranslate slides along one axis.
TriadTranslate TriadMoveType = 0
// TriadTranslatePlanar slides in one plane.
TriadTranslatePlanar TriadMoveType = 1
// TriadRotate spins around one axis (a ring grab).
TriadRotate TriadMoveType = 2
// TriadFree moves with the view plane (the origin grab).
TriadFree TriadMoveType = 3
)

func (TriadMoveType) String

func (t TriadMoveType) String() string

String returns the move type's stable name.

type TriadSegment

TriadSegment is the part of the move/rotate triad the user grabbed — the TriadSegmentEnum equivalent (M05-F13, #620).

type TriadSegment uint8

const (
TriadOrigin TriadSegment = 0
TriadXAxis TriadSegment = 1
TriadYAxis TriadSegment = 2
TriadZAxis TriadSegment = 3
TriadXYPlane TriadSegment = 4
TriadYZPlane TriadSegment = 5
TriadXZPlane TriadSegment = 6
TriadXRing TriadSegment = 7
TriadYRing TriadSegment = 8
TriadZRing TriadSegment = 9
)

func (TriadSegment) String

func (t TriadSegment) String() string

String returns the segment's stable name.

type UnfoldMethodType

UnfoldMethodType names how a bend's flat length (its bend allowance) is computed when the part is developed into its flat pattern. The three methods are the industry standard set: a single K-factor, a per-angle bend table, or a custom equation.

type UnfoldMethodType int32

const (
// KFactorUnfold computes bend allowance from a single neutral-axis ratio (K-factor):
// BA = angle·(radius + K·thickness). The default.
KFactorUnfold UnfoldMethodType = iota
// BendTableUnfold looks the bend allowance (or deduction) up in a thickness/radius/angle
// table, interpolating between rows — used when shop tests have characterised a material.
BendTableUnfold
// EquationUnfold evaluates a custom user equation in {thickness, radius, angle} for the
// bend allowance, for materials whose behaviour neither a K-factor nor a table captures.
EquationUnfold
)

func ParseUnfoldMethodType

func ParseUnfoldMethodType(s string) (UnfoldMethodType, bool)

ParseUnfoldMethodType resolves a wire spelling back to its unfold method.

func (UnfoldMethodType) String

func (m UnfoldMethodType) String() string

String returns the unfold method's wire spelling.

type UnitVector

UnitVector is a 3D direction with the length-one invariant enforced at construction (NewUnitVector errors on a zero vector).

type UnitVector struct {
X, Y, Z float64
}

func NewUnitVector

func NewUnitVector(x, y, z float64) (UnitVector, error)

NewUnitVector normalizes (x,y,z), erroring when the length is (near-)zero.

func (UnitVector) AngleTo

func (u UnitVector) AngleTo(o UnitVector) float64

func (UnitVector) AsVector

func (u UnitVector) AsVector() Vector

AsVector widens the direction to a plain vector.

func (UnitVector) Cross

func (u UnitVector) Cross(o UnitVector) Vector

func (UnitVector) Dot

func (u UnitVector) Dot(o UnitVector) float64

Dot / Cross / AngleTo mirror the vector forms.

func (UnitVector) MarshalJSON

func (u UnitVector) MarshalJSON() ([]byte, error)

MarshalJSON encodes the direction as [x,y,z].

func (UnitVector) Negate

func (u UnitVector) Negate() UnitVector

Negate flips the direction.

func (*UnitVector) UnmarshalJSON

func (u *UnitVector) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes [x,y,z], renormalizing so a hand-written payload still satisfies the invariant (a zero direction is rejected).

type UnitVector2d

UnitVector2d is a 2D direction with the length-one invariant.

type UnitVector2d struct {
X, Y float64
}

func NewUnitVector2d

func NewUnitVector2d(x, y float64) (UnitVector2d, error)

NewUnitVector2d normalizes (x,y), erroring when the length is (near-)zero.

func (UnitVector2d) AngleTo

func (u UnitVector2d) AngleTo(o UnitVector2d) float64

func (UnitVector2d) AsVector

func (u UnitVector2d) AsVector() Vector2d

AsVector widens the direction to a plain vector.

func (UnitVector2d) Dot

func (u UnitVector2d) Dot(o UnitVector2d) float64

func (UnitVector2d) MarshalJSON

func (u UnitVector2d) MarshalJSON() ([]byte, error)

MarshalJSON encodes the direction as [x,y].

func (UnitVector2d) Negate

func (u UnitVector2d) Negate() UnitVector2d

Negate flips the direction.

func (*UnitVector2d) UnmarshalJSON

func (u *UnitVector2d) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes [x,y] with renormalization.

type UnitsType

UnitsType is the dimension category of a measured value (parity: ValueUnitsTypeEnum) — the kind of quantity a unit name belongs to, as opposed to the unit name itself ("mm", "in"). It is carried on the wire by its spelling (UnitsType.String()); the numeric ids are stable and must never be renumbered.

This is the canonical, Apache-2.0 definition. The host's parameter engine has its own richer internal category type (which also models non-arithmetic flag/ text values); it maps to and from these spellings at the wire boundary.

type UnitsType int32

const (
UnitsUnitless UnitsType = 0
UnitsLength UnitsType = 1
UnitsAngle UnitsType = 2
UnitsArea UnitsType = 3
UnitsVolume UnitsType = 4
UnitsMass UnitsType = 5
UnitsTime UnitsType = 6
)

func ParseUnitsType

func ParseUnitsType(s string) (UnitsType, bool)

ParseUnitsType resolves a wire spelling back to its UnitsType.

func (UnitsType) String

func (u UnitsType) String() string

String returns the category's wire spelling (e.g. "length").

type ValueType

ValueType is the type tag of a Variant. Numeric values are FROZEN to the reference ValueTypeEnum — clients and saved automations depend on them.

type ValueType int32

const (
IntegerValue ValueType = 14593
DoubleValue ValueType = 14594
StringValue ValueType = 14595
ByteArrayValue ValueType = 14596
BooleanValue ValueType = 14597
)

func (ValueType) String

func (t ValueType) String() string

String returns the tag's stable name — also its wire spelling.

type Variant

Variant is a typed bag value: exactly one underlying value, selected by its ValueType tag. The typed accessors return ok=false on a tag mismatch so a wrong read is never silent. A double may carry a unit expression (the unit-bearing attribute shape — the full unit-display surface is #146).

opts := types.StringVariant("color"), types.UnitVariant(2.5, "mm")
type Variant struct {
// contains filtered or unexported fields
}

func BoolVariant

func BoolVariant(v bool) Variant

BoolVariant wraps a boolean value.

func BytesVariant

func BytesVariant(v []byte) Variant

BytesVariant wraps an opaque byte-array value (base64 on the wire).

func DoubleVariant

func DoubleVariant(v float64) Variant

DoubleVariant wraps a floating-point value.

func IntegerVariant

func IntegerVariant(v int64) Variant

IntegerVariant wraps an integer value.

func StringVariant

func StringVariant(v string) Variant

StringVariant wraps a string value.

func UnitVariant

func UnitVariant(v float64, unit string) Variant

UnitVariant wraps a floating-point value carrying a unit expression ("mm", "deg", …) — the unit-bearing bag value used by unit-aware options.

func (Variant) Bool

func (v Variant) Bool() (bool, bool)

Bool returns the boolean value, ok=false when v holds another type.

func (Variant) Bytes

func (v Variant) Bytes() ([]byte, bool)

Bytes returns the byte-array value, ok=false when v holds another type.

func (Variant) Double

func (v Variant) Double() (float64, bool)

Double returns the floating-point value, ok=false when v holds another type.

func (Variant) Integer

func (v Variant) Integer() (int64, bool)

Integer returns the integer value, ok=false when v holds another type.

func (Variant) MarshalJSON

func (v Variant) MarshalJSON() ([]byte, error)

MarshalJSON encodes the canonical bag-value shape, e.g. {"type":"double","value":2.5,"unit":"mm"}.

func (Variant) Str

func (v Variant) Str() (string, bool)

Str returns the string value, ok=false when v holds another type.

func (Variant) Type

func (v Variant) Type() ValueType

Type returns the tag selecting which accessor is meaningful.

func (Variant) Unit

func (v Variant) Unit() string

Unit returns the unit expression of a unit-bearing double ("" when none).

func (*Variant) UnmarshalJSON

func (v *Variant) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes the canonical bag-value shape, rejecting unknown tags with the offending name.

type Vector

Vector is a 3D displacement: direction and magnitude, unaffected by translation (unlike a Point).

type Vector struct {
X, Y, Z float64
}

func NewVector

func NewVector(x, y, z float64) Vector

NewVector builds a vector from its components.

func (Vector) Add

func (v Vector) Add(o Vector) Vector

Add / Sub / Scale / Negate are the affine combinators.

func (Vector) AngleTo

func (v Vector) AngleTo(o Vector) float64

AngleTo returns the unsigned angle to o in radians (0 for a zero vector pair).

func (Vector) AsPoint

func (v Vector) AsPoint() Point

AsPoint reinterprets the vector as a position from the origin.

func (Vector) AsUnit

func (v Vector) AsUnit() (UnitVector, error)

AsUnit normalizes the vector, erroring on (near-)zero length rather than returning garbage.

func (Vector) Cross

func (v Vector) Cross(o Vector) Vector

func (Vector) Dot

func (v Vector) Dot(o Vector) float64

func (Vector) IsEqualTo

func (v Vector) IsEqualTo(o Vector, tol float64) bool

IsEqualTo reports component-wise equality within tol.

func (Vector) Length

func (v Vector) Length() float64

Length / LengthSquared are the Euclidean norms.

func (Vector) LengthSquared

func (v Vector) LengthSquared() float64

func (Vector) MarshalJSON

func (v Vector) MarshalJSON() ([]byte, error)

MarshalJSON encodes the vector as [x,y,z].

func (Vector) Negate

func (v Vector) Negate() Vector

func (Vector) Scale

func (v Vector) Scale(s float64) Vector

func (Vector) Sub

func (v Vector) Sub(o Vector) Vector

func (*Vector) UnmarshalJSON

func (v *Vector) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes [x,y,z].

type Vector2d

Vector2d is a 2D displacement.

type Vector2d struct {
X, Y float64
}

func NewVector2d

func NewVector2d(x, y float64) Vector2d

NewVector2d builds a 2D vector from its components.

func (Vector2d) Add

func (v Vector2d) Add(o Vector2d) Vector2d

func (Vector2d) AngleTo

func (v Vector2d) AngleTo(o Vector2d) float64

AngleTo returns the unsigned angle to o in radians.

func (Vector2d) AsPoint

func (v Vector2d) AsPoint() Point2d

AsPoint reinterprets the vector as a position from the origin.

func (Vector2d) AsUnit

func (v Vector2d) AsUnit() (UnitVector2d, error)

AsUnit normalizes the vector, erroring on (near-)zero length.

func (Vector2d) Cross

func (v Vector2d) Cross(o Vector2d) float64

Cross returns the scalar (z) cross product — the signed area term.

func (Vector2d) Dot

func (v Vector2d) Dot(o Vector2d) float64

func (Vector2d) IsEqualTo

func (v Vector2d) IsEqualTo(o Vector2d, tol float64) bool

IsEqualTo reports component-wise equality within tol.

func (Vector2d) Length

func (v Vector2d) Length() float64

func (Vector2d) LengthSquared

func (v Vector2d) LengthSquared() float64

func (Vector2d) MarshalJSON

func (v Vector2d) MarshalJSON() ([]byte, error)

MarshalJSON encodes the vector as [x,y].

func (Vector2d) Negate

func (v Vector2d) Negate() Vector2d

func (Vector2d) Scale

func (v Vector2d) Scale(s float64) Vector2d

func (Vector2d) Sub

func (v Vector2d) Sub(o Vector2d) Vector2d

func (*Vector2d) UnmarshalJSON

func (v *Vector2d) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes [x,y].

type ViewLayout

ViewLayout is how a document's open views are tiled in the viewport — how many views are shown at once and in what arrangement. A document always has at least one view; the layout decides how many of them render simultaneously (many MCAD apps show views in separate windows; we tile them in one viewport). This is the canonical Apache-2.0 definition; the GPL implementation aliases it and maps it onto the tiled renderer.

type ViewLayout int32

const (
// LayoutSingle — one view fills the viewport (the default).
LayoutSingle ViewLayout = 0
// LayoutTwoH — two views side by side (a vertical split: left | right).
LayoutTwoH ViewLayout = 1
// LayoutTwoV — two views stacked (a horizontal split: top / bottom).
LayoutTwoV ViewLayout = 2
// LayoutThree — three views (one large + two stacked beside it).
LayoutThree ViewLayout = 3
// LayoutFour — four views in a 2×2 grid (quad view).
LayoutFour ViewLayout = 4
)

func AllViewLayouts

func AllViewLayouts() []ViewLayout

AllViewLayouts returns every layout in menu order — the source list for a layout picker.

func (ViewLayout) IsValid

func (l ViewLayout) IsValid() bool

IsValid reports whether l is a defined layout.

func (ViewLayout) String

func (l ViewLayout) String() string

String returns the layout's stable, user-facing name.

func (ViewLayout) Tiles

func (l ViewLayout) Tiles() int

Tiles is how many views the layout renders at once (1–4).

type ViewOperationTypeEnum

ViewOperationTypeEnum is an interactive view manipulation: rotate (orbit), pan, or zoom. Frozen ids 30209–30211.

type ViewOperationTypeEnum int32

const (
// RotateViewOperation orbits the camera (30209).
RotateViewOperation ViewOperationTypeEnum = 30209
// PanViewOperation pans the camera (30210).
PanViewOperation ViewOperationTypeEnum = 30210
// ZoomViewOperation zooms the camera (30211).
ZoomViewOperation ViewOperationTypeEnum = 30211
)

func AllViewOperations

func AllViewOperations() []ViewOperationTypeEnum

AllViewOperations returns every defined view operation.

func (ViewOperationTypeEnum) IsValid

func (v ViewOperationTypeEnum) IsValid() bool

IsValid reports whether v is a defined view operation.

func (ViewOperationTypeEnum) String

func (v ViewOperationTypeEnum) String() string

String returns the view-operation's user-facing name.

type ViewOrientationTypeEnum

ViewOrientationTypeEnum names a standard camera orientation — the front/top/iso… presets a view cube or the named-view picker restores. The numeric ids are stable, frozen values (10753–10773).

This is the canonical Apache-2.0 definition; the GPL implementation aliases it.

type ViewOrientationTypeEnum int32

const (
// DefaultViewOrientation is the document's default orientation (10753).
DefaultViewOrientation ViewOrientationTypeEnum = 10753
// TopViewOrientation looks straight down (10754).
TopViewOrientation ViewOrientationTypeEnum = 10754
// RightViewOrientation looks from the right (10755).
RightViewOrientation ViewOrientationTypeEnum = 10755
// BackViewOrientation looks from behind (10756).
BackViewOrientation ViewOrientationTypeEnum = 10756
// BottomViewOrientation looks straight up (10757).
BottomViewOrientation ViewOrientationTypeEnum = 10757
// LeftViewOrientation looks from the left (10758).
LeftViewOrientation ViewOrientationTypeEnum = 10758
// IsoTopRightViewOrientation is the top-right isometric (10759).
IsoTopRightViewOrientation ViewOrientationTypeEnum = 10759
// IsoTopLeftViewOrientation is the top-left isometric (10760).
IsoTopLeftViewOrientation ViewOrientationTypeEnum = 10760
// IsoBottomRightViewOrientation is the bottom-right isometric (10761).
IsoBottomRightViewOrientation ViewOrientationTypeEnum = 10761
// IsoBottomLeftViewOrientation is the bottom-left isometric (10762).
IsoBottomLeftViewOrientation ViewOrientationTypeEnum = 10762
// ArbitraryViewOrientation is a non-standard orientation (10763).
ArbitraryViewOrientation ViewOrientationTypeEnum = 10763
// FrontViewOrientation looks from the front (10764).
FrontViewOrientation ViewOrientationTypeEnum = 10764
// CurrentViewOrientation keeps the current orientation (10765).
CurrentViewOrientation ViewOrientationTypeEnum = 10765
// SavedCameraViewOrientation restores a saved camera (10766).
SavedCameraViewOrientation ViewOrientationTypeEnum = 10766
// FlatPivotRightViewOrientation pivots flat to the right (10767).
FlatPivotRightViewOrientation ViewOrientationTypeEnum = 10767
// FlatPivotLeftViewOrientation pivots flat to the left (10768).
FlatPivotLeftViewOrientation ViewOrientationTypeEnum = 10768
// FlatPivot180ViewOrientation pivots flat 180° (10769).
FlatPivot180ViewOrientation ViewOrientationTypeEnum = 10769
// FlatBacksideViewOrientation flips to the flat backside (10770).
FlatBacksideViewOrientation ViewOrientationTypeEnum = 10770
// FlatBacksidePivotRightViewOrientation is flat backside pivoted right (10771).
FlatBacksidePivotRightViewOrientation ViewOrientationTypeEnum = 10771
// FlatBacksidePivotLeftViewOrientation is flat backside pivoted left (10772).
FlatBacksidePivotLeftViewOrientation ViewOrientationTypeEnum = 10772
// FlatBacksidePivot180ViewOrientation is flat backside pivoted 180° (10773).
FlatBacksidePivot180ViewOrientation ViewOrientationTypeEnum = 10773
)

func AllViewOrientations

func AllViewOrientations() []ViewOrientationTypeEnum

AllViewOrientations returns every defined view orientation, in the standard picker order.

func (ViewOrientationTypeEnum) IsValid

func (v ViewOrientationTypeEnum) IsValid() bool

IsValid reports whether v is a defined view orientation.

func (ViewOrientationTypeEnum) String

func (v ViewOrientationTypeEnum) String() string

String returns the view-orientation's user-facing name.

type ViewTileTypeEnum

ViewTileTypeEnum is how a document's views are tiled when more than one is shown: a single arrange, or a horizontal/vertical split. Frozen ids 117761–117764. (This is the typed counterpart of the numeric ViewLayout used by the views collection.)

type ViewTileTypeEnum int32

const (
// UnknownViewTileType is an unclassified tiling (117761).
UnknownViewTileType ViewTileTypeEnum = 117761
// ArrangeViewTileType arranges the views automatically (117762).
ArrangeViewTileType ViewTileTypeEnum = 117762
// HorizontalViewTileType splits the views horizontally (117763).
HorizontalViewTileType ViewTileTypeEnum = 117763
// VerticalViewTileType splits the views vertically (117764).
VerticalViewTileType ViewTileTypeEnum = 117764
)

func AllViewTileTypes

func AllViewTileTypes() []ViewTileTypeEnum

AllViewTileTypes returns every defined view-tile type.

func (ViewTileTypeEnum) IsValid

func (v ViewTileTypeEnum) IsValid() bool

IsValid reports whether v is a defined view-tile type.

func (ViewTileTypeEnum) String

func (v ViewTileTypeEnum) String() string

String returns the view-tile-type's user-facing name.

type ViewTypeEnum

ViewTypeEnum is the kind of view in a document's view collection: a graphics (3D) view, the model-browser pane, or a notebook view. Frozen ids 9217–9220.

type ViewTypeEnum int32

const (
// UnknownViewType is an unclassified view (9217).
UnknownViewType ViewTypeEnum = 9217
// GraphicsViewType is a 3D graphics view (9218).
GraphicsViewType ViewTypeEnum = 9218
// BrowserViewType is the model-browser pane (9219).
BrowserViewType ViewTypeEnum = 9219
// NoteBookViewType is a notebook view (9220).
NoteBookViewType ViewTypeEnum = 9220
)

func AllViewTypes

func AllViewTypes() []ViewTypeEnum

AllViewTypes returns every defined view type.

func (ViewTypeEnum) IsValid

func (v ViewTypeEnum) IsValid() bool

IsValid reports whether v is a defined view type.

func (ViewTypeEnum) String

func (v ViewTypeEnum) String() string

String returns the view-type's user-facing name.

type WindowState

WindowState is a view frame's window state — the WindowsSizeEnum equivalent (M05-F10, #617).

type WindowState uint8

const (
// WindowNormal is a regular floating window (the zero value).
WindowNormal WindowState = 0
// WindowMaximized fills the screen.
WindowMaximized WindowState = 1
// WindowMinimized is iconified.
WindowMinimized WindowState = 2
)

func (WindowState) String

func (w WindowState) String() string

String returns the state's stable name.

type WorkPlaneKind

WorkPlaneKind names a datum-plane constructor, the discriminator of a work-plane create request. The string values are the stable wire vocabulary — treat them as frozen.

This is the canonical, Apache-2.0 definition of the public kind names; the GPL host maps each to its model constructor.

type WorkPlaneKind string

const (
// Reference-model constructors (built on planes/axes/points).
WorkPlaneOffset WorkPlaneKind = "plane-offset" // parallel to a plane, offset
WorkPlaneThreePoints WorkPlaneKind = "three-points" // through three points
WorkPlaneFixed WorkPlaneKind = "fixed-frame" // fixed origin + X/Y axes (AddFixed)
WorkPlanePlaneAndPoint WorkPlaneKind = "plane-point" // parallel to a plane, through a point
WorkPlaneTwoPlanes WorkPlaneKind = "two-planes" // bisector of two planes
WorkPlaneLinePlaneAngle WorkPlaneKind = "line-plane-angle" // through a line, at an angle to a plane
WorkPlaneTwoLines WorkPlaneKind = "two-lines" // from two lines
WorkPlaneNormalToCurve WorkPlaneKind = "normal-to-curve" // through a point, normal to a curve

// Surface-tangent constructors (built on a B-rep face reference).
WorkPlaneTorusMidPlane WorkPlaneKind = "torus-midplane" // mid-plane of a torus face
WorkPlanePointAndTangent WorkPlaneKind = "point-tangent" // tangent at a point on a surface
WorkPlanePlaneAndTangent WorkPlaneKind = "plane-tangent" // parallel to a plane, tangent to a surface
WorkPlaneLineAndTangent WorkPlaneKind = "line-tangent" // through a line, tangent to a surface
)

Generated by gomarkdoc