Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
OdModelerGeometry::getSlice Method (OdDbSurface*, bool, OdDb3dSolidPtr&)
Syntax
C++
virtual OdResult getSlice(OdDbSurface* pSurface, bool bGetNegHalfToo, OdDb3dSolidPtr& pNegHalfSolid) = 0;

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

 

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

eOk if the native ModelerGeometry object was successfully sliced or an appropriate error code in other case. If pSurface pointer is NULL or the ModelerGeometry object is empty, returns eInvalidInput. If the specified surface does not intersect this solid, then this solid and pNegHalfSolid are left unchanged, returns eNotApplicable.

The native ModelerGeometry object will be transformed to the resulting body which is located on the negative side of the surface normal. 

The caller of this function is responsible for the memory used by the object pointed to by pNegHalfSolid when the function finishes. If pNegHalfSolid is added to a database, the database takes responsibility for the memory. If pNegHalfSolid 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.