API Reference > OdDb Classes > OdDbSubDMesh Class > OdDbSubDMesh Methods > convertToSurface Method > OdDbSubDMesh::convertToSurface Method (bool, OdDbSubentId&, OdDbSurfacePtr&)
OdDbSubDMesh::convertToSurface Method (bool, OdDbSubentId&, OdDbSurfacePtr&)
Syntax
C++
OdResult convertToSurface(bool bConvertAsSmooth, const OdDbSubentId& id, OdDbSurfacePtr& pSurface) const;
Parameters 
Description 
bool bConvertAsSmooth 
[in] Specify true for converting to a smooth surface, or false for converting to a faceted surface.  
const OdDbSubentId& id 
[in] Sub-entity ID to convert.  
OdDbSurfacePtr& pSurface 
[out] Pointer to the newly created OdDbSurface object. 
Value 
Description 
eNotImplementedYet 
The method is not implemented yet for the current modeler. 
eInvalidContext 
The mesh is empty. 
eInvalidInput 
ID is not kFaceSubentType or the mesh has self-intersections or zero area faces. 
eOk 
The surface created successfully. 

Creates a new OdDbSurface object from a part of this mesh by the specified sub-entity ID. 

 

The mesh should not have self-intersections and zero area faces. The case when bConvertAsSmooth == true is not implemented yet.

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