Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
OdDb3dSolid::getSlice Method (const OdGePlane&, bool, OdDb3dSolidPtr&)
Syntax
C++
virtual OdResult getSlice(const OdGePlane& plane, bool bGetNegHalfToo, OdDb3dSolidPtr& pNegHalfSolid);

Slices the solid with a plane and transforms the native solid 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.
bGetNegHalfToo
[in] Flag determining whether the other (negative) part of the native solid should be created as a separate solid (when true).
pNegHalfSolid
[out] Reference to a pointer to the created solid representing the negative half of the native solid. If bGetNegHalfToo is false, the NULL value is returned.

eOk if the native solid was successfully sliced or an appropriate error code in other case. If the slicing plane does not intersect the solid, then this solid is left unchanged, pNegHalfSolid 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 pNegHalfSolid (negative part of the sliced solid) when the function finishes. In case when pNegHalfSolid is added to a database, the database takes responsibility for the memory. In case when pNegHalfSolid is not added to a database, the caller must release memory when it is no longer needed to avoid a memory leak.

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