Import
Example
Notes
- The definition uses metres.
- The input can be text, a definition object, or options with a
source. - Use
updateNodePropertyorsetOPConfigto change the element. An unknown node id throws an error. getOPBufferreturns the definition as text.ifcClassis the IFC class the.opfile names inmetadata['ifc:class'](ormetadata.ifcClass), such asIfcSanitaryTerminal. It is undefined when the file names none.- A placed block has one scale size on all three axes. A negative X or Z scale mirrors it, for example
[-1, 1, 1]. Y stays positive. Any other scale is refused asbad-scalewith its path. - An embedded definition that is no block is refused as
bad-asset-definition. An external asset with no source givesasset-source-missingwith its uri. OpenElement.editableSchema()listslabelName,placement.position,placement.rotation,placement.scaleandpropertySets.- A block of a building model saves all of them. The saved position
yis storey-relative. The saved rotation is the Y turn only: the managed editors refuse an X or Z turn. - Start the geometry kernel before you create this object. See
Floorkit.
Model node kinds
AmodelView element, or a definition it refers to, is one of these kinds. Plan points are [x, z], model points are [x, y, z], in metres. An angle is in radians and turns from +X towards -Z, counter-clockwise seen from above. Any other kind is refused as unsupported kind.
cuboid:center,width,height,depth.cylinder:center,radius,height. Withanglebelow a full turn it is a sector of that sweep fromstartAngle(0 by default), for example a half-round bowl. A mirrored sector reflects its arc.sweep:pathandprofile, orpathRefandprofileRef, withcapStartandcapEnd.profileis a list of model points, or an outline:{ start, segments, closed: true }in plan points, where a segment is{ to }for a line or{ to, arc: { center, counterClockwise } }for an arc.counterClockwisereads seen from above. The outline closes with a line when its last segment does not end atstart. Its[0, 0]is the lower end of the path. An outline, with arcs or with lines only, is extruded: itspathis one vertical segment andcapStartandcapEndaretrue, else it is refused asbad-sweep. An outline sweeps along a straight path only. An outline sweep has no path grips.sphere:center,radius.cone:center,radiusBottom,radiusTop,height, upright. One radius may be0for a pointed cone; with both above0it is a frustum. When both radii are below0.01it is refused asbad-cone.torus:center,majorRadius,minorRadius, a ring lying flat with its axis upright.minorRadiusmust be belowmajorRadius - 0.001, else it is refused asbad-torus.revolve:profile, an outline as for a sweep, turned a full turn, and an optionalaxis: { point, direction }. The outline is upright: a point[x, y]is the model point(x, y, 0), an arc’scounterClockwisereads seen from the front (+Z), and the default axis is the model Y axis, so the solid stands upright. Move it with itsplacement. An outline that crosses the axis or touches it at one point is refused by the kernel; a bowl keeps its waste hole as the gap at the axis. A partial turn is not built. A revolve has no grips.- For
cuboid,cylinder,sphere,coneandtorus,centeris the middle of the body’s box: a cylinder or a cone stands half its height below it, and a torus lies oneminorRadiusbelow it. - An uneven block scale stretches a cuboid, and a cylinder or a cone when the X and Z scales are equal. It refuses a sphere, a torus, a revolve, a shell and a sweep as
bad-scalewith the node. boolean3d:operation(subtract,unionorintersect),baseRefandoperandRefs.shell, indefinitionsonly, asboolean3d:sourceRefandthickness. It hollows the solid it refers to, leaving one closed voidthicknessinside every face. Measured on OpenGeometry 3.0.0, it builds for a cuboid, a full cylinder, a sphere, a pointed cone, a frustum, a torus, an outline sweep (with arcs or with lines only), a sweep of a list of points with both ends capped, and aboolean3dof a cuboid minus a cylinder. The kernel refuses the shell of a cylinder sector and of a revolve withCoverageGap. A source that is not a solid (a sweep with open ends) is refused asbad-shell.- The sizes and points of
sphere,cone,torus,revolve,shelland of an outline are strict: each is given, finite, and a size is above4e-8(four times the kernel tolerance; a cone radius may also be0). Else the node is refused asbad-sphere,bad-cone,bad-torus,bad-revolve,bad-shell,bad-profileorbad-sweep(an outline sweep’s path). An outline arc whosecenteris not as far from the segment’s start as from its end is refused asbad-profile.cuboidandcylinderkeep their older rule: a missing or bad size takes a default.
For the catalog format v2
The catalog format v2 may use every kind above with these fields and these strict values. Limits of OpenGeometry 3.0.0: an outline sweeps along one vertical segment with both ends capped; a revolve is a full turn; a cylinder sector and a revolve cannot be shelled; a cone needs a radius of0.01 or more; a torus needs minorRadius < majorRadius - 0.001; an uneven block scale stretches only cuboids, and cylinders and cones with equal X and Z scales. A plan view draws the block’s profileView, so each block still needs its plan symbol.
Inheritance: extends THREE.Group implements IShape, PlanVectorExportable, PortOwner
Constructor
Properties
Methods
editableSchema
parseBuffer
normalizeDefinition
getOPBuffer
getAnchorDefinition
getAnchorMatrix
getExportRoots
getPhysicalParts
getModelFrame
getModelParts
toDrawing
setOPConfig
beginEdit
beginEdit before endEdit keeps the first start.
endEdit
getOPConfig
getControlSchema
updateNodeProperty
getEditAnchors
applyEditAnchor
dispose
setOPGeometry
setOPMaterial
Types
PortOwner
OpenElementConfig
OpenElementInput
OpenElementDefinition
Per axis with a stretch zone, the sizes offered; none is any size the zone can take.
AnchorDefinition
ControlSchema
DistributionPort
Chain-internal port of a generated run piece. Regenerated wholesale on every path edit, so
external connections must never target it — the graph rejects such connects with
INTERNAL_PORT.OpenElementOptions
OpenElementDimensions
OpenElementStretchZones
The parts of a block that stretch when an instance takes asize: along each axis, the part between from and to (local metres) stretches and the parts outside move.
OpenElementSizing
The sizes a block offers, per axis with a stretch zone.OpenElementAnchors
PortDefinition
A distribution port authored on a.op asset.
OpenElementDefinitions
OpenElementProfileView
OpenElementModelView
NodeControlDescriptor
PortDomain
PortFlowDirection
PortProfile
Cross-section a connecting run must match (or bridge with a transition).AxisSizing
DefinitionNode
ProfileViewElement
ModelViewElement
PropertyDescriptor
AxisSizeList
The only sizes of an axis, in metres: 2 to 24 rising numbers, the block’s own among them.ProfileNode
Curve3DNode
ModelNode
OperationNode
RefNode
ControlPropertyType
ProfilePolygonNode
ProfilePolylineNode
ProfileArcNode
Curve3DPolylineNode
ModelCuboidNode
ModelCylinderNode
Sweep of a partial cylinder in radians, from
startAngle towards -Z seen from above; a full turn
by default.ModelSweepNode
ModelSphereNode
A solid sphere aboutcenter.
ModelConeNode
An upright cone, or a frustum when both radii are above 0.ModelTorusNode
A ring torus lying flat, its axis upright,center the middle of the ring.
ModelRevolveNode
A closed outline turned a full turn into a solid.Offset2DOpNode
Boolean3DOpNode
Shell3DOpNode
A solid hollowed in place: one closed voidthickness inside every face.
BaseElementNode
The package does not export this type by name.Point2
The package does not export this type by name.Point3
The package does not export this type by name.ModelSweepDirectNode
ModelSweepRefNode
ModelArcProfile
A closed line-and-arc outline in the kernel’sProfile shape.
ColorValue
The package does not export this type by name.ModelProfileSegment
One edge of a line-and-arc outline: a line toto, or an arc about center.