Auto-generated from the oblikovati.org/api/types Go source. Do not edit here.
types
import "oblikovati.org/api/types"
Package types holds the shared vocabulary of the Oblikovati API: enums, stable identifiers, and value/option structs with no behavior. Both the GPL implementation and add-ins use these as a common, Apache-2.0 type currency so the same concepts (a document kind, a parameter kind, a 2D point) are named once.
Types here are pure data — no dependency on the implementation, no methods that touch live model state. The richer behavioral surface lives in oblikovati.org/api/contract (in-proc Go interfaces) and oblikovati.org/api/wire (the JSON contract).
Index
- Constants
- func CanonicalKey(key string) string
- func SheetDimensionsMM(s SheetSize) (width, height float64, ok bool)
- type ASideFaceStatus
- type Accuracy
- type ActionID
- type AddInKind
- type AddInLoadBehavior
- type AlignmentType
- type AngleConstraintSolutionType
- type AnisotropicElastic
- type AssemblyConstraintType
- type AssemblyJointOriginDefinitionType
- type AssemblyJointType
- type AssetSource
- type AttachmentKind
- type BOMStructure
- type BOMViewKind
- type BSplineCurve2dDef
- type BSplineCurveDef
- type BSplineSurfaceDef
- type BackFaceCullingEnum
- type BackgroundTypeEnum
- type BaseViewOrientation
- type BendPartType
- type BooleanType
- type Box
- type Box2d
- type BreakOrientation
- type BrepBodyDefinition
- type BrepCurveDef
- type BrepDefinitionIssue
- type BrepEdgeDef
- type BrepEdgeUseDef
- type BrepFaceDef
- type BrepLoopDef
- type BrepLumpDef
- type BrepShellDef
- type BrepSurfaceDef
- type BrepVertexDef
- type BrepWireDef
- type ButtonStyle
- type CachedGraphicsStatusEnum
- type ChamferConcaveStrategy
- type ChamferType
- type ClientGraphicsTypeEnum
- type Color
- type ColorBindingEnum
- type ColorSourceTypeEnum
- type ConstraintInferenceKind
- type ConstraintInferencePriority
- type ConstraintStatus
- type Containment
- type ControlKind
- type Curve2dType
- type CurveGeometryForm
- type CurveType
- type CustomPropertyPrecision
- type CustomPropertyType
- type DSDOFImposedMotionType
- type DSJointType
- type DXFVersion
- type DeriveStyle
- type Dimension3DConstraintKind
- type DimensionConstraintKind
- type DimensionDisplayType
- type DimensionUnit
- type DirectEditOperationType
- type DisplayModeEnum
- type DisplayModeSourceTypeEnum
- type DisplayQualityEnum
- type DisplaySeparateColorsTypeEnum
- type DisplayTransformBehaviorEnum
- type DockingState
- type DocumentInterestRecord
- type DocumentInterestType
- type DocumentSubTypeID
- type DocumentType
- type DraftingStandard
- type DrawingAnnotationKind
- type DrawingCurveKind
- type DrawingDimensionType
- type DrawingSketchEntityKind
- type DrawingViewStyle
- type DrawingViewType
- type DriveVariable
- type EdgeCollectionKind
- type Electrical
- type Environment
- type ExchangeFormat
- type FeatureApproximationType
- type FileLocationType
- type FilletConcaveStrategy
- type FilletCornerType
- type FilletCrossSection
- type FilletType
- type FlatPatternEdgeType
- type FlatPatternFaceType
- type Geometric3DConstraintKind
- type GeometricCharacteristic
- type GeometricConstraintKind
- type GeometryMoveableStatus
- type GraphicsColorBinding
- type GraphicsLane
- type GraphicsLineType
- type GraphicsNormalBinding
- type GraphicsPointStyle
- type GraphicsPrimitiveKind
- type GraphicsSelectabilityEnum
- type GraphicsVisibilityEnum
- type GridCell
- type GridTrack
- type GridTrackKind
- type GroundShadowEnum
- type HatchPattern
- type HealthStatus
- type HelicalShapeDefinitionKind
- type HelixEndKind
- type HoleNoteQuantity
- type IsotropyClass
- type KeyChord
- type LightDefinitionTypeEnum
- type LightTypeEnum
- type LightingStyleTypeEnum
- type LineDefinitionSpaceEnum
- type LoftAreaStop
- type LoftCondition
- func (c LoftCondition) ContinuityOrder() int
- func (c LoftCondition) CurvesViaAngle() bool
- func (c LoftCondition) IsFaceContinuity() bool
- func (c LoftCondition) IsFree() bool
- func (c LoftCondition) IsPointCondition() bool
- func (c LoftCondition) IsSharp() bool
- func (c LoftCondition) IsTangentToPlane() bool
- type LoftType
- type Magnetic
- type MagneticClass
- type MassPropertiesAccuracy
- type MateConstraintSolutionType
- type MaterialRemoval
- type Matrix
- func CoordinateSystemMatrix(origin Point, xAxis, yAxis, zAxis UnitVector) Matrix
- func IdentityMatrix() Matrix
- func RotationMatrix(angle float64, axis UnitVector, center Point) Matrix
- func TranslationMatrix(v Vector) Matrix
- func (m Matrix) At(row, col int) float64
- func (m Matrix) Determinant() float64
- func (m Matrix) Invert() (Matrix, error)
- func (m Matrix) MarshalJSON() ([]byte, error)
- func (m Matrix) Mul(o Matrix) Matrix
- func (m Matrix) TransformPoint(p Point) Point
- func (m Matrix) TransformVector(v Vector) Vector
- func (m Matrix) Translation() Vector
- func (m *Matrix) UnmarshalJSON(b []byte) error
- type Matrix2d
- func IdentityMatrix2d() Matrix2d
- func RotationMatrix2d(angle float64, center Point2d) Matrix2d
- func TranslationMatrix2d(v Vector2d) Matrix2d
- func (m Matrix2d) At(row, col int) float64
- func (m Matrix2d) MarshalJSON() ([]byte, error)
- func (m Matrix2d) Mul(o Matrix2d) Matrix2d
- func (m Matrix2d) TransformPoint(p Point2d) Point2d
- func (m Matrix2d) TransformVector(v Vector2d) Vector2d
- func (m Matrix2d) Translation() Vector2d
- func (m *Matrix2d) UnmarshalJSON(b []byte) error
- type MeasureType
- type Mechanical
- type MeshResolution
- type MessageSeverity
- type MiniToolbarControlKind
- type ModelDiameterFromThread
- type ModelValueType
- type MoveOperationType
- type NewFileMetadata
- type NormalBindingEnum
- type ObjectKind
- type ObjectRef
- type OffsetCornerClosureType
- type OrbitTypeEnum
- type OrientedBox
- type PanelControlKind
- type ParamAnomaly
- type ParameterDisplayFormat
- type ParameterGroupKey
- type ParameterKind
- type PatternBoundaryInclusion
- type PatternComputeType
- type PatternOrientation
- type PatternPositioningMethod
- type PatternSpacingType
- type PhysicalProperties
- type Point
- func NewPoint(x, y, z float64) Point
- func (p Point) DistanceTo(o Point) float64
- func (p Point) IsEqualTo(o Point, tol float64) bool
- func (p Point) MarshalJSON() ([]byte, error)
- func (p Point) Midpoint(o Point) Point
- func (p Point) TranslateBy(v Vector) Point
- func (p *Point) UnmarshalJSON(b []byte) error
- func (p Point) VectorTo(o Point) Vector
- type Point2d
- func NewPoint2d(x, y float64) Point2d
- func (p Point2d) DistanceTo(o Point2d) float64
- func (p Point2d) IsEqualTo(o Point2d, tol float64) bool
- func (p Point2d) MarshalJSON() ([]byte, error)
- func (p Point2d) Midpoint(o Point2d) Point2d
- func (p Point2d) TranslateBy(v Vector2d) Point2d
- func (p *Point2d) UnmarshalJSON(b []byte) error
- func (p Point2d) VectorTo(o Point2d) Vector2d
- type PointInferenceKind
- type PointRenderStyleEnum
- type ProjectionDirection
- type ProjectionTypeEnum
- type PromptRestriction
- type RayTracingQualityEnum
- type ReferenceStatus
- type ReliefShape
- type RepresentationKind
- type Rgba
- type RibbonKey
- type ScreenQuadrant
- type SectionPlane
- type ShadowDirectionEnum
- type SheetOrientation
- type SheetSize
- type ShrinkwrapEnvelopeStyle
- type ShrinkwrapRemoveStyle
- type Sketch3DEntityKind
- type SketchEntityKind
- type SketchLineType
- type SketchPatternKind
- type SketchPointInferenceKind
- type SketchSettings
- type SketchTextStyle
- type SolutionNature
- type SplineFitMethod
- type SplitType
- type StartupActionType
- type StyleLocationEnum
- type SurfaceContinuity
- type SurfaceGeometryForm
- type SurfaceType
- type SweepDefinitionType
- type SweepProfileOrientation
- type SweepProfileScaling
- type SweepType
- type TextHorizontalAlign
- type TextVerticalAlign
- type ThemeKind
- type ThemeToken
- type Thermal
- type ThumbnailSaveOption
- type Tolerance
- type ToleranceType
- type TransactionPoint
- type TransparencyTypeEnum
- type TriadMoveType
- type TriadSegment
- type UnfoldMethodType
- type UnitVector
- func NewUnitVector(x, y, z float64) (UnitVector, error)
- func (u UnitVector) AngleTo(o UnitVector) float64
- func (u UnitVector) AsVector() Vector
- func (u UnitVector) Cross(o UnitVector) Vector
- func (u UnitVector) Dot(o UnitVector) float64
- func (u UnitVector) MarshalJSON() ([]byte, error)
- func (u UnitVector) Negate() UnitVector
- func (u *UnitVector) UnmarshalJSON(b []byte) error
- type UnitVector2d
- func NewUnitVector2d(x, y float64) (UnitVector2d, error)
- func (u UnitVector2d) AngleTo(o UnitVector2d) float64
- func (u UnitVector2d) AsVector() Vector2d
- func (u UnitVector2d) Dot(o UnitVector2d) float64
- func (u UnitVector2d) MarshalJSON() ([]byte, error)
- func (u UnitVector2d) Negate() UnitVector2d
- func (u *UnitVector2d) UnmarshalJSON(b []byte) error
- type UnitsType
- type ValueType
- type Variant
- func BoolVariant(v bool) Variant
- func BytesVariant(v []byte) Variant
- func DoubleVariant(v float64) Variant
- func IntegerVariant(v int64) Variant
- func StringVariant(v string) Variant
- func UnitVariant(v float64, unit string) Variant
- func (v Variant) Bool() (bool, bool)
- func (v Variant) Bytes() ([]byte, bool)
- func (v Variant) Double() (float64, bool)
- func (v Variant) Integer() (int64, bool)
- func (v Variant) MarshalJSON() ([]byte, error)
- func (v Variant) Str() (string, bool)
- func (v Variant) Type() ValueType
- func (v Variant) Unit() string
- func (v *Variant) UnmarshalJSON(b []byte) error
- type Vector
- func NewVector(x, y, z float64) Vector
- func (v Vector) Add(o Vector) Vector
- func (v Vector) AngleTo(o Vector) float64
- func (v Vector) AsPoint() Point
- func (v Vector) AsUnit() (UnitVector, error)
- func (v Vector) Cross(o Vector) Vector
- func (v Vector) Dot(o Vector) float64
- func (v Vector) IsEqualTo(o Vector, tol float64) bool
- func (v Vector) Length() float64
- func (v Vector) LengthSquared() float64
- func (v Vector) MarshalJSON() ([]byte, error)
- func (v Vector) Negate() Vector
- func (v Vector) Scale(s float64) Vector
- func (v Vector) Sub(o Vector) Vector
- func (v *Vector) UnmarshalJSON(b []byte) error
- type Vector2d
- func NewVector2d(x, y float64) Vector2d
- func (v Vector2d) Add(o Vector2d) Vector2d
- func (v Vector2d) AngleTo(o Vector2d) float64
- func (v Vector2d) AsPoint() Point2d
- func (v Vector2d) AsUnit() (UnitVector2d, error)
- func (v Vector2d) Cross(o Vector2d) float64
- func (v Vector2d) Dot(o Vector2d) float64
- func (v Vector2d) IsEqualTo(o Vector2d, tol float64) bool
- func (v Vector2d) Length() float64
- func (v Vector2d) LengthSquared() float64
- func (v Vector2d) MarshalJSON() ([]byte, error)
- func (v Vector2d) Negate() Vector2d
- func (v Vector2d) Scale(s float64) Vector2d
- func (v Vector2d) Sub(o Vector2d) Vector2d
- func (v *Vector2d) UnmarshalJSON(b []byte) error
- type ViewLayout
- type ViewOperationTypeEnum
- type ViewOrientationTypeEnum
- type ViewTileTypeEnum
- type ViewTypeEnum
- type WindowState
- type WorkPlaneKind
Constants
Per-document-type on-disk extensions (ADR-0034). Each document kind carries its own user-facing extension so the OS, file dialogs, and the reference graph can identify a file's kind *before* its manifest is read, and so assemblies and drawings name their referenced files unambiguously. This supersedes the single ".obk" package extension (ADR-0020 amended): the manifest's documentType stays the canonical identity — the extension mirrors it and must agree.
const (
// PartFileExtension is the extension for a part document (DocumentPart).
PartFileExtension = ".opd"
// AssemblyFileExtension is the extension for an assembly document (DocumentAssembly).
AssemblyFileExtension = ".oad"
// DrawingFileExtension is the extension for a drawing document (DocumentDrawing).
DrawingFileExtension = ".odd"
// PresentationFileExtension is the extension for a presentation document (DocumentPresentation).
PresentationFileExtension = ".ord"
// ProjectFileExtension is the extension for a design-project file. A project is
// NOT a document (it has no DocumentType) — it is the portable search-path
// config that resolves a document's referenced files (architecture core/05).
ProjectFileExtension = ".opj"
)
Well-known work-feature references — the part's static origin coordinate frame, valid as entries in a work-plane create request's Refs (e.g. the base plane of an offset). Other references (to user work planes, or a B-rep face) come back from workPlanes.list and model selection.
const (
WorkRefCenter = "origin/point/center"
WorkRefXAxis = "origin/axis/x"
WorkRefYAxis = "origin/axis/y"
WorkRefZAxis = "origin/axis/z"
WorkRefXYPlane = "origin/plane/xy"
WorkRefXZPlane = "origin/plane/xz"
WorkRefYZPlane = "origin/plane/yz"
)
ContinuityInfinite is the Continuity() order reported by analytic geometry, which is smooth to every order (C∞).
const ContinuityInfinite int = 1 << 30
ReservedSubTypePrefix marks built-in sub-type ids; client registration of ids under this prefix is rejected.
const ReservedSubTypePrefix = "org.oblikovati."
func CanonicalKey
func CanonicalKey(key string) string
CanonicalKey normalizes a raw key token so case never splits a binding: a single letter is upper-cased ("e" and "E" are the same chord), and a multi-character token ("Escape", "F5") is kept verbatim.
func SheetDimensionsMM
func SheetDimensionsMM(s SheetSize) (width, height float64, ok bool)
SheetDimensionsMM returns a standard size's portrait width and height in millimetres (width ≤ height), and true. For SheetSizeCustom it returns (0, 0, false): a custom sheet's dimensions come from the sheet itself. Apply SheetOrientation to swap width and height for landscape.
w, h, _ := types.SheetDimensionsMM(types.SheetSizeA4) // 210, 297
type ASideFaceStatus
ASideFaceStatus reports how a face of a mold parting was assigned to the A-side of the tooling split (parity: ASideFaceStatusEnum). The A-side faces are those that go with the cavity half; "default" means the assignment was made automatically, while "sick" flags a face whose assignment could not be resolved. The numeric values are frozen at the reference API's ids and must never be renumbered.
This is the canonical, Apache-2.0 definition; the GPL implementation aliases it (ADR-0018) and maps it onto the core/cavity split result.
type ASideFaceStatus int32
const (
// ASideDefault — the face's side was assigned automatically.
ASideDefault ASideFaceStatus = 106241
// ASideSick — the face is on the A-side list but its assignment is invalid.
ASideSick ASideFaceStatus = 106242
// ASideUpToDate — the face's side assignment is explicit and current.
ASideUpToDate ASideFaceStatus = 106243
)
func ParseASideFaceStatus
func ParseASideFaceStatus(s string) (ASideFaceStatus, bool)
ParseASideFaceStatus resolves a wire spelling back to its status.
func (ASideFaceStatus) String
func (s ASideFaceStatus) String() string
String returns the status's wire spelling.
type Accuracy
Accuracy selects the computational accuracy of a property calculation (region properties, mass properties). Higher accuracy maps to denser sampling/quadrature and costs proportionally more (M06-F08, Oblikovati/Oblikovati#623; shared vocabulary with M18-F01 mass properties).
The values are a frozen block matching the reference API's accuracy enum; never renumber them.
type Accuracy int32
const (
AccuracyLow Accuracy = 69377
AccuracyMedium Accuracy = 69378
AccuracyHigh Accuracy = 69379
AccuracyVeryHigh Accuracy = 69380
)
func ParseAccuracy
func ParseAccuracy(s string) (Accuracy, bool)
ParseAccuracy resolves a wire spelling back to its accuracy.
func (Accuracy) String
func (a Accuracy) String() string
String returns the accuracy's wire spelling.
type ActionID
ActionID identifies a bindable action in the keymap (M05-F17, Oblikovati#831): a registered command's id verbatim (e.g. "Feature.Extrude"), or a reserved built-in action id (e.g. "edit.undo"). It is a string so existing command-id call sites are unaffected; the host's binding engine resolves it to a command or a built-in.
type ActionID = string
type AddInKind
AddInKind classifies an installed add-in — the ApplicationAddInTypeEnum equivalent. The host treats kinds identically today; the classification exists so UI (an add-in manager dialog) and tooling can group entries, and so translator add-ins can be routed to the exchange layer when that seam opens (M05-F01, #245).
type AddInKind uint8
const (
// StandardAddIn is a general-purpose extension (the zero value — every add-in
// without a declared kind).
StandardAddIn AddInKind = 0
// TranslatorAddIn contributes import/export format support (a
// [oblikovati.org/api/contract.MeshTranslator] behind the wire boundary).
TranslatorAddIn AddInKind = 1
)
func (AddInKind) String
func (k AddInKind) String() string
String returns the kind's stable name ("standard", "translator").
type AddInLoadBehavior
AddInLoadBehavior is when (and whether) the host activates an installed add-in — the AddInLoadBehaviorEnum equivalent, narrowed to the behaviors the host honors today. Per-document-type loading (load-with-parts/assemblies/…) is intentionally not modeled until the host has per-document applets to defer to (M05-F01, #245).
The zero value is LoadOnStartup so a freshly discovered add-in activates without any stored preference.
type AddInLoadBehavior uint8
const (
// LoadOnStartup activates the add-in when the host starts (the default).
LoadOnStartup AddInLoadBehavior = 0
// LoadOnDemand registers the add-in but defers activation until something —
// the user, another add-in, or a script — asks for it (addins.activate).
LoadOnDemand AddInLoadBehavior = 1
// LoadDisabled registers the add-in so it is listed, but the host never
// activates it automatically and addins.activate refuses to.
LoadDisabled AddInLoadBehavior = 2
)
func ParseAddInLoadBehavior
func ParseAddInLoadBehavior(name string) (AddInLoadBehavior, bool)
ParseAddInLoadBehavior maps a stable name back to its behavior; ok is false for an unknown name (callers keep their current value rather than guessing).
b, ok := types.ParseAddInLoadBehavior("demand") // LoadOnDemand, true
func (AddInLoadBehavior) String
func (b AddInLoadBehavior) String() string
String returns the behavior's stable name ("startup", "demand", "disabled").
type AlignmentType
AlignmentType names how a flat-pattern orientation aligns its reference axis to the page: the chosen edge/axis is laid horizontal or vertical, then rotated by the orientation's alignment angle.
type AlignmentType int32
const (
// HorizontalAlignment lays the orientation's alignment axis along the horizontal (the
// default), so the flat's reported length runs left-to-right.
HorizontalAlignment AlignmentType = iota
// VerticalAlignment lays the alignment axis along the vertical.
VerticalAlignment
)