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] true for converting to smooth surface, false - for converting to faceted surface.  
const OdDbSubentId& id 
[in] Sub-entity id to convert.  
OdDbSurfacePtr& pSurface 
[out] Pointer to the newly created OdDbSurface object. 
  • eNotImplementedYet - if method is not implemented yet for current modeler.
  • eInvalidContext - if the mesh is empty.
  • eInvalidInput - if id is not kFaceSubentType or mesh has self-intersections or zero area faces.
  • eOk - if surface created successfully.

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

 

Mesh should not have self-intersections and zero area faces. Case when bConvertAsSmooth == true is not implemented yet.

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