Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
OdModelerGeometry::getSlice Method (const OdGePlane&, bool, OdDb3dSolidPtr &)
Syntax
C++
virtual OdResult getSlice(const OdGePlane& plane, bool getNegHalfToo, OdDb3dSolidPtr & negHalfSolid) = 0;

Slices the ModelerGeometry object with a plane and transforms the native ModelerGeometry object to be the portion remaining on the positive side of the normal of the slicing plane. 

 

Parameters
Description
plane
[in] Reference to a slicing plane.
getNegHalfToo
[in] Flag determining whether the other (negative) part of the native ModelerGeometry object should be created as a separate ModelerGeometry object (when true).
negHalfSolid
[out] Reference to a pointer to the created ModelerGeometry object representing the negative half of the native ModelerGeometry object. If getNegHalfToo is false, NULL value is returned.

eOk if the native ModelerGeometry object was successfully sliced or an appropriate error code in other case. If the slicing plane does not intersect the ModelerGeometry object, then the ModelerGeometry object is left unchanged, negHalfSolid is set to NULL, and eOk is returned.

The caller of this function is responsible for the memory used by the object pointed to by negHalfSolid when the function finishes. If negHalfSolid is added to a database, the database takes responsibility for the memory. If negHalfSolid is not added to a database, the caller must free memory when it is no longer needed to avoid a memory leak.

Copyright © 2002-2022. Open Design Alliance All rights reserved.