API Reference > OdDb Classes > OdDbSurface Class > OdDbSurface Methods > booleanSubtract Method > OdDbSurface::booleanSubtract Method (OdDb3dSolid*, OdDbSurfacePtr&)
OdDbSurface::booleanSubtract Method (OdDb3dSolid*, OdDbSurfacePtr&)
Syntax
C++
virtual OdResult booleanSubtract(const OdDb3dSolid* pSolid, OdDbSurfacePtr& pNewSurface);
Parameters 
Description 
const OdDb3dSolid* pSolid 
[in] Pointer to the solid to be subtracted from this surface.  
OdDbSurfacePtr& pNewSurface 
[out] Pointer to a new surface that represents the subtraction operation result. 

eOk if the subtraction operation is successfully performed, or an appropriate error code otherwise.

Performs a Boolean subtraction operation with a specified solid object and the surface. 

 

Implemented for ModelerGeometry and Spatial Modeler, not supported in the C3D modeler. 

pSolid is not changed unlike booleanOper. 

If this surface is not derived from OdDbSurface, the result is stored in this surface. Otherwise, this surface is not changed and the resulting surface is stored in pNewSurface. 

The resulting surface is not included in the database, so the caller is responsible for the correct handling of the memory pointed to with pNewSurface. 

If the resulting surface is empty then eNoIntersections is returned, NULL is returned as a value of pNewSurface and this surface is not changed. 

If the subtraction operation fails, NULL is returned as a value of pNewSurface and this surface is not changed.

Copyright © 2002–2021. Open Design Alliance. All rights reserved.