Pular para o conteúdo principal

Auto-generated from the oblikovati.org/api/contract Go source. Do not edit here.

contract

import "oblikovati.org/api/contract"

Package contract is the in-process Go interface surface of the Oblikovati API: Application/Session, Document, PartDocument, Parameters, Parameter, Sketch, and the collections that hang off them. The GPL implementation (/source) satisfies these interfaces with compile-time assertions, so the contract stays honest without /api ever importing the implementation.

These interfaces are for FIRST-PARTY, in-process use (one Go runtime). They are NOT how out-of-process or C-ABI add-ins reach the host — a live Go interface value cannot cross the two-runtime boundary of ADR-0016. Those add-ins use the transport-backed oblikovati.org/api/client over the oblikovati.org/api/wire JSON contract instead.

Package contract's sketch interfaces are the in-process Go view of a 2D sketch the host implements (model/sketch.Sketch) and add-ins consume. They expose only the scalar surface — no GPL model types leak across the boundary; richer access (entity geometry, constraints) travels as wire DTOs (see api/wire).

Index

type AddInAutomation

AddInAutomation is the in-process contract for an add-in's automation surface — the ApplicationAddIn.Automation equivalent. An add-in that wants to be callable by other add-ins implements it (a shared-library add-in via the optional ObkAddInAutomation export, a first-party in-process add-in directly); the host routes addins.callAutomation to it. Method and the byte payloads are the target's own contract — the host passes them through opaquely.

An automation handler runs on the host's session goroutine: it must return promptly and must NOT make synchronous host calls (they would wait on the very dispatcher this call is occupying).

type AddInAutomation interface {
// CallAutomation runs one automation method with an opaque JSON payload and
// returns the opaque JSON reply.
CallAutomation(method string, args []byte) ([]byte, error)
}

type AddInRegistry

AddInRegistry is the in-process contract for the host's add-in registry — the session-free slice of the ApplicationAddIns surface: what is installed, what is running, and when each entry loads. The GPL implementation (app.AddInManager) satisfies it (compile-time asserted there); lifecycle calls that need the live session cross the wire instead (addins.activate / addins.deactivate).

Example:

for _, id := range reg.Registered() { fmt.Println(id, reg.IsActive(id)) }
type AddInRegistry interface {
// Registered returns the registered add-in ids in registration order.
Registered() []string
// IsActive reports whether an add-in is currently active.
IsActive(id string) bool
// LoadBehavior returns when the host activates the add-in on startup.
LoadBehavior(id string) types.AddInLoadBehavior
}

type AngleConstraint

AngleConstraint holds an angle between two directions.

type AngleConstraint interface {
AssemblyConstraint
// SolutionType is how the angle is measured (undirected/directed/reference-vector).
SolutionType() types.AngleConstraintSolutionType
}

type Appearance

Appearance is the in-process contract for one PBR appearance — what the renderer shows for a surface. It is a metallic-roughness description with solid (non-textured) values; the GPL model/material.Appearance satisfies it (compile-time asserted there).

Albedo and Emissive are [types.Rgba] (shared with theming); Metallic, Roughness and Opacity are in [0,1].

type Appearance interface {
// ID is the stable identity used by assignments and library lookups.
ID() string
// DisplayName is the label shown in the appearance browser.
DisplayName() string
// Source says whether this is a built-in, project, or document-embedded asset.
Source() types.AssetSource
// Albedo is the base (diffuse) color.
Albedo() types.Rgba
// Metallic is the metalness in [0,1].
Metallic() float32
// Roughness is the microfacet roughness in [0,1].
Roughness() float32
// Emissive is the self-emitted color (black = none).
Emissive() types.Rgba
// Opacity is the surface opacity in [0,1] (1 = fully opaque).
Opacity() float32
}

type Arc2d

Arc2d is a 2D circular arc.

type Arc2d interface {
Curve2d
Center() types.Point2d
Radius() float64
StartAngle() float64
SweepAngle() float64
}

type Arc3d

Arc3d is a 3D circular arc.

type Arc3d interface {
Curve
Center() types.Point
Normal() types.UnitVector
ReferenceVector() types.UnitVector
Radius() float64
StartAngle() float64
SweepAngle() float64
}

type AssemblyComponentDefinition

AssemblyComponentDefinition is the scalar read surface of an assembly document's model: a version string that advances whenever the occurrence structure or any placement changes, so a consumer can tell when to re-read the occurrence tree (over assembly.occurrences). Host: compdef.AssemblyComponentDefinition.

type AssemblyComponentDefinition interface {
// ModelGeometryVersion advances on every structural or placement change to the assembly.
ModelGeometryVersion() string
}

type AssemblyConstraint

AssemblyConstraint is the common read surface of every assembly relationship: its session id, kind, name, driven value, limits, health, and suppression.

type AssemblyConstraint interface {
// ID is the constraint's session id, unique within its assembly's set.
ID() uint64
// Type is the relationship kind.
Type() types.AssemblyConstraintType
// Name is the constraint's display name (e.g. "Mate:1").
Name() string
// Value is the driven value: an offset (cm), angle (radians), or coupling ratio,
// depending on the kind. Constraints with no driven value report 0.
Value() float64
// Health reports whether the constraint is fully evaluated, or sick (lost geometry).
Health() types.HealthStatus
// Suppressed reports whether the constraint is excluded from the solve.
Suppressed() bool
// Limits returns the constraint's driven-value bounds, or nil when unbounded.
Limits() ConstraintLimits
}

type AssemblyConstraints

AssemblyConstraints is the assembly's constraint collection — the relationships authored directly in it, in creation order (host: assembly.ConstraintSet).

type AssemblyConstraints interface {
// Count returns the number of constraints in the set.
Count() int
// Item returns the constraint at index i (0-based), or nil when out of range.
Item(i int) AssemblyConstraint
}

type AssemblyConstraintsEnumerator

