SmApiTransform#

Defined in SM_API/inc/SmApiGeneral.h

SmApiStatus SmApiTransform(
SmObject *pObj,
const SmAxis2Placement &rRotateMove,
)#

Transform operations accept independent modeling objects: Breps, PolyBreps, standalone Curves, and standalone Surfaces.

Curves and Surfaces owned by a Brep cannot be transformed independently; transform the owning Brep instead. Unsupported SmObject types return SM_ERR_INVALID_INPUT.

Non-uniform scaling is supported by Breps, PolyBreps, generic B-spline geometry, and lines. This API permits only positive, uniform scale factors for other specialized standalone Curve and Surface representations. All scale factors must be finite and non-degenerate. PolyBrep scale factors must additionally be positive.

Rigid transforms preserve the Brep’s geometry pointers (unlike a representation-changing scale) and leave topology intact, so cached results can be repositioned instead of recomputed for instanced geometry: transform a cached PolyBrep’s points/normals by the same matrix rather than re-tessellating, and reuse mass properties (area, volume, mass and inertia magnitudes are rigid-invariant; the centroid moves, and a centroidal inertia tensor rotates — a tensor about a fixed crOrigin also needs a parallel-axis correction). SmApiTranslate and SmApiRotate are always rigid; SmApiTransform is rigid only when its SmAxis2Placement is orthonormal (one built via SetFrom4x4 can encode scale/shear, which invalidates this reuse).

Parameters:

pObj – [in ]: Object to transform