Skip to main content

Module point

Module point 

Source
Expand description

IfcPoint subtypes and the IFC4 coordinate lists.

§The dimension trap

IfcCartesianPoint.Coordinates is LIST [1:3], so a point in a real file is 2D or 3D and nothing in the record says which except its length. A 2D point silently read as [x, y, 0.0] is indistinguishable from a 3D point that happens to sit on the z=0 plane, and the difference matters: a 2D profile curve read as 3D geometry will be swept in the wrong space.

So CartesianPoint::dimension is public and padding to 3D is an explicit call (CartesianPoint::coordinates_3d), never something that happens behind the caller’s back.

§Point lists

IFC4 added IfcCartesianPointList2D/3D so tessellated geometry does not need one entity per vertex; a 200k-triangle mesh would otherwise be 100k+ IfcCartesianPoint records. Everything that indexes into these lists (IfcIndexedPolyCurve, IfcTriangulatedFaceSet) uses 1-based indices, which is why CartesianPointList2D::point takes one.

Structs§

CartesianPoint
A borrowed view of an IfcCartesianPoint.
CartesianPointList2D
A borrowed view of an IfcCartesianPointList2D.
CartesianPointList3D
A borrowed view of an IfcCartesianPointList3D.
PointOnCurve
A borrowed view of an IfcPointOnCurve.
PointOnSurface
A borrowed view of an IfcPointOnSurface.

Enums§

CartesianPointList
An IfcCartesianPointList of either concrete dimension.

Functions§

cartesian_point_3d
Resolve a reference that must be an IfcCartesianPoint, promoted to 3D.