AssemblyConstraintsEnumerator is the per-occurrence view of the constraints that reference one occurrence (the reference API's per-component Constraints collection).

type AssemblyConstraintsEnumerator interface {
// Count returns the number of constraints referencing the occurrence.
Count() int
// Item returns the i-th constraint referencing the occurrence, or nil when out of range.
Item(i int) AssemblyConstraint
}

type AssemblyFeatures

AssemblyFeatures is the assembly's machining-feature program — the features authored in the assembly that cut/modify placed component geometry in place (M11-F08). It is the assembly analogue of the part feature program, adding the end-of-features rollback marker and batch suppression over the scalar surface a consumer reads.

type AssemblyFeatures interface {
EndOfFeatures
// Count returns the number of features in the program.
Count() int
// SuppressFeatures suppresses every named feature in one batch.
SuppressFeatures(ids ...uint64)
// UnsuppressFeatures clears suppression on every named feature in one batch.
UnsuppressFeatures(ids ...uint64)
}

type AssemblyJoint

AssemblyJoint is the read surface of one joint: its session id, kind, name, flip sense, the free DOF it leaves, limits, and health.

type AssemblyJoint interface {
// ID is the joint's session id, unique within its assembly's set.
ID() uint64
// Type is the joint kind.
Type() types.AssemblyJointType
// Name is the joint's display name (e.g. "Rotational:1").
Name() string
// Flip reports the reversed primary-axis sense.
Flip() bool
// DegreesOfFreedom is the number of free DOF the joint leaves between the two occurrences.
DegreesOfFreedom() int
// Health reports whether the joint is fully evaluated, or sick (lost geometry).
Health() types.HealthStatus
// Suppressed reports whether the joint is excluded from the solve.
Suppressed() bool
// Limits returns the joint's driven-value bounds, or nil when unbounded.
Limits() JointLimits
}

type AssemblyJointDefinition

AssemblyJointDefinition is the read surface of a joint's definition — the kind and the origin-definition kinds of its two joint origins (how each frame is built).

type AssemblyJointDefinition interface {
// JointType is the kind of joint this definition builds.
JointType() types.AssemblyJointType
// OriginTypes returns how each of the two joint origins is defined (geometry kind).
OriginTypes() (a, b types.AssemblyJointOriginDefinitionType)
}

type AssemblyJointProxy

AssemblyJointProxy is a joint viewed in the context of a specific occurrence path — the reference API's per-instance joint proxy, so a joint in a placed sub-assembly is addressable per placement.

type AssemblyJointProxy interface {
AssemblyJoint
// NativeJoint returns the underlying joint this proxy views.
NativeJoint() AssemblyJoint
}

type AssemblyJoints

AssemblyJoints is the assembly's joint collection in creation order (host: assembly.JointSet).

type AssemblyJoints interface {
// Count returns the number of joints in the set.
Count() int
// Item returns the joint at index i (0-based), or nil when out of range.
Item(i int) AssemblyJoint
}

type AssemblyJointsEnumerator

AssemblyJointsEnumerator is the per-occurrence view of the joints that reference one occurrence (the reference API's per-component Joints collection).

type AssemblyJointsEnumerator interface {
// Count returns the number of joints referencing the occurrence.
Count() int
// Item returns the i-th joint referencing the occurrence, or nil when out of range.
Item(i int) AssemblyJoint
}

type AssemblySymmetryConstraint

AssemblySymmetryConstraint positions two geometries symmetrically about a plane.

type AssemblySymmetryConstraint interface{ AssemblyConstraint }

type BOM

BOM is the scalar read surface of an assembly's bill of materials, derived live from its occurrence tree: a structured (nested) view and a parts-only (flat, totaled) view. Host: the bomapi adapter over model/bom.

type BOM interface {
Structured() BOMView
PartsOnly() BOMView
}

type BOMRow

BOMRow is the scalar read surface of one bill-of-materials line (M11-F05, Oblikovati/Oblikovati#730): its item number, the component's part number/description/ structure, the quantity at this level, and — in a structured view — its nested child rows. The host adapter wraps the model's bom.Row.

type BOMRow interface {
ItemNumber() int
PartNumber() string
Description() string
Structure() types.BOMStructure
Quantity() int
Children() []BOMRow
}

type BOMView

BOMView is the scalar read surface of one bill-of-materials view — its kind and rows.

type BOMView interface {
Kind() types.BOMViewKind
Rows() []BOMRow
}

type BSplineCurve

BSplineCurve is a 3D NURBS curve.

type BSplineCurve interface {
Curve
Definition() types.BSplineCurveDef
}

type BSplineCurve2d

BSplineCurve2d is a 2D NURBS curve.

type BSplineCurve2d interface {
Curve2d
Definition() types.BSplineCurve2dDef
}

type BSplineSurface

BSplineSurface is a NURBS surface.

type BSplineSurface interface {
Surface
Definition() types.BSplineSurfaceDef
}

type BackgroundDisplaySettings

BackgroundDisplaySettings is how the viewport background and appearance textures are painted.

type BackgroundDisplaySettings interface {
// BackgroundType is how the viewport background is painted (solid/gradient/image).
BackgroundType() types.BackgroundTypeEnum
// TexturesOn reports whether appearance textures are displayed.
TexturesOn() bool
}

type BatchSave

BatchSave queues (document → target) pairs and executes one save operation over all of them. A queue is single-use: executing drains it.

type BatchSave interface {
// AddFileToSave queues a document with its target file name (ignored for
// ExecuteSave); it errors on a nil document or a duplicate target.
AddFileToSave(document Document, targetFileName string) error
// Count returns the number of queued pairs.
Count() int
// ExecuteSave saves every queued document at its current binding.
ExecuteSave() []BatchSaveOutcome
// ExecuteSaveAs saves every queued document under its target name,
// retargeting each document's identity.
ExecuteSaveAs() []BatchSaveOutcome
// ExecuteSaveCopyAs writes a copy of every queued document to its target
// without retargeting the in-memory documents.
ExecuteSaveCopyAs() []BatchSaveOutcome
}

type BatchSaveOutcome

BatchSaveOutcome is one per-file result of a batch-save execution.

type BatchSaveOutcome struct {
// FullDocumentName is where the file landed (or would have).
FullDocumentName string
// Err is the per-file failure, nil on success; the batch continues past
// individual failures.
Err error
}

type BodyQueries

BodyQueries is the reference SurfaceBody query surface: point/ray location, containment, convexity, validity and transient-key binding (M07-F07).

type BodyQueries interface {
// IsPointInside classifies a point against the body's material.
IsPointInside(x, y, z float64) types.Containment
// ConvexEdgeCount / ConcaveEdgeCount report the dihedral classification
// totals (the EdgeCollection cardinalities).
ConvexEdgeCount() int
ConcaveEdgeCount() int
// IsEntityValid checks the whole body at the given level (1 = topology,
// 2 = + self-intersection).
IsEntityValid(checkLevel int) bool
// BindTransientKey reports the kind ("vertex"/"edge"/"face"/"shell"/
// "wire") and persistent reference key behind a session transient key.
BindTransientKey(key uint64) (kind string, referenceKey []byte, ok bool)
}

type Circle

Circle is a full 3D circle (parameter 0..1 around the normal).

type Circle interface {
Curve
Center() types.Point
Normal() types.UnitVector
Radius() float64
}

type Circle2d

Circle2d is a full 2D circle.

type Circle2d interface {
Curve2d
Center() types.Point2d
Radius() float64
}

type ClientGraphics

ClientGraphics is the scalar view of one client-graphics group the host implements (model/clientgraphics.Group) and in-process callers consume. It exposes only the scalar surface — the geometry itself travels as wire DTOs (see api/wire). The host satisfies it with a compile-time assertion.

type ClientGraphics interface {
// Name is the group's client id (the key it was submitted under).
Name() string
// Lane is the display lane the group lives in (a types.GraphicsLane value).
Lane() string
// Visible reports whether the group is currently drawn.
Visible() bool
// NodeCount is the number of graphics nodes the group owns.
NodeCount() int
}

type ColorScheme

ColorScheme is the in-process contract for one named application palette — the colors the viewport and selection pipeline traffic in. It is read-mostly here; activation and edits go through the wire methods / the app. The GPL app satisfies it (compile-time asserted there).

Background colors honor the owning ColorSchemes.BackgroundType: ScreenColor for a solid background, TopScreenColor/BottomScreenColor for a gradient. Highlight/select colors feed the selection pipeline and HighlightSet.

type ColorScheme interface {
// Name is the scheme's user-facing label (unique within the collection).
Name() string
// ScreenColor is the solid viewport background color.
ScreenColor() types.Color
// TopScreenColor is the gradient background's top color.
TopScreenColor() types.Color
// BottomScreenColor is the gradient background's bottom color.
BottomScreenColor() types.Color
// HighlightColor is the pre-highlight (hover) color.
HighlightColor() types.Color
// PrimarySelectColor is the first-selection color.
PrimarySelectColor() types.Color
// SecondarySelectColor is the secondary-selection color.
SecondarySelectColor() types.Color
}

type ColorSchemes

ColorSchemes is the in-process contract for the application's set of color schemes — the equivalent of the Color tab of the application options. It enumerates the schemes, reports and switches the active one, and carries the application-wide background type. The GPL app satisfies it (compile-time asserted there).

type ColorSchemes interface {
// Count is the number of schemes in the collection.
Count() int
// Item returns the scheme at index i (0-based), or nil if out of range.
Item(i int) ColorScheme
// Active is the currently active scheme.
Active() ColorScheme
// SetActive makes the named scheme active, returning an error naming the scheme if absent.
SetActive(name string) error
// BackgroundType is the application-wide viewport background type.
BackgroundType() types.BackgroundTypeEnum
// SetBackgroundType sets the application-wide viewport background type.
SetBackgroundType(t types.BackgroundTypeEnum) error
}

type ColorStyle

ColorStyle is the in-process contract for one named color style — the classic visual style carrying the ambient/diffuse/specular/emissive color components, shininess, and opacity that a body or face references. It is read-mostly here; edits go through the wire methods. The GPL app satisfies it (compile-time asserted there).

type ColorStyle interface {
// Name is the style's user-facing label (unique within the collection).
Name() string
// DiffuseColor is the main surface color under direct light.
DiffuseColor() types.Color
// AmbientColor is the surface color under ambient fill.
AmbientColor() types.Color
// SpecularColor is the highlight color.
SpecularColor() types.Color
// EmissiveColor is the self-emitted (glow) color.
EmissiveColor() types.Color
// Shininess is the specular exponent in [0,1] (higher is tighter highlights).
Shininess() float64
// Opacity is the surface opacity in [0,1].
Opacity() float64
// Location is where the style lives in the cascade (local overrides library).
Location() types.StyleLocationEnum
}

type ColorStyles

ColorStyles is the in-process contract for a document's set of color styles. The GPL app satisfies it (compile-time asserted there).

type ColorStyles interface {
// Count is the number of color styles.
Count() int
// Item returns the color style at index i (0-based), or nil if out of range.
Item(i int) ColorStyle
// ByName returns the named color style, or nil if absent.
ByName(name string) ColorStyle
}

type ComponentGraphics

ComponentGraphics is a client-graphics collection owned by and transformed with a component (rather than the document root). It is the persistent, cached counterpart of the transient interaction graphics.

type ComponentGraphics interface {
// ComponentKey is the reference key of the owning component.
ComponentKey() string
// Status is the freshness of the cached graphics (none/out-of-date/up-to-date).
Status() types.CachedGraphicsStatusEnum
// Nodes are the collection's object-model nodes.
Nodes() []GraphicsObjectNode
}

type ComponentOccurrence

ComponentOccurrence is the scalar read surface of one placement of a component in an assembly (M11-F01/F02, Oblikovati/Oblikovati#728): its session id, instance name, and per-instance state. The placement transform and every mutation travel over api/wire (the assembly.* methods); this is what an in-proc consumer reads directly. The host implementation lives in /source (occurrence.Occurrence).

type ComponentOccurrence interface {
// ID is the occurrence's session id, unique within its owning collection.
ID() uint64
// Name is the instance name, e.g. "pin:1".
Name() string
// Suppressed reports whether the occurrence is excluded from the model.
Suppressed() bool
// Grounded reports whether the occurrence is fixed in the assembly's space.
Grounded() bool
// Adaptive reports whether the occurrence's geometry may flex to satisfy constraints.
Adaptive() bool
// IsSubstitute reports whether this is a substitute (simplified) representation.
IsSubstitute() bool
}

type ComponentOccurrences

ComponentOccurrences is the scalar read surface of an assembly's occurrence collection — the components placed directly in it (host: occurrence.Occurrences). The tree itself is read over api/wire (assembly.occurrences).

type ComponentOccurrences interface {
// Count returns the number of occurrences in the collection.
Count() int
}

type Cone

Cone is an unbounded circular cone (apex at v = 0, opening along the axis).

type Cone interface {
Surface
ApexPoint() types.Point
Axis() types.UnitVector
HalfAngle() float64
}

type ConstraintLimits

ConstraintLimits bounds a constraint's driven value. Each bound is independently optional; an absent bound does not clamp.

type ConstraintLimits interface {
// Minimum returns the lower bound and whether it is set.
Minimum() (float64, bool)
// Maximum returns the upper bound and whether it is set.
Maximum() (float64, bool)
// Resting returns the value a drive returns to when released and whether it is set.
Resting() (float64, bool)
}

type ContactSet

ContactSet is a named group of occurrences that resist interpenetration: when the contact solver is enabled, dragging a member stops at contact with another member.

type ContactSet interface {
// ID is the contact set's session id.
ID() uint64
// Name is the contact set's display name.
Name() string
// MemberCount returns the number of occurrences in the set.
MemberCount() int
}

type ContactSets

ContactSets is an assembly's contact-set collection (host: assembly.ContactSets).

type ContactSets interface {
// Count returns the number of contact sets.
Count() int
// Item returns the contact set at index i, or nil when out of range.
Item(i int) ContactSet
}

type ContactSolver

ContactSolver reports whether contact enforcement is enabled and how many sets it governs — the reference API's ActiveContactSolver toggle.

type ContactSolver interface {
// Enabled reports whether contact is enforced during a drag.
Enabled() bool
// SetCount returns the number of contact sets the solver governs.
SetCount() int
}

type Curve

Curve is the umbrella every 3D transient curve satisfies.

type Curve interface {
// CurveType identifies the concrete kind (frozen reference values).
CurveType() types.CurveType
// GeometryForm reports whether the curve is exactly NURBS-representable.
GeometryForm() types.CurveGeometryForm
// Evaluate returns the position at parameter t.
Evaluate(t float64) types.Point
// Tangent returns the (unnormalized) first derivative at t.
Tangent(t float64) types.Vector
// Domain returns the parameter range (±Inf for unbounded curves).
Domain() (lo, hi float64)
// Evaluator returns the member-level query surface of this curve.
Evaluator() CurveEvaluator
}

type Curve2d

Curve2d is the umbrella every 2D transient curve satisfies.

type Curve2d interface {
CurveType() types.Curve2dType
GeometryForm() types.CurveGeometryForm
Evaluate(t float64) types.Point2d
Tangent(t float64) types.Vector2d
Domain() (lo, hi float64)
// Evaluator returns the member-level query surface of this curve.
Evaluator() Curve2dEvaluator
}

type Curve2dEvaluator

Curve2dEvaluator is the sketch-space analogue of CurveEvaluator.

type Curve2dEvaluator interface {
// RangeBox returns a 2D box enclosing the curve (±Inf when unbounded;
// a NURBS box is the control-hull box, enclosing but not minimal).
RangeBox() types.Box2d
// Continuity returns the largest maintained continuity order.
Continuity() int
// EndPoints returns the curve's bounds, bounded=false for an infinite curve.
EndPoints() (start, end types.Point2d, bounded bool)
// ParamExtents returns the parameter domain [lo, hi] (±Inf when unbounded).
ParamExtents() (lo, hi float64)
// Derivatives returns the first three parametric derivatives at t.
Derivatives(t float64) (d1, d2, d3 types.Vector2d)
// Curvature returns the signed curvature at t (positive turning left along
// increasing parameter, zero where straight).
Curvature(t float64) float64
// Length returns the arc length between the two parameters.
Length(from, to float64) float64
// ParamAtLength returns the parameter at signed arc length from the given
// parameter — the inverse of Length.
ParamAtLength(from, length float64) float64
// Strokes tessellates [from, to] within the chordal tolerance.
Strokes(from, to, tolerance float64) []types.Point2d
// ParamAtPoint returns the parameter of the closest point to p, classified.
ParamAtPoint(p types.Point2d) (t float64, nature types.SolutionNature)
// ParamAnomaly reports periodicity, singular points and unboundedness.
ParamAnomaly() types.ParamAnomaly
}

type CurveEvaluator

CurveEvaluator is the member-level query surface of a 3D transient curve.

type CurveEvaluator interface {
// RangeBox returns a box enclosing the curve (±Inf faces when unbounded;
// a NURBS box is the control-hull box, enclosing but not minimal).
RangeBox() types.Box
// Continuity returns the largest maintained continuity order: 0 for a
// polyline, degree−1 across NURBS knots, [types.ContinuityInfinite] for
// analytic curves.
Continuity() int
// EndPoints returns the curve's bounds, bounded=false for an infinite curve.
EndPoints() (start, end types.Point, bounded bool)
// ParamExtents returns the parameter domain [lo, hi] (±Inf when unbounded).
ParamExtents() (lo, hi float64)
// Derivatives returns the first three parametric derivatives at t.
Derivatives(t float64) (d1, d2, d3 types.Vector)
// Curvature returns the unit principal-normal direction and curvature
// magnitude at t (zero direction and magnitude where the curve is straight).
Curvature(t float64) (direction types.Vector, magnitude float64)
// Length returns the arc length between the two parameters (exact for
// analytic curves, adaptive quadrature otherwise).
Length(from, to float64) float64
// ParamAtLength returns the parameter at signed arc length from the given
// parameter — the inverse of Length.
ParamAtLength(from, length float64) float64
// Strokes tessellates [from, to] into a polyline whose chordal deviation
// from the curve stays within tolerance.
Strokes(from, to, tolerance float64) []types.Point
// ParamAtPoint returns the parameter of the point on the curve closest to
// p, classifying how many equally close answers exist.
ParamAtPoint(p types.Point) (t float64, nature types.SolutionNature)
// ParamAnomaly reports periodicity, singular points and unboundedness.
ParamAnomaly() types.ParamAnomaly
}

type CurveGraphics

CurveGraphics renders an existing B-rep edge by reference key.

type CurveGraphics interface {
GraphicsPrimitive
// EdgeKey is the persistent reference key of the rendered edge.
EdgeKey() string
}

type CustomConstraint

CustomConstraint is a relationship solved by an add-in, not the built-in solver.

type CustomConstraint interface {
AssemblyConstraint
// Kind names the add-in relationship the host dispatches to.
Kind() string
// Params are the driving values passed to the add-in solver.
Params() []float64
}

type Cylinder

Cylinder is an unbounded circular cylinder.

type Cylinder interface {
Surface
BasePoint() types.Point
Axis() types.UnitVector
Radius() float64
}

type DSDegreesOfFreedom

DSDegreesOfFreedom is one degree of freedom of a DS joint: translational or rotational, its imposed-motion mode, and its current value.

type DSDegreesOfFreedom interface {
// Rotational reports whether this DOF is rotational (false ⇒ translational).
Rotational() bool
// ImposedMotion reports how the DOF's motion is imposed (free/driven/locked).
ImposedMotion() types.DSDOFImposedMotionType
// Value is the DOF's current value (cm or radians).
Value() float64
}

type DSJoint

DSJoint is the degrees-of-freedom / imposed-motion view of a joint — the kinematic surface motion and simulation consumers read.

type DSJoint interface {
// ID is the DS joint's session id.
ID() uint64
// Type is the DS joint kind (mechanism vocabulary: prismatic/spherical/…).
Type() types.DSJointType
// Name is the DS joint's display name.
Name() string
// DOFCount returns the number of degrees of freedom.
DOFCount() int
// DOF returns the i-th degree of freedom, or nil when out of range.
DOF(i int) DSDegreesOfFreedom
}

type DSJointDefinition

DSJointDefinition is the read surface of a DS joint's definition (its kind).

type DSJointDefinition interface {
// DSJointType is the kind of DS joint this definition builds.
DSJointType() types.DSJointType
}

type DSJoints

DSJoints is the DS-joint collection (host: assembly.DSJointSet).

type DSJoints interface {
// Count returns the number of DS joints.
Count() int
// Item returns the DS joint at index i, or nil when out of range.
Item(i int) DSJoint
}

type DerivedAssemblyComponent

DerivedAssemblyComponent is a part feature that pulls a source assembly's geometry into the part as a base body and tracks it associatively — the reference API's DerivedAssemblyComponent (M11-F06, Oblikovati/Oblikovati#631). A shrinkwrap is the simplified flavor of the same contract. The host implementation lives in /source (model/feature); this is the scalar surface a consumer reads without the geometry.

type DerivedAssemblyComponent interface {
// Kind names the feature type ("derivedAssembly" or "shrinkwrap").
Kind() string
// Linked reports whether the feature still pulls from its source assembly.
Linked() bool
// SourceVersion returns the source assembly's current geometry version, so a
// consumer can tell when the derived result is stale.
SourceVersion() string
// BreakLink freezes the current derived geometry and severs the source link, so
// the part keeps the result without further updates.
BreakLink() error
}

type DesignViewRepresentation

DesignViewRepresentation overrides visibility, appearance, section planes, and the camera.

type DesignViewRepresentation interface {
Representation
// SectionPlanes returns the representation's section/clipping planes.
SectionPlanes() []types.SectionPlane
}

type DesignViewRepresentations

DesignViewRepresentations / PositionalRepresentations / LevelOfDetailRepresentations are the per-family collections in creation order (host: assembly.Representations).

type DesignViewRepresentations interface {
// Count returns the number of design-view representations.
Count() int
// Item returns the representation at index i (0-based), or nil when out of range.
Item(i int) DesignViewRepresentation
}

type DetailDrawingView

DetailDrawingView is a magnified view of a circular region of a parent view: the parent's projection clipped to the boundary circle and re-placed at a larger scale. Like section, the reference API gives it its own interface.

type DetailDrawingView interface {
DrawingView
// DetailBoundaryMM is the magnified region's circle on the parent view (sheet millimetres):
// centre and radius.
DetailBoundaryMM() (cx, cy, r float64)
}

type DisplayOptions

DisplayOptions is the in-process contract for the application-level display options — the preferences that parameterize the M23 display modes. Read-mostly here; mutation goes through the wire methods. The GPL app satisfies it.

type DisplayOptions interface {
// DisplayQuality is the surface-display quality (binds to tessellation tolerance).
DisplayQuality() types.DisplayQualityEnum
// ViewTransitionTime is the animated camera-transition duration (seconds).
ViewTransitionTime() float64
// MinimumFrameRate is the interaction frame-rate floor (degrades quality to hold it).
MinimumFrameRate() float64
// HiddenLineDimmingPercent is the 0–100 dimming applied to hidden lines.
HiddenLineDimmingPercent() int
// EdgeColor is the global model-edge color.
EdgeColor() types.Color
// NewWindowDisplayMode is the display mode new views open in.
NewWindowDisplayMode() types.DisplayModeEnum
// NewWindowProjection is the projection new views open in.
NewWindowProjection() types.ProjectionTypeEnum
// BackFaceCulling is which triangle winding the renderer culls.
BackFaceCulling() types.BackFaceCullingEnum
// UseRayTracing reports whether realistic display uses ray tracing.
UseRayTracing() bool
// RayTracingQuality is the ray-tracing quality tier.
RayTracingQuality() types.RayTracingQualityEnum
// Shaded returns the shaded-mode sub-options.
Shaded() ShadedDisplayOptions
// Wireframe returns the wireframe-mode sub-options.
Wireframe() WireframeDisplayOptions
}

type DisplaySettings

DisplaySettings is the in-process contract for a document's per-document display settings — the home for background, edge color, ground-plane, and shadow state. It is segregated into four embedded capability families (BackgroundDisplaySettings, EdgeDisplaySettings, WindowDisplaySettings, GroundShadowSettings) so a consumer that only reads, say, the shadow state does not depend on the edge/window width (audit I9). DisplaySettings stays their union (compile-time asserted in the GPL app) — every existing implementer and caller is unaffected.

type DisplaySettings interface {
BackgroundDisplaySettings
EdgeDisplaySettings
WindowDisplaySettings
GroundShadowSettings
}

type Document

Document is the in-process contract for an open document's identity and state — the scalar surface every document kind shares. The GPL implementation's model/doc.Document satisfies it (compile-time asserted there).

Navigation into a document's content (component definition, parameters, features, sketches) is intentionally NOT here yet: those return collections and sub-objects, and Go interfaces are invariant in return position, so exposing them as a contract requires generics or adapters — a deliberate later step. Out-of-process add-ins reach that structure through oblikovati.org/api/wire today.

The surface is segregated into three embedded capability families (DocumentIdentity, DocumentDirtyState, DocumentLifecycle) so a consumer that only reads identity does not depend on the dirty/lifecycle verbs (audit I9). Document stays their union — every existing implementer and caller is unaffected.

type Document interface {
DocumentIdentity
DocumentDirtyState
DocumentLifecycle
}

type DocumentDirtyState

DocumentDirtyState is a document's unsaved-changes flag.

type DocumentDirtyState interface {
// Dirty reports unsaved changes; MarkDirty/ClearDirty toggle it.
Dirty() bool
MarkDirty()
ClearDirty()
}

type DocumentIdentity

DocumentIdentity is a document's naming and kind — the read-mostly identity surface.

type DocumentIdentity interface {
// DocumentType is the kind discriminator (part/assembly/drawing/presentation).
DocumentType() types.DocumentType

// SubType refines the base type with a flavored sub-type id (M03-F11) —
// types.SubTypePlain for an unflavored document.
SubType() types.DocumentSubTypeID

// DisplayName is the user-facing name (derived from the file name unless an
// explicit override is set).
DisplayName() string
SetDisplayName(name string)

// FullDocumentName is the canonical full identity; FullFileName is its on-disk
// path form.
FullDocumentName() string
FullFileName() string
}

type DocumentInterest

DocumentInterest is one registered interest record on a document.

type DocumentInterest interface {
// ClientID returns the owning client's id.
ClientID() string
// Name returns the interest's name; (ClientID, Name) is its identity.
Name() string
// InterestType returns the interest's strength.
InterestType() types.DocumentInterestType
// DataVersion returns the client-managed migration version, 0 for a
// non-migrating interest.
DataVersion() int
// ClientData returns the uninterpreted client payload.
ClientData() string
}

type DocumentInterests

DocumentInterests is a document's interest registry.

type DocumentInterests interface {
// Count returns the number of interest records.
Count() int
// Records returns the interest records in insertion order.
Records() []types.DocumentInterestRecord
// HasInterest reports whether any record's ClientID or Name matches
// clientIDOrName — the cheap discovery probe.
HasInterest(clientIDOrName string) bool
// Add registers the record, updating an existing (ClientID, Name) entry
// in place; it errors when ClientID or Name is empty.
Add(record types.DocumentInterestRecord) error
// Remove deletes the (clientID, name) record, reporting whether it existed.
Remove(clientID, name string) bool
}

type DocumentLifecycle

DocumentLifecycle is a document's load, visibility and packaging state.

type DocumentLifecycle interface {
// Open reports whether the document's content is paged in (false for an
// unopened reference stub); IsReferenceStub is the inverse predicate.
Open() bool
IsReferenceStub() bool

// Visible reports whether the document is shown (an open document may be
// hidden); Referenced reports whether other open documents depend on it.
Visible() bool
SetVisible(visible bool)
Referenced() bool

// Compacted reports whether the saved package is in compacted form.
Compacted() bool
}

type DrawingBorder

DrawingBorder is a sheet's border: the printable-area margins (millimetres) inset from the sheet edge.

type DrawingBorder interface {
// Margins returns the left, right, top and bottom inset in millimetres.
Margins() (left, right, top, bottom float64)
}

type DrawingDimension

DrawingDimension is one dimension on a drawing sheet (M14-F03 PBI-141, #388): a measured, annotated distance between two attachment points on a view. It is associative — its value re-measures when the referenced model changes. The GPL model implements it; an add-in reads it through this surface.

type DrawingDimension interface {
// Name is the dimension's name, unique within the sheet.
Name() string
// Type is how the distance is measured (aligned/horizontal/vertical).
Type() types.DrawingDimensionType
// ViewName is the drawing view the dimension is attached to.
ViewName() string
// ValueMM is the measured model distance in millimetres — the true size, independent of the
// view scale. It is 0 for an angular dimension (see ValueDeg).
ValueMM() float64
// ValueDeg is the measured angle in degrees for an angular dimension, and 0 otherwise.
ValueDeg() float64
// Text is the displayed dimension text (the formatted value).
Text() string
// CurveCount is the number of drawing curves the dimension renders (its extension lines,
// dimension line and arrowheads).
CurveCount() int
}

type DrawingDimensionStyle

DrawingDimensionStyle is the appearance of a dimension under the active standard: the text and arrow sizes, the displayed precision, the measurement unit, and the line weight.

type DrawingDimensionStyle interface {
// Name is the style's display name (e.g. "Default (ISO)").
Name() string
// TextHeightMM is the dimension text height in millimetres.
TextHeightMM() float64
// ArrowSizeMM is the dimension arrowhead size in millimetres.
ArrowSizeMM() float64
// DecimalPlaces is the number of fractional digits shown.
DecimalPlaces() int
// Unit is the measurement unit the value is displayed in.
Unit() types.DimensionUnit
// LineWeightMM is the dimension/extension line weight in millimetres.
LineWeightMM() float64
}

type DrawingLineStyle

DrawingLineStyle is the appearance of a drawing line under the active standard.

type DrawingLineStyle interface {
// Name is the style's display name.
Name() string
// WeightMM is the line weight in millimetres.
WeightMM() float64
}

type DrawingSheet

DrawingSheet is one sheet of a drawing: its name, size and orientation (which fix its width and height in millimetres), and its border/title-block presence.

type DrawingSheet interface {
// Name is the sheet's display name (unique within the drawing).
Name() string
// Size is the standard sheet size, or types.SheetSizeCustom for an explicit
// width/height.
Size() types.SheetSize
// Orientation is how the standard dimensions are laid out (portrait/landscape).
Orientation() types.SheetOrientation
// WidthMM and HeightMM are the laid-out dimensions in millimetres (orientation
// already applied).
WidthMM() float64
HeightMM() float64
// Border returns the sheet's border, or nil if it has none.
Border() DrawingBorder
// TitleBlock returns the sheet's title block, or nil if it has none.
TitleBlock() DrawingTitleBlock
}

type DrawingStandardStyle

DrawingStandardStyle is one drafting standard's complete style preset.

type DrawingStandardStyle interface {
// Standard is the drafting standard this preset implements.
Standard() types.DraftingStandard
// DimensionStyle, TextStyle and LineStyle are the preset's component styles.
DimensionStyle() DrawingDimensionStyle
TextStyle() DrawingTextStyle
LineStyle() DrawingLineStyle
}

type DrawingStylesManager

DrawingStylesManager is a drawing's style system: the active drafting standard and its resolved style preset. Switching the standard re-points the active preset, so every annotation re-renders to it.

type DrawingStylesManager interface {
// ActiveStandard is the drawing's current drafting standard.
ActiveStandard() types.DraftingStandard
// ActiveStyle is the style preset of the active standard.
ActiveStyle() DrawingStandardStyle
}

type DrawingTextStyle

DrawingTextStyle is the appearance of annotation text under the active standard.

type DrawingTextStyle interface {
// Name is the style's display name.
Name() string
// FontName is the text font family.
FontName() string
// HeightMM is the text height in millimetres.
HeightMM() float64
}

type DrawingTitleBlock

DrawingTitleBlock is a sheet's title block: a named definition and the resolved field values (each field's static text or the value pulled from the referenced model's iProperties).

type DrawingTitleBlock interface {
// DefinitionName is the title-block definition this block instantiates.
DefinitionName() string
// FieldValue returns the resolved text of the named field, and whether the field
// exists.
FieldValue(name string) (string, bool)
}

type DrawingView

DrawingView is one view on a sheet: its name, the orientation it projects from, its scale, rendering style, sheet position (millimetres) and the number of drawing curves it produced.

type DrawingView interface {
// Name is the view's display name (unique within the drawing).
Name() string
// Type discriminates the view kind (base, projected, auxiliary, section, detail, break).
Type() types.DrawingViewType
// ParentView is the name of the view this one derives from (projected/auxiliary/section/
// detail), or "" for a base view.
ParentView() string
// IsProjected reports whether this is a projected view (derived from a base view) rather
// than a base view.
IsProjected() bool
// Orientation is the standard orientation the view projects from.
Orientation() types.BaseViewOrientation
// Scale is the model→sheet scale factor (e.g. 0.5 for 1:2).
Scale() float64
// Style is the view's rendering style.
Style() types.DrawingViewStyle
// CenterMM is the view centre on the sheet, in millimetres.
CenterMM() (x, y float64)
// CurveCount is the number of drawing curves (visible + hidden) the view holds.
CurveCount() int
}

type DriveSettings

DriveSettings describes one drive: which variable to sweep, the value range and step, how many times to repeat, whether to ping-pong (end→start as well as start→end), and whether a collision halts the sweep. Values are in the variable's units (radians for angular, centimetres for linear).

type DriveSettings interface {
// Variable selects which driven variable the drive sweeps (natural/angular/linear).
Variable() types.DriveVariable
// Range returns the start and end values of the sweep (variable units).
Range() (start, end float64)
// Step returns the increment between consecutive frames (variable units, always positive).
Step() float64
// RepetitionCount returns how many times the sweep repeats (1 = a single pass).
RepetitionCount() int
// RepetitionStartEndStart reports whether each repetition also plays back end→start
// (a ping-pong), versus restarting at the start value.
RepetitionStartEndStart() bool
// CollisionDetection reports whether the drive halts when the moved component interferes
// with another.
CollisionDetection() bool
}

type EdgeDisplaySettings

EdgeDisplaySettings is the document's edge, silhouette and hidden-line appearance.

type EdgeDisplaySettings interface {
// EdgeColor is the document's model-edge color override.
EdgeColor() types.Color
// DepthDimming reports whether distant geometry is dimmed.
DepthDimming() bool
// DisplaySilhouettes reports whether silhouette edges are drawn.
DisplaySilhouettes() bool
// HiddenLineDimmingPercent is the 0–100 dimming applied to hidden lines.
HiddenLineDimmingPercent() int
}

type EllipseFull

EllipseFull is a full 3D ellipse.

type EllipseFull interface {
Curve
Center() types.Point
Normal() types.UnitVector
MajorAxis() types.UnitVector
MajorRadius() float64
MinorRadius() float64
}

type EllipseFull2d

EllipseFull2d is a full 2D ellipse.

type EllipseFull2d interface {
Curve2d
Center() types.Point2d
MajorAxis() types.UnitVector2d
MajorRadius() float64
MinorRadius() float64
}

type EllipticalArc

EllipticalArc is a bounded span of a 3D ellipse.

type EllipticalArc interface {
Curve
Center() types.Point
Normal() types.UnitVector
MajorAxis() types.UnitVector
MajorRadius() float64
MinorRadius() float64
StartAngle() float64
SweepAngle() float64
}

type EllipticalArc2d

EllipticalArc2d is a bounded span of a 2D ellipse.

type EllipticalArc2d interface {
Curve2d
Center() types.Point2d
MajorAxis() types.UnitVector2d
MajorRadius() float64
MinorRadius() float64
StartAngle() float64
SweepAngle() float64
}

type EllipticalCone

EllipticalCone is an unbounded cone with an elliptical section.

type EllipticalCone interface {
Surface
ApexPoint() types.Point
Axis() types.UnitVector
MajorAxis() types.UnitVector
MajorHalfAngle() float64
MinorHalfAngle() float64
}

type EllipticalCylinder

EllipticalCylinder is an unbounded cylinder with an elliptical section.

type EllipticalCylinder interface {
Surface
BasePoint() types.Point
Axis() types.UnitVector
MajorAxis() types.UnitVector
MajorRadius() float64
MinorRadius() float64
}

type EndOfFeatures

EndOfFeatures is the assembly's rollback marker — how far down the assembly feature program the model evaluates. Moving it up rolls the assembly back, suppressing the trailing features from evaluation (M11-F08, Oblikovati/Oblikovati#633/#725). The host implementation lives in /source (compdef.AssemblyFeatures).

type EndOfFeatures interface {
// EndOfFeaturesPosition returns the feature index evaluated up to, or -1 when the
// whole program is evaluated (the marker is at the end).
EndOfFeaturesPosition() int
// IsRolledBack reports whether the marker sits before the end of the program.
IsRolledBack() bool
// SetEndOfFeatures moves the marker to position (negative restores it to the end).
SetEndOfFeatures(position int)
// RollToEnd moves the marker back to the end, re-including every feature.
RollToEnd()
}

type EndOfPart

EndOfPart is a part's rollback marker (the "end-of-part" marker, #141) — how far down the part feature program the model evaluates. Moving it up rolls the part back, suppressing the trailing features from evaluation so a user can inspect an earlier state or author a feature mid-history. It is the part analogue of EndOfFeatures (which is the assembly's marker); the host implementation lives in /source (compdef.PartComponentDefinition).

type EndOfPart interface {
// EndOfPartPosition returns the feature index evaluated up to, or -1 when the whole program
// is evaluated (the marker is at the end).
EndOfPartPosition() int
// IsRolledBack reports whether the marker sits before the end of the program, so some trailing
// features are currently suppressed.
IsRolledBack() bool
// SetEndOfPart moves the marker to position (a negative index restores it to the end).
SetEndOfPart(position int)
// RollToEnd moves the marker back to the end, re-including every feature.
RollToEnd()
}

type FaceShell

FaceShell is one connected face group of a body: the outer skin or an inner cavity (void) skin.

type FaceShell interface {
// IsClosed reports whether the shell bounds a region; IsVoid whether it
// is an inner cavity skin (its material-outward normals face inward).
IsClosed() bool
IsVoid() bool
// Volume is the magnitude of the bounded region's volume (cm³).
Volume() float64
FaceCount() int
EdgeCount() int
// IsPointInside classifies a point against the shell's bounded region.
IsPointInside(x, y, z float64) types.Containment
// ReferenceKey returns the persistent reference key (M03 scheme);
// TransientKey the session-stable id.
ReferenceKey() []byte
TransientKey() uint64
}

type FaceShells

FaceShells enumerates a body's shells.

type FaceShells interface {
Count() int
Item(index int) FaceShell
}

type File

File is one document file: identity, load state, and its reference records.

type File interface {
// FullFileName returns the file's absolute on-disk name.
FullFileName() string
// InternalName returns the stable GUID minted when the file was created;
// it survives renames and save-as copies are re-minted.
InternalName() string
// RevisionID returns the GUID stamping the file's content as of its last
// save. Any save mints a new one.
RevisionID() string
// DatabaseRevisionID returns the GUID stamping only the model content
// (geometry/reference changes); a property-only save keeps it.
DatabaseRevisionID() string
// FileSaveCounter returns how many times the file has been saved.
FileSaveCounter() int
// VersionCreated returns the software version that created the file.
VersionCreated() string
// VersionSaved returns the software version that last saved the file.
VersionSaved() string
// Loaded reports whether any document within this file is loaded.
Loaded() bool
// Referenced reports whether any other in-memory file references this one.
Referenced() bool
}

type FileAttachment

FileAttachment is one attachment record on a document.

type FileAttachment interface {
// Name returns the unique name other objects bind to.
Name() string
// Kind returns whether the foreign file is linked, embedded or generic.
Kind() types.AttachmentKind
// FullFileName returns the as-recorded path, "" for embedded payloads.
FullFileName() string
// ResolvedFileName returns where the path resolved this session, "" while
// missing (linked/generic only).
ResolvedFileName() string
// Status derives the attachment's freshness from resolution and the
// last-known file time.
Status() types.ReferenceStatus
// LastKnownFileTime returns the target's modification time as recorded at
// attach/save; the zero time when unknown or embedded.
LastKnownFileTime() time.Time
// BrowserVisible reports whether the attachment shows in the model browser.
BrowserVisible() bool
// SetBrowserVisible toggles the attachment's browser visibility.
SetBrowserVisible(visible bool)
}

type FileAttachments

FileAttachments is a document's attachment collection.

type FileAttachments interface {
// Count returns the number of attachment records.
Count() int
// Names returns the attachment names in insertion order.
Names() []string
// ByName returns the named attachment, ok=false when absent.
ByName(name string) (FileAttachment, bool)
// Add attaches the file at fullFileName under the unique name, erroring on
// a duplicate name or (for embedded kinds) an unreadable file.
Add(name string, kind types.AttachmentKind, fullFileName string) (FileAttachment, error)
// Remove deletes the named record, reporting whether it existed.
Remove(name string) bool
}

type FileDescriptor

FileDescriptor is the persisted "as-saved" record of one file-to-file reference held by a file: the logical (relative + library) name, where it resolved this session, and the flags explaining a broken reference.

It is segregated into three embedded capability families (FileReferenceIdentity, FileReferenceStatus, FileReferenceRepair) so a read-only consumer of a reference's status does not depend on the repair mutation (audit I9). FileDescriptor stays their union — every existing implementer and caller is unaffected.

type FileDescriptor interface {
FileReferenceIdentity
FileReferenceStatus
FileReferenceRepair
}

type FileReferenceIdentity

FileReferenceIdentity is a file reference's as-saved logical and resolved names.

type FileReferenceIdentity interface {
// FullFileName returns the reference's as-saved full file name.
FullFileName() string
// RelativeFileName returns the workspace-relative spelling, "" when the
// target lies outside the project workspace.
RelativeFileName() string
// LibraryName returns the owning library's name, "" for non-library refs.
LibraryName() string
// LocationType classifies where the reference resolved.
LocationType() types.FileLocationType
// ResolvedFileName returns where the reference resolved this session,
// "" while missing.
ResolvedFileName() string
// ReferencedFileInternalName returns the target's identity GUID as saved.
ReferencedFileInternalName() string
// FileSaveCounter returns the target's save counter as saved, for
// out-of-date detection.
FileSaveCounter() int
}

type FileReferenceRepair

FileReferenceRepair re-points a broken reference — the mutation a read-only consumer of a reference's status never depends on.

type FileReferenceRepair interface {
// ReplaceReference re-points this record at fullFileName (a repair),
// erroring when the replacement cannot be loaded.
ReplaceReference(fullFileName string) error
}

type FileReferenceStatus

FileReferenceStatus is a file reference's resolution state — the derived status and the flags that explain a broken reference.

type FileReferenceStatus interface {
// Status derives the single status vocabulary from the flags below.
Status() types.ReferenceStatus
// ReferenceMissing reports that the target cannot be found anywhere.
ReferenceMissing() bool
// ReferenceReplaced reports that the reference was re-pointed (repaired)
// and the owner has not been saved since.
ReferenceReplaced() bool
// ReferenceLocationDifferent reports the target was found somewhere other
// than the as-saved location.
ReferenceLocationDifferent() bool
// ReferenceInternalNameDifferent reports the found file carries a
// different identity GUID than the one saved against.
ReferenceInternalNameDifferent() bool
}

type FlushConstraint

FlushConstraint makes two faces co-planar with aligned normals.

type FlushConstraint interface{ AssemblyConstraint }

type GraphicsColorMapper

GraphicsColorMapper maps scalar vertex values to colors (a heatmap legend). It is either inline on a primitive or registered by name and shared.

type GraphicsColorMapper interface {
Name() string
StopCount() int
// ColorAt resolves the color for a scalar value, interpolating between stops and clamping.
ColorAt(value float64) types.Color
}

type GraphicsColorSet

GraphicsColorSet is a shared pool of colors with a binding mode (per-vertex/per-item/overall).

type GraphicsColorSet interface {
Count() int
At(i int) types.Color
Binding() types.ColorBindingEnum
}

type GraphicsCoordinateSet

GraphicsCoordinateSet is a shared pool of vertex positions (cm). Primitives index into it so shared vertices are stored once.

type GraphicsCoordinateSet interface {
Count() int
At(i int) types.Point
}

type GraphicsDataSets

GraphicsDataSets are a node's shared, anti-duplicated data pools the primitives index into.

type GraphicsDataSets interface {
Coordinates() GraphicsCoordinateSet
Colors() GraphicsColorSet
Indices() GraphicsIndexSet
Normals() GraphicsNormalSet
TextureCoordinates() GraphicsTextureCoordinateSet
Images() GraphicsImageSet
}

type GraphicsImageSet

GraphicsImageSet is a shared pool of images referenced by image-billboard primitives.

type GraphicsImageSet interface {
Count() int
Path(i int) string
}

type GraphicsIndexSet

GraphicsIndexSet is a shared pool of 0-based indices into a coordinate/color/normal set.

type GraphicsIndexSet interface {
Count() int
At(i int) int
}

type GraphicsNormalSet

GraphicsNormalSet is a shared pool of vertex normals with a binding mode.

type GraphicsNormalSet interface {
Count() int
At(i int) types.Vector
Binding() types.NormalBindingEnum
}

type GraphicsObjectNode

GraphicsObjectNode is the object-model view of one graphics node: its transform, flags, the owner it is anchored to, the typed primitives it holds, and the data sets they index into.

type GraphicsObjectNode interface {
// Id is the node's id within its group.
Id() string
// Transform places the node's geometry (identity when unset).
Transform() types.Matrix
// Visibility reports whether none/some/all of the node is visible.
Visibility() types.GraphicsVisibilityEnum
// Selectability reports whether none/some/all of the node is pickable.
Selectability() types.GraphicsSelectabilityEnum
// ComponentKey is the reference key of the component/feature this node is anchored to, or "".
ComponentKey() string
// DataSets are the shared data pools the primitives index into.
DataSets() GraphicsDataSets
// Primitives are the typed primitives the node holds.
Primitives() []GraphicsPrimitive
}

type GraphicsPrimitive

GraphicsPrimitive is the base scalar view shared by every typed primitive: its kind, the overall color, and its selectability/depth behavior.

type GraphicsPrimitive interface {
// Kind is the primitive's topology/type (a types.GraphicsPrimitiveKind value).
Kind() types.GraphicsPrimitiveKind
// OverallColor is the primitive's broadcast color (when ColorBinding is overall).
OverallColor() types.Color
// Selectable reports whether the primitive participates in picking.
Selectable() bool
// OnTop reports whether the primitive draws through occluders (depth test off).
OnTop() bool
}

type GraphicsTextureCoordinateSet

GraphicsTextureCoordinateSet is a shared pool of uv texture coordinates for image-mapped meshes.

type GraphicsTextureCoordinateSet interface {
Count() int
At(i int) (u, v float64)
}

type GroundPlaneSettings

GroundPlaneSettings is the in-process contract for a document's ground plane — the receiver the renderer drops shadows and reflections onto. Scoped to what the renderer consumes; the GPL app satisfies it (compile-time asserted there). Lengths are cm; Opacity/Reflectivity in [0,1].

type GroundPlaneSettings interface {
// Visible reports whether the ground plane is drawn.
Visible() bool
// Color is the ground plane's color.
Color() types.Color
// HeightOffset is the plane's signed offset along its up direction (cm).
HeightOffset() float64
// DisplayGridLines reports whether the grid is drawn.
DisplayGridLines() bool
// MinorGridLineSpacing is the spacing between minor grid lines (cm).
MinorGridLineSpacing() float64
// MinorLinesPerMajorGridLine is how many minor lines fall between major lines.
MinorLinesPerMajorGridLine() int
// Opacity is the plane's opacity in [0,1].
Opacity() float64
// Reflectivity is the mirror reflection strength in [0,1].
Reflectivity() float64
}

type GroundShadowSettings

GroundShadowSettings is the document's ground-plane, shadow and reflection state.

type GroundShadowSettings interface {
// GroundPlane returns the document's ground-plane settings.
GroundPlane() GroundPlaneSettings
// GroundShadow is the ground-shadow style (none/standard/x-ray).
GroundShadow() types.GroundShadowEnum
// ShadowDirection is the light source shadows are cast from.
ShadowDirection() types.ShadowDirectionEnum
// ShowGroundReflections reports whether the ground plane mirrors the model.
ShowGroundReflections() bool
// ShowObjectShadows reports whether objects cast shadows on each other.
ShowObjectShadows() bool
// ShowAmbientShadows reports whether ambient-occlusion shadows are drawn.
ShowAmbientShadows() bool
}

type HelicalCurveDefinition

HelicalCurveDefinition is the scalar view of a 3D sketch helical curve's definition (M06-F09, Oblikovati/Oblikovati#624). The host's model/sketch.HelixDefinition satisfies this via a compile-time assertion.

type HelicalCurveDefinition interface {
// ShapeKind is how the shape is specified (pitch/height/revolutions/spiral).
ShapeKind() types.HelicalShapeDefinitionKind
// Variable reports a row-table (variable-shape) definition.
Variable() bool
// RowCount is the number of shape stations (0 for a constant shape).
RowCount() int
// Clockwise is the winding handedness.
Clockwise() bool
// StartEnd and EndEnd are the end transition conditions.
StartEnd() types.HelixEndKind
EndEnd() types.HelixEndKind
}

type Helix

Helix is a 3D (possibly conical) helix — an Oblikovati extension; the reference has no transient helix.

type Helix interface {
Curve
BasePoint() types.Point
Axis() types.UnitVector
StartRadius() float64
// Pitch is the axial advance per turn; TaperPerTurn the radial change per
// turn (0 for a true cylinder helix).
Pitch() float64
TaperPerTurn() float64
Turns() float64
}

type ImageGraphics

ImageGraphics is an image-billboard primitive (a textured quad).

type ImageGraphics interface {
GraphicsPrimitive
// ImagePath is the source image file.
ImagePath() string
// Anchor is the billboard's world anchor.
Anchor() types.Point
// Behavior is the view-relative behavior (front-facing / pixel scaling).
Behavior() types.DisplayTransformBehaviorEnum
}

type InsertConstraint

InsertConstraint combines an axis mate with a plane mate (a bolt into a hole).

type InsertConstraint interface {
AssemblyConstraint
// Aligned reports the aligned plane sense; false is the default opposed sense.
Aligned() bool
}

type InterferenceResult

InterferenceResult is one overlapping pair from a static interference analysis: the two occurrences and the volume (and a representative point) of their overlap.

type InterferenceResult interface {
// OccurrenceA / OccurrenceB are the session ids of the two interfering occurrences.
OccurrenceA() uint64
OccurrenceB() uint64
// Volume is the overlap volume (cubic centimetres).
Volume() float64
}

type InterferenceResults

InterferenceResults is the outcome of an interference analysis: the interfering pairs and the total overlap volume.

type InterferenceResults interface {
// Count returns the number of interfering pairs found.
Count() int
// Item returns the i-th interference result, or nil when out of range.
Item(i int) InterferenceResult
// TotalVolume is the sum of every pair's overlap volume.
TotalVolume() float64
}

type JointLimits

JointLimits bounds a joint's driven values: a linear range and an angular range, each bound independently optional.

type JointLimits interface {
// LinearMinimum returns the lower linear bound (cm) and whether it is set.
LinearMinimum() (float64, bool)
// LinearMaximum returns the upper linear bound (cm) and whether it is set.
LinearMaximum() (float64, bool)
// AngularMinimum returns the lower angular bound (radians) and whether it is set.
AngularMinimum() (float64, bool)
// AngularMaximum returns the upper angular bound (radians) and whether it is set.
AngularMaximum() (float64, bool)
}

type LevelOfDetailRepresentation

LevelOfDetailRepresentation suppresses occurrences for performance on large assemblies.

type LevelOfDetailRepresentation interface {
Representation
// SuppressedCount returns the number of occurrences the representation suppresses.
SuppressedCount() int
}

type LevelOfDetailRepresentations

DesignViewRepresentations / PositionalRepresentations / LevelOfDetailRepresentations are the per-family collections in creation order (host: assembly.Representations).

type LevelOfDetailRepresentations interface {
Count() int
Item(i int) LevelOfDetailRepresentation
}

type Light

Light is the in-process contract for one scene light, scoped to the properties our renderer consumes. It is read-mostly here; mutation goes through the wire methods / the app. The GPL app satisfies it (compile-time asserted there).

Direction and Position are world-space [3]float64 (cm); Direction points from a lit surface toward the light. Color is a [types.Rgba]; Intensity scales it. Spot and attenuation getters are meaningful only for the matching [types.LightDefinitionTypeEnum].

type Light interface {
// LightType is the coordinate space the light lives in (model/view/ground-plane).
LightType() types.LightTypeEnum
// LightDefinitionType is the emission shape (directional/point/spot).
LightDefinitionType() types.LightDefinitionTypeEnum
// On reports whether the light contributes to the scene.
On() bool
// Color is the light's color.
Color() types.Rgba
// Intensity scales the color (≥ 0).
Intensity() float64
// Direction is the unit vector from a lit surface toward the light (directional/spot).
Direction() [3]float64
// Position is the light's world-space position (point/spot).
Position() [3]float64
// SpotInnerAngle is the spot cone's inner half-angle in radians (full intensity within).
SpotInnerAngle() float64
// SpotOuterAngle is the spot cone's outer half-angle in radians (zero intensity beyond).
SpotOuterAngle() float64
// Attenuation is the (constant, linear, quadratic) distance falloff (point/spot).
Attenuation() [3]float64
}

type LightingStyle

LightingStyle is the in-process contract for a lighting rig, scoped to the global controls our renderer consumes plus the discrete [Light]s. The GPL app satisfies it (compile-time asserted there).

Ambience, Brightness and the IBL/shadow scalars are unit-free multipliers/intensities in [0,1] unless noted; Exposure is in stops. StyleType distinguishes a standard light rig from an image-based (HDR) one.

type LightingStyle interface {
// Name is the style's user-facing label.
Name() string
// StyleType is whether this is a standard or image-based style.
StyleType() types.LightingStyleTypeEnum
// Ambience is the global ambient fill in [0,1].
Ambience() float64
// Brightness is the global light multiplier.
Brightness() float64
// Exposure is the tone-map exposure in stops.
Exposure() float64
// Lights are the discrete lights in this style (may be empty for a pure IBL style).
Lights() []Light
// ImageBasedLightingBrightness scales the IBL contribution in [0,1].
ImageBasedLightingBrightness() float64
// ImageBasedLightingRotation spins the environment about vertical, in radians.
ImageBasedLightingRotation() float64
// ShadowDensity is the cast-shadow darkness in [0,1].
ShadowDensity() float64
// ShadowSoftness is the cast-shadow edge blur in [0,1].
ShadowSoftness() float64
// ShadowDirection is the source direction shadows are cast from.
ShadowDirection() types.ShadowDirectionEnum
}

type Line

Line is an unbounded 3D line.

type Line interface {
Curve
RootPoint() types.Point
Direction() types.UnitVector
}

type Line2d

Line2d is an unbounded 2D line.

type Line2d interface {
Curve2d
RootPoint() types.Point2d
Direction() types.UnitVector2d
}

type LineGraphics

LineGraphics is an indexed line-list primitive.

type LineGraphics interface {
GraphicsPrimitive
// LineSpace is the space the line's width/pattern is defined in.
LineSpace() types.LineDefinitionSpaceEnum
}

type LineSegment

LineSegment is a bounded 3D line span.

type LineSegment interface {
Curve
StartPoint() types.Point
EndPoint() types.Point
}

type LineSegment2d

LineSegment2d is a bounded 2D line span.

type LineSegment2d interface {
Curve2d
StartPoint() types.Point2d
EndPoint() types.Point2d
}

type LineStripGraphics

LineStripGraphics is a connected-polyline primitive.

type LineStripGraphics interface{ LineGraphics }

type MateConstraint

MateConstraint makes two geometries coincident with a directional solution (opposed faces, the default, or aligned). It is the read surface of a mate.

type MateConstraint interface {
AssemblyConstraint
// SolutionType is the directed sense the solver enforces on the two normals.
SolutionType() types.MateConstraintSolutionType
}

type Material

Material is the in-process contract for one physical-world material: its density and mechanical/thermal/electrical properties, plus the appearance it renders with. The GPL model/material.Material satisfies it (compile-time asserted there).

A material references its appearance by id (Material.AppearanceID); the appearance itself is a separate asset, so several materials can share one look and an appearance can be edited independently.

type Material interface {
// ID is the stable identity used by assignments and library lookups.
ID() string
// DisplayName is the label shown in the material browser.
DisplayName() string
// Source says whether this is a built-in, project, or document-embedded asset.
Source() types.AssetSource
// Density is the material density in g/cm³ (mass = density × volume).
Density() float64
// Mechanical returns the structural properties.
Mechanical() types.Mechanical
// Thermal returns the heat-related properties.
Thermal() types.Thermal
// Electrical returns the electrical properties.
Electrical() types.Electrical
// Magnetic returns the magnetostatics properties (μr, Br, Hc, Bsat). The zero value is
// a non-magnetic material; soft-magnetic cores and permanent magnets carry a class.
Magnetic() types.Magnetic
// IsotropyClass declares the material's elastic symmetry. An isotropic material is
// fully described by Mechanical; orthotropic / transversely-isotropic materials also
// carry Anisotropic. Never returns the empty string — an unset class reports Isotropic.
IsotropyClass() types.IsotropyClass
// Anisotropic returns the direction-dependent elastic constants, or the zero value for
// an isotropic material. Meaningful only when IsotropyClass is not Isotropic.
Anisotropic() types.AnisotropicElastic
// AppearanceID is the id of the appearance this material renders with.
AppearanceID() string
}

type MeshTranslator

MeshTranslator is the in-process contract for a foreign-mesh-format translator: it reports which formats it can read/write so the host (or an add-in registering its own translator) can route an import/export request to the right backend. The GPL implementation (model/exchange) satisfies it (compile-time asserted there).

The actual byte-level translation crosses the wire as documents.import / documents.export (oblikovati.org/api/wire); this contract is the capability query that lets the host pick a translator without hard-coding the format list.

Example:

if t.CanImport(types.FormatSTL) { /* route an .stl through t */ }
type MeshTranslator interface {
// Formats lists every format this translator handles (in either direction).
Formats() []types.ExchangeFormat
// CanImport reports whether this translator can read the given format.
CanImport(format types.ExchangeFormat) bool
// CanExport reports whether this translator can write the given format.
CanExport(format types.ExchangeFormat) bool
}

type ModelState

ModelState is a named tuple selecting one representation of each family — the single switch users flip. An empty family name means "leave that family's active representation unchanged".

type ModelState interface {
// ID is the model state's session id.
ID() uint64
// Name is the model state's display name.
Name() string
// DesignViewName / PositionalName / LevelOfDetailName are the selected representations'
// names (empty when the family is left unchanged).
DesignViewName() string
PositionalName() string
LevelOfDetailName() string
// Active reports whether this model state is the active one.
Active() bool
}

type ModelStates

ModelStates is the assembly's model-state collection (host: assembly.ModelStateSet).

type ModelStates interface {
// Count returns the number of model states.
Count() int
// Item returns the model state at index i, or nil when out of range.
Item(i int) ModelState
}

type NameValueMap

NameValueMap is the ordered string→variant options/context bag. Names are unique; entry order is meaningful and preserved.

type NameValueMap interface {
// Count returns the number of entries.
Count() int
// NameAt returns the name at the 0-based index, erroring out of range.
NameAt(index int) (string, error)
// ValueAt returns the value at the 0-based index, erroring out of range.
ValueAt(index int) (types.Variant, error)
// Value returns the value for name, ok=false when absent.
Value(name string) (types.Variant, bool)
// Set adds the entry, or replaces the value when name already exists.
Set(name string, value types.Variant)
// Insert places a new entry before (or after) the entry at targetIndex,
// erroring when the name already exists or the index is out of range.
Insert(name string, value types.Variant, targetIndex int, before bool) error
// Remove deletes the named entry, reporting whether it existed.
Remove(name string) bool
// Clear removes every entry.
Clear()
// Names returns the entry names in order.
Names() []string
}

type ObjectCollection

ObjectCollection is the ordered, mutable object-reference collection accepted wherever the reference API takes an ObjectCollection.

type ObjectCollection interface {
ObjectsEnumerator
// Add appends a reference (duplicates are allowed, as in the reference).
Add(ref types.ObjectRef)
// RemoveAt deletes the entry at the 0-based index, erroring out of range.
RemoveAt(index int) error
// RemoveRef deletes the first entry equal to ref, reporting whether one existed.
RemoveRef(ref types.ObjectRef) bool
// Clear removes every reference.
Clear()
}

type ObjectCollectionByVariant

ObjectCollectionByVariant is the ordered, mutable, string-keyed object-reference collection. Keys are unique.

type ObjectCollectionByVariant interface {
ObjectsEnumeratorByVariant
// Add appends a keyed reference, erroring when the key already exists.
Add(key string, ref types.ObjectRef) error
// Remove deletes the keyed entry, reporting whether it existed.
Remove(key string) bool
// RemoveAt deletes the entry at the 0-based index, erroring out of range.
RemoveAt(index int) error
// Clear removes every entry.
Clear()
}

type ObjectsEnumerator

ObjectsEnumerator is the read-only ordered view over object references — the result shape of query methods.

type ObjectsEnumerator interface {
// Count returns the number of references.
Count() int
// At returns the reference at the 0-based index, erroring out of range.
At(index int) (types.ObjectRef, error)
// Refs returns the references in order (a copy; mutating it is safe).
Refs() []types.ObjectRef
}

type ObjectsEnumeratorByVariant

ObjectsEnumeratorByVariant is the read-only ordered view over string-keyed object references.

type ObjectsEnumeratorByVariant interface {
// Count returns the number of entries.
Count() int
// KeyAt returns the key at the 0-based index, erroring out of range.
KeyAt(index int) (string, error)
// At returns the reference at the 0-based index, erroring out of range.
At(index int) (types.ObjectRef, error)
// ByKey returns the reference for key, ok=false when absent.
ByKey(key string) (types.ObjectRef, bool)
}

type OccurrencePattern

OccurrencePattern is the scalar read surface of an assembly component pattern — a seed component replicated across an arrangement (host: occurrence.OccurrencePattern). The generated placements are created/read as occurrences over api/wire (assembly.patternCreate, assembly.occurrences).

type OccurrencePattern interface {
// Count returns the number of elements the arrangement generates (incl. the seed).
Count() int
}

type OccurrencePatternElement

OccurrencePatternElement is the scalar read surface of one replicated instance in an assembly component pattern (M11-F04, Oblikovati/Oblikovati#729): whether it is suppressed and whether its placement has been individually overridden. The element's transform is read with the occurrence tree over api/wire. Host: occurrence.OccurrencePatternElement.

type OccurrencePatternElement interface {
// Suppressed reports whether this element is excluded from the model.
Suppressed() bool
// Repositioned reports whether this element's placement was individually overridden.
Repositioned() bool
}

type Parameter

Parameter is the in-process contract for one parametric variable: the authored expression, its category, the value the model consumes, the unit category, the engineering tolerance, and the evaluation health. The GPL implementation's model/param.Parameter satisfies it (compile-time asserted there).

The unit-bearing value is projected leanly: Parameter.NominalValue + Parameter.UnitName give value and dimensional category without dragging the host's dimensional-arithmetic Quantity type across the boundary. The JSON view of a parameter (expression + formatted value + health) is also available via oblikovati.org/api/wire.ParameterInfo.

type Parameter interface {
// Name is the display label.
Name() string
// Kind is the parameter category (model/user/reference/derived/table).
Kind() types.ParameterKind
// Expression is the authored expression source (e.g. "width * 2").
Expression() string
// NominalValue is the evaluated value before the tolerance is applied (database
// units); [Parameter.ModelValue] applies the tolerance.
NominalValue() float64
// ModelValue is the value the model consumes after the tolerance is applied
// (database units).
ModelValue() float64
// UnitName is the parameter's dimensional unit category (e.g. "Length", "Angle",
// "Unitless") — the reference API's Parameter.Units. It is the category, not the
// document's display unit; format a display string via the host where needed.
UnitName() string
// Tolerance is the engineering-tolerance band; the zero value is the standard
// tolerance (see [types.Tolerance]).
Tolerance() types.Tolerance
// IsHealthy reports whether the parameter evaluated cleanly. The full status enum is a
// host-internal concept (#1501); the contract exposes only this flag plus the reason.
IsHealthy() bool
// HealthReason is the human-readable reason when the parameter is not healthy ("" when
// healthy) — a failed expression, a cycle, or a removed derived source.
HealthReason() string
// SetExpression replaces the expression; it errors for read-only kinds and for
// malformed source (see [types.ParameterKind.Editable]).
SetExpression(src string) error
}

type Plane

Plane is an unbounded planar surface with an orthonormal in-plane basis.

type Plane interface {
Surface
RootPoint() types.Point
PlaneNormal() types.UnitVector
UAxis() types.UnitVector
VAxis() types.UnitVector
}

type PointGraphics

PointGraphics is a point-marker primitive drawn with a render style.

type PointGraphics interface {
GraphicsPrimitive
// RenderStyle is the glyph each point draws.
RenderStyle() types.PointRenderStyleEnum
}

type Polyline2d

Polyline2d is a piecewise-linear 2D path.

type Polyline2d interface {
Curve2d
Points() []types.Point2d
}

type Polyline3d

Polyline3d is a piecewise-linear 3D path.

type Polyline3d interface {
Curve
Points() []types.Point
}

type PositionalRepresentation

PositionalRepresentation overrides constraint/joint values (and per-occurrence flexibility); activating it re-solves the assembly to the alternate position.

type PositionalRepresentation interface {
Representation
// OverrideCount returns the number of constraint/joint value overrides it carries.
OverrideCount() int
}

type PositionalRepresentations

DesignViewRepresentations / PositionalRepresentations / LevelOfDetailRepresentations are the per-family collections in creation order (host: assembly.Representations).

type PositionalRepresentations interface {
Count() int
Item(i int) PositionalRepresentation
}

type Profile

Profile is the scalar view of a sketch region a feature consumes: its enclosed area and whether it is closed (extrudable into a solid). The host's model/sketch.Profile satisfies this.

type Profile interface {
// Area is the profile's enclosed area in sketch-plane cm² (holes subtracted).
Area() float64
// IsClosed reports whether the profile encloses a region.
IsClosed() bool
}

type Profile3D

Profile3D is the scalar view of a closed, planar loop of a 3D sketch a planar-section feature consumes: its enclosed area and that it is closed. The host's model/sketch.Profile3D satisfies this.

type Profile3D interface {
// Area is the loop's enclosed area in model cm².
Area() float64
// IsClosed reports whether the loop encloses a region (always true for a Profile3D).
IsClosed() bool
}

type ReferencedFileDescriptor

ReferencedFileDescriptor is the document-side view of one file reference: status plus the bridge to the resolved document.

type ReferencedFileDescriptor interface {
// DisplayName returns the reference's human-readable name.
DisplayName() string
// FullFileName returns the reference's as-saved full file name.
FullFileName() string
// Status derives the reference's resolution state.
Status() types.ReferenceStatus
// DocumentFound reports whether a document resolved for this reference.
DocumentFound() bool
// DifferentDocument reports the resolved document is not the one saved
// against (a substitute supplied by resolution or repair).
DifferentDocument() bool
}

type RegionProperties

RegionProperties is the scalar view of a closed profile region's section properties (M06-F08, Oblikovati/Oblikovati#623). All values are in database units (cm-based) on the profile's plane; the inertia values are about the region's centroid. The host's model/sketch region calculator satisfies this via a compile-time assertion.

type RegionProperties interface {
// Accuracy is the computational accuracy the values were computed at.
Accuracy() types.Accuracy
// Area is the enclosed area in cm² (holes subtracted).
Area() float64
// Perimeter is the total boundary length in cm (holes' rims included).
Perimeter() float64
// Centroid is the area centroid [x, y] in sketch-plane cm.
Centroid() (x, y float64)
// MomentsOfInertia are the centroidal second moments Ixx, Iyy and the
// product Ixy, in cm⁴.
MomentsOfInertia() (ixx, iyy, ixy float64)
// PrincipalMoments are the principal second moments I1 ≥ I2 in cm⁴.
PrincipalMoments() (i1, i2 float64)
// RotationAngle is the CCW angle in radians from the sketch X axis to the
// first principal axis.
RotationAngle() float64
}

type Representation

Representation is the identity common to every representation family: a session id, a display name, its kind, and whether it is the active representation of its family.

type Representation interface {
// ID is the representation's session id, unique within its family's collection.
ID() uint64
// Name is the representation's display name (e.g. "Exploded").
Name() string
// Kind is the representation family.
Kind() types.RepresentationKind
// Active reports whether this is the active representation of its family.
Active() bool
}

type RepresentationsManager

RepresentationsManager is the assembly's representation hub: the three family collections plus the model states (the reference API's RepresentationsManager).

type RepresentationsManager interface {
// DesignViews / Positionals / LevelsOfDetail return the three family collections.
DesignViews() DesignViewRepresentations
Positionals() PositionalRepresentations
LevelsOfDetail() LevelOfDetailRepresentations
// ModelStates returns the model-state collection.
ModelStates() ModelStates
}

type RotateRotateConstraint

RotateRotateConstraint couples two rotations by a gear ratio.

type RotateRotateConstraint interface {
AssemblyConstraint
// Ratio is revolutions of the second axis per revolution of the first.
Ratio() float64
}

type RotateTranslateConstraint

RotateTranslateConstraint couples a rotation to a translation (rack and pinion).

type RotateTranslateConstraint interface {
AssemblyConstraint
// Distance is the translation moved per revolution (cm).
Distance() float64
}

type SaveOptions

SaveOptions is the application-level save policy. Setters error when the host does not implement the requested behavior (no dead settings).

type SaveOptions interface {
// Thumbnail returns how a preview thumbnail is captured on save.
Thumbnail() types.ThumbnailSaveOption
// SetThumbnail selects the capture mode, erroring on modes this host
// cannot perform.
SetThumbnail(option types.ThumbnailSaveOption) error
// SaveDependents reports whether saving a document also saves its dirty
// referenced documents first.
SaveDependents() bool
// SetSaveDependents toggles dependent saving.
SetSaveDependents(save bool)
// OldVersionsToKeep returns how many prior versions a save retains in the
// OldVersions sibling directory; 0 disables retention.
OldVersionsToKeep() int
// SetOldVersionsToKeep sets the retention count, erroring on negatives.
SetOldVersionsToKeep(count int) error
}

type SectionDrawingView

SectionDrawingView is a view cut from a parent view by a section line: the model is sliced by the plane through that line (perpendicular to the parent), the near half removed, the cut outline drawn bold and the exposed faces hatched. The reference contracts give section views a distinct interface (unlike auxiliary/projected, which are a plain DrawingView + a type tag).

type SectionDrawingView interface {
DrawingView
// SectionLineMM is the cut line on the parent view, in sheet millimetres.
SectionLineMM() (x1, y1, x2, y2 float64)
}

type ShadedDisplayOptions

ShadedDisplayOptions is the in-process contract for the shaded-mode display sub-options (edge overlay, transparency rendering). The GPL app satisfies it.

type ShadedDisplayOptions interface {
// EdgeDisplay reports whether edges overlay the shaded faces.
EdgeDisplay() bool
// EdgeColor is the overlaid edge color.
EdgeColor() types.Color
// Silhouettes reports whether silhouette edges are drawn.
Silhouettes() bool
// TransparencyType is how transparency is rendered (blending / screen-door).
TransparencyType() types.TransparencyTypeEnum
}

type Sketch

Sketch is the scalar view of a 2D planar sketch: its identity, visibility, and the solver's degree-of-freedom count. The host's model/sketch.Sketch satisfies this via a compile-time assertion.

type Sketch interface {
// Name is the sketch's display name.
Name() string
// Visible reports whether the sketch is shown.
Visible() bool
// EntityCount is the number of geometry entities the sketch owns.
EntityCount() int
// DegreesOfFreedom is the sketch's remaining free DOF (0 when fully constrained).
DegreesOfFreedom() int
}

type Sketch3D

Sketch3D is the scalar view of a 3D (non-planar) sketch the host implements (model/sketch.Sketch3D) and add-ins consume: its identity, visibility, entity count, and the solver's remaining degree-of-freedom count. Like Sketch it exposes only the scalar surface — entity geometry and constraints travel as wire DTOs (see api/wire). The host satisfies this via a compile-time assertion.

type Sketch3D interface {
// Name is the sketch's display name.
Name() string
// Visible reports whether the sketch is shown.
Visible() bool
// EntityCount is the number of geometry entities the sketch owns.
EntityCount() int
// DegreesOfFreedom is the sketch's remaining free DOF (0 when fully constrained).
DegreesOfFreedom() int
}

type SketchBlock

SketchBlock is the scalar view of one placed block instance in a sketch. The host's model/sketch.BlockInstance satisfies this.

type SketchBlock interface {
// DefinitionName names the block definition this instance places.
DefinitionName() string
// EntityCount is the live entity count of the instanced definition.
EntityCount() int
}

type SketchBlockDefinition

SketchBlockDefinition is the scalar view of a reusable sketch entity group owned by a part's component definition (M06-F07, Oblikovati/Oblikovati#622). The host's model/sketch.BlockDefinition satisfies this via a compile-time assertion.

type SketchBlockDefinition interface {
// Name is the definition's unique name within the part.
Name() string
// EntityCount is the number of entities the definition holds.
EntityCount() int
// InstanceCount is how many placed instances reference this definition.
InstanceCount() int
}

type Sphere

Sphere is a full sphere (u longitude, v latitude).

type Sphere interface {
Surface
Center() types.Point
Radius() float64
}

type StyleManager

StyleManager is the in-process contract for the style/standard system: the registry of the document's color and lighting styles, the style-library cascade, and library load/save. The GPL app satisfies it (compile-time asserted there).

type StyleManager interface {
// ColorStyles returns the document's color styles.
ColorStyles() ColorStyles
// LightingStyles returns the document's lighting styles.
LightingStyles() []LightingStyle
// LibraryNames returns the names of the loaded style libraries, in cascade order.
LibraryNames() []string
// ImportLibrary loads the style library at the given path into the cascade, returning an
// error naming the path on a missing or malformed file.
ImportLibrary(path string) error
}

type Surface

Surface is the umbrella every transient surface satisfies.

type Surface interface {
// SurfaceType identifies the concrete kind (frozen reference values).
SurfaceType() types.SurfaceType
// GeometryForm classifies the representation (NURBS flags, frozen values).
GeometryForm() types.SurfaceGeometryForm
// Evaluate returns the position at (u, v).
Evaluate(u, v float64) types.Point
// Normal returns the unit surface normal at (u, v) (zero at degeneracies).
Normal(u, v float64) types.Vector
// Domains returns the (u, v) parameter ranges (±Inf where unbounded).
Domains() (uLo, uHi, vLo, vHi float64)
// Parameter inverts Evaluate for a point on (or near) the surface.
Parameter(p types.Point) (u, v float64)
// Evaluator returns the member-level query surface of this surface.
Evaluator() SurfaceEvaluator
}

type SurfaceDifferential

SurfaceDifferential is a surface's differential geometry — tangents, partials, curvatures.

type SurfaceDifferential interface {
// Tangents returns the unit tangents along u and v at (u, v) (zero at
// degeneracies such as a sphere pole).
Tangents(u, v float64) (uTangent, vTangent types.Vector)
// FirstPartials returns ∂P/∂u and ∂P/∂v at (u, v).
FirstPartials(u, v float64) (pu, pv types.Vector)
// SecondPartials returns ∂²P/∂u², ∂²P/∂u∂v and ∂²P/∂v² at (u, v).
SecondPartials(u, v float64) (puu, puv, pvv types.Vector)
// ThirdPartials returns the corner partials ∂³P/∂u³ and ∂³P/∂v³ at (u, v).
ThirdPartials(u, v float64) (puuu, pvvv types.Vector)
// Curvatures returns the principal curvatures at (u, v) and the unit
// direction of the maximum one.
Curvatures(u, v float64) (maxDirection types.Vector, maxCurvature, minCurvature float64)
}

type SurfaceEvaluator

SurfaceEvaluator is the member-level query surface of a transient surface. It is segregated into four embedded capability families (SurfaceExtents, SurfaceDifferential, SurfaceProjection, SurfaceIso) so a consumer that only needs, say, the projection queries does not depend on the differential-geometry width (audit I9). SurfaceEvaluator stays their union — every existing implementer and caller is unaffected.

type SurfaceEvaluator interface {
SurfaceExtents
SurfaceDifferential
SurfaceProjection
SurfaceIso
}

type SurfaceExtents

SurfaceExtents is a surface's bounding, parameter domain, area and continuity.

type SurfaceExtents interface {
// RangeBox returns a box enclosing the surface (±Inf faces when unbounded;
// a NURBS box is the control-net box, enclosing but not minimal).
RangeBox() types.Box
// ParamRangeRect returns the (u, v) parameter domain as a 2D box.
ParamRangeRect() types.Box2d
// Area returns the total surface area: exact for closed analytic surfaces
// (sphere, torus), +Inf for unbounded ones, numeric quadrature for NURBS.
Area() float64
// Continuity returns the largest maintained continuity order.
Continuity() int
}

type SurfaceGraphics

SurfaceGraphics renders an existing B-rep body/face by reference key with an override color/transform — its geometry stays host-side.

type SurfaceGraphics interface {
GraphicsPrimitive
// BodyKey is the persistent reference key of the rendered body/face.
BodyKey() string
}

type SurfaceIso

SurfaceIso is a surface's iso-curve extraction and parameter-domain anomalies.

type SurfaceIso interface {
// IsoCurve extracts the curve of constant parameter: u = param when
// uDirection (the curve runs along v), else v = param.
IsoCurve(uDirection bool, param float64) (Curve, error)
// ParamAnomaly reports periodicity, singularities and unboundedness of
// each parameter direction.
ParamAnomaly() (u, v types.ParamAnomaly)
}

type SurfaceProjection

SurfaceProjection is a surface's closest-point queries — inversion and normal at a point.

type SurfaceProjection interface {
// ParamAtPoint returns the (u, v) of the point on the surface closest to
// p, classifying how many equally close answers exist.
ParamAtPoint(p types.Point) (u, v float64, nature types.SolutionNature)
// NormalAtPoint returns the unit surface normal at the point on the
// surface closest to p.
NormalAtPoint(p types.Point) types.Vector
}

type SweepGraphics

SweepGraphics renders a profile swept along a path (a tube/ribbon overlay).

type SweepGraphics interface {
GraphicsPrimitive
// Radius is the swept profile radius (cm).
Radius() float64
}

type TangentConstraint

TangentConstraint keeps a face tangent to a curved face.

type TangentConstraint interface {
AssemblyConstraint
// Inside reports inside tangency (the curved face wraps the other); false is outside.
Inside() bool
}

type TextGraphics

TextGraphics is a world- or screen-anchored text label.

type TextGraphics interface {
GraphicsPrimitive
// Text is the label string.
Text() string
// Anchor is the label's world anchor point.
Anchor() types.Point
// Behavior is the view-relative behavior (billboarding / pixel scaling).
Behavior() types.DisplayTransformBehaviorEnum
}

type Theme

Theme is the in-process contract for one UI color theme: a name, a kind (light/dark/ custom), and a color for every semantic token. The GPL implementation's theme.Theme satisfies it (compile-time asserted there); the head reads it to style the shell and add-ins read it (via the wire view) to match the host's look.

Color must return a defined value for every token in [types.AllThemeTokens] — a complete theme never leaves a slot undefined, so callers need not handle a missing color.

type Theme interface {
// Name is the display label, unique within the user's theme library.
Name() string
// Kind classifies the theme as a built-in (light/dark) or a user copy (custom).
Kind() types.ThemeKind
// Color returns the color bound to token in this theme.
Color(token types.ThemeToken) types.Rgba
}

type Torus

Torus is a full torus (u around the axis, v around the tube).

type Torus interface {
Surface
Center() types.Point
Axis() types.UnitVector
MajorRadius() float64
MinorRadius() float64
}

type TransientBRep

TransientBRep creates and combines transient bodies. Transform matrices are restricted to rotation/translation/reflection/uniform scale — scale or shear that would break an analytic surface is rejected with the offending matrix in the error.

type TransientBRep interface {
CreateSolidBlock(min, max types.Point) (TransientBody, error)
// CreateSolidCylinderCone: equal radii = cylinder, one zero = full cone.
CreateSolidCylinderCone(bottom, top types.Point, bottomRadius, topRadius float64) (TransientBody, error)
CreateSolidSphere(center types.Point, radius float64) (TransientBody, error)
CreateSolidTorus(center types.Point, axis types.Vector, majorRadius, minorRadius float64) (TransientBody, error)
Copy(body TransientBody) (TransientBody, error)
Transform(body TransientBody, m types.Matrix) error
// DoBoolean modifies blank in place.
DoBoolean(blank, tool TransientBody, op types.BooleanType) error
// CreateIntersectionWithPlane returns the section curves as wires on a
// new body.
CreateIntersectionWithPlane(body TransientBody, planeOrigin types.Point, planeNormal types.Vector) (TransientBody, error)
// CreateFromDefinition compiles the bottom-up graph; a non-empty issue
// list means the graph was rejected (no body).
CreateFromDefinition(def types.BrepBodyDefinition) (TransientBody, []types.BrepDefinitionIssue, error)
}

type TransientBody

TransientBody is one ownerless body the factory manages.

type TransientBody interface {
IsSolid() bool
FaceCount() int
EdgeCount() int
VertexCount() int
ShellCount() int
WireCount() int
// Volume is the enclosed volume (cm³); 0 for an open surface body.
Volume() float64
}

type TransientCurves2d

TransientCurves2d constructs the 2D (sketch-space) transient curves.

type TransientCurves2d interface {
CreateLine2d(root types.Point2d, direction types.UnitVector2d) (Line2d, error)
CreateLineSegment2d(start, end types.Point2d) (LineSegment2d, error)
CreateCircle2d(center types.Point2d, radius float64) (Circle2d, error)
CreateArc2d(center types.Point2d, radius, startAngle, sweepAngle float64) (Arc2d, error)
CreateEllipseFull2d(center types.Point2d, majorAxis types.UnitVector2d, majorRadius, minorRadius float64) (EllipseFull2d, error)
CreateEllipticalArc2d(center types.Point2d, majorAxis types.UnitVector2d, majorRadius, minorRadius, startAngle, sweepAngle float64) (EllipticalArc2d, error)
CreatePolyline2d(points []types.Point2d) (Polyline2d, error)
CreateBSplineCurve2d(def types.BSplineCurve2dDef) (BSplineCurve2d, error)
CreateFittedBSplineCurve2d(through []types.Point2d) (BSplineCurve2d, error)
}

type TransientCurves3d

TransientCurves3d constructs the 3D transient curves. Constructors error on degenerate input (zero directions, non-positive radii, malformed knot vectors).

type TransientCurves3d interface {
CreateLine(root types.Point, direction types.UnitVector) (Line, error)
CreateLineSegment(start, end types.Point) (LineSegment, error)
CreateCircle(center types.Point, normal types.UnitVector, radius float64) (Circle, error)
CreateCircleByThreePoints(a, b, c types.Point) (Circle, error)
CreateArc(center types.Point, normal, reference types.UnitVector, radius, startAngle, sweepAngle float64) (Arc3d, error)
CreateArcByThreePoints(start, on, end types.Point) (Arc3d, error)
CreateEllipseFull(center types.Point, normal, majorAxis types.UnitVector, majorRadius, minorRadius float64) (EllipseFull, error)
CreateEllipticalArc(center types.Point, normal, majorAxis types.UnitVector, majorRadius, minorRadius, startAngle, sweepAngle float64) (EllipticalArc, error)
CreatePolyline(points []types.Point) (Polyline3d, error)
CreateBSplineCurve(def types.BSplineCurveDef) (BSplineCurve, error)
CreateFittedBSplineCurve(through []types.Point) (BSplineCurve, error)
CreateHelix(base types.Point, axis, reference types.UnitVector, startRadius, pitch, taperPerTurn, turns float64, clockwise bool) (Helix, error)
}

type TransientGeometry

TransientGeometry is the single discoverable construction point for the transient-geometry vocabulary (M01-F05, #602) — the reference factory of the same name. Value types (points, vectors, matrices, boxes) are pure data with their math implemented in oblikovati.org/api/types; this factory exists for the curve/surface objects, whose construction validates inputs and whose evaluation runs against the host kernel. Constructors error on degenerate input (zero directions, non-positive radii, malformed knot vectors) — they never return a half-valid curve.

Example:

circle, err := tg.CreateCircle(types.NewPoint(0, 0, 0), zAxis, 2.5)
p := circle.Evaluate(0.25) // a quarter of the way around

The vocabulary is segregated into three embedded capability families (TransientCurves3d, TransientCurves2d, TransientSurfaces) so a consumer or fake that needs only one axis depends only on that family (Interface Segregation, audit I9). TransientGeometry stays their union, so every existing implementer and caller is unaffected — new host code and add-in helpers should accept the narrowest family they use, not the whole union.

type TransientGeometry interface {
TransientCurves3d
TransientCurves2d
TransientSurfaces
}

type TransientObjects

TransientObjects is the discoverable construction point for the utility collections, mirroring the reference factory so add-in code ports naturally (geometry construction is TransientGeometry).

type TransientObjects interface {
// CreateNameValueMap returns an empty ordered options bag.
CreateNameValueMap() NameValueMap
// CreateObjectCollection returns a collection seeded with refs, in order.
CreateObjectCollection(refs ...types.ObjectRef) ObjectCollection
// CreateObjectCollectionByVariant returns an empty keyed collection.
CreateObjectCollectionByVariant() ObjectCollectionByVariant
}

type TransientSurfaces

TransientSurfaces constructs the transient surfaces (analytic and NURBS).

type TransientSurfaces interface {
CreatePlane(root types.Point, normal types.UnitVector) (Plane, error)
CreatePlaneByThreePoints(a, b, c types.Point) (Plane, error)
CreateCylinder(base types.Point, axis types.UnitVector, radius float64) (Cylinder, error)
CreateCone(apex types.Point, axis types.UnitVector, halfAngle float64) (Cone, error)
CreateSphere(center types.Point, radius float64) (Sphere, error)
CreateTorus(center types.Point, axis types.UnitVector, majorRadius, minorRadius float64) (Torus, error)
CreateEllipticalCylinder(base types.Point, axis, majorAxis types.UnitVector, majorRadius, minorRadius float64) (EllipticalCylinder, error)
CreateEllipticalCone(apex types.Point, axis, majorAxis types.UnitVector, majorHalfAngle, minorHalfAngle float64) (EllipticalCone, error)
CreateBSplineSurface(def types.BSplineSurfaceDef) (BSplineSurface, error)
}

type TransitionalConstraint

TransitionalConstraint keeps a face in sliding contact with a transition face.

type TransitionalConstraint interface{ AssemblyConstraint }

type TranslateTranslateConstraint

TranslateTranslateConstraint couples two translations by a ratio.

type TranslateTranslateConstraint interface {
AssemblyConstraint
// Ratio is the distance of the second axis per unit distance of the first.
Ratio() float64
}

type TriangleFanGraphics

TriangleFanGraphics is a triangle-fan primitive.

type TriangleFanGraphics interface{ TriangleGraphics }

type TriangleGraphics

TriangleGraphics is an indexed triangle-mesh primitive.

type TriangleGraphics interface {
GraphicsPrimitive
// Mapper is the color mapper resolving per-vertex colors from scalars, or nil.
Mapper() GraphicsColorMapper
}

type TriangleStripGraphics

TriangleStripGraphics is a triangle-strip primitive.

type TriangleStripGraphics interface{ TriangleGraphics }

type WindowDisplaySettings

WindowDisplaySettings is the display mode and projection new views of this document open in.

type WindowDisplaySettings interface {
// NewWindowDisplayMode is the display mode new views of this document open in.
NewWindowDisplayMode() types.DisplayModeEnum
// DisplayModeSource is whether the display mode is the default or a per-view override.
DisplayModeSource() types.DisplayModeSourceTypeEnum
// NewWindowProjection is the projection new views of this document open in.
NewWindowProjection() types.ProjectionTypeEnum
}

type Wire

Wire is an ordered, face-less edge chain on a body — the section/profile currency of ruled surfaces and silhouettes.

type Wire interface {
IsClosed() bool
IsPlanar() bool
EdgeCount() int
ReferenceKey() []byte
TransientKey() uint64
}

type WireframeDisplayOptions

WireframeDisplayOptions is the in-process contract for the wireframe-mode display sub-options. The GPL app satisfies it.

type WireframeDisplayOptions interface {
// DepthDimming reports whether distant edges are dimmed.
DepthDimming() bool
// Silhouettes reports whether silhouette edges are drawn.
Silhouettes() bool
// DimmedHiddenEdges reports whether hidden edges are drawn dimmed (vs. removed).
DimmedHiddenEdges() bool
}

type Wires

Wires enumerates a body's wires.

type Wires interface {
Count() int
Item(index int) Wire
}

Generated by gomarkdoc