displayValue array of DataObjects. This page explains how geometry objects are structured and organized.
Geometry Storage Rule
All visual geometry for a DataObject must be indisplayValue.
displayValue.
Geometry Object Types
Speckle supports a wide range of geometry primitives:Basic Primitives
- Point - 3D point (x, y, z)
- Line - Line segment between two points
- Polyline - Connected line segments
- Curve - Parametric curve (NURBS, etc.)
- Arc - Circular arc
- Circle - Full circle
- Ellipse - Elliptical curve
Surface Geometry
- Mesh - Triangulated surface
- Brep - Boundary representation (solid or surface)
- Surface - Parametric surface
Complex Geometry
- Instance - Reference to a Definition proxy with transform
Geometry Object Structure
All geometry objects follow this pattern:Example: Mesh
Example: Point
Multiple Geometry in displayValue
A single DataObject can have multiple geometry objects indisplayValue:
- Visual representation (Mesh) + Edge curves (Line/Polyline)
- Main geometry + Annotation geometry (Points, Lines for dimensions)
- Multiple LODs (Level of Detail) - different representations for different purposes
Why store geometry in an array instead of as direct properties?
Why store geometry in an array instead of as direct properties?
Using an array allows:
- Multiple representations - The same object can have mesh, curves, and points
- Flexibility - Different connectors can add different geometry types
- Consistency - All geometry is accessed the same way (
obj.displayValue) - Traversal - Easy to iterate over all geometry for an object
Geometry Units
Every geometry object has aunits field indicating the unit system:
"meters"(most common)"feet""millimeters""inches"
units field should match the DataObject’s units field. Always check units when processing geometry!
Pure Geometry Objects
Sometimes you’ll encounter geometry objects that aren’t in a DataObject’sdisplayValue—they exist as standalone objects in collections. This is common in CAD workflows (Rhino, AutoCAD) where geometry is the primary data type.
displayValue.
Instances and Definitions
Instance objects reference geometry stored in Definition proxies:Geometry Processing Patterns
When processing geometry:- Check
displayValue- Always look indisplayValuefor DataObjects - Handle arrays -
displayValueis always an array, even if it has one item - Check types - Use
speckle_typeto determine geometry type - Respect units - Convert units if needed for your use case
- Handle empty arrays - Some objects may have empty
displayValue(data-only objects)
What if displayValue is empty?
What if displayValue is empty?
Some DataObjects are data-only (no visual representation). They might represent:
- Metadata objects - Classification, properties only
- Analytical elements - Structural analysis data without geometry
- Relationships - Objects that encode relationships but have no geometry
displayValue exists and has items before processing geometry.Next Steps
- Proxy Schema - How proxies encode relationships
- Object Schema - Review object structure