API Reference > Functions > oddbGetObjectMesh Function
oddbGetObjectMesh Function
Syntax
C++
DBENT_EXPORT OdResult oddbGetObjectMesh(OdDbObject * pObj, const OdDbFaceterSettings * faceter, OdGePoint3dArray& vertexArray, OdInt32Array& faceArray, OdGiFaceData*& faceData);

DbSubDMesh.h

Parameters 
Description 
OdDbObject * pObj 
[in] Pointer to the object from which the mesh will be generated.  
const OdDbFaceterSettings * faceter 
[in] (Optional) Parameters that specify the rules for creating the mesh.  
OdGePoint3dArray& vertexArray 
[out] Array of vertex points.  
OdInt32Array& faceArray 
[out] Array of integers describing the face definition based on the input vertex array.  
OdGiFaceData*& faceData 
[out] Pointer to the array of properties for each face. 

  • eNullObjectPointer - if the pointer to the object is null;
  • eNotThatKindOfClass - if the object is not a Polyline/3dSolid/Surface/Region or their direct inheritor;
  • eDegenerateGeometry - if an error occurred while getting the mesh;
  • eOk - if 3dSolid created successfully.

Creates a mesh from the specified object based on the specified mesh faceter settings. 

 

The modeler of the object (ModelerGeometry, SpaModeler or C3dModeler) affects the result of the method. Current triangulation settings also affect the result, as MeshFaceterSettings may not override all of them. 

If the faceter parameter is set to NULL, the current triangulation parameters of the modeler are used. 

If the value of the faceData pointer is non-null, a new OdGiFaceData array is not created. It's created only if at least one of the properties is redefined: color, material or materialMapper. 

If the method is called for the OdDbPolyline, it will attempt to create a region and get a mesh from it, therefore curve should be closed and without self-intersections.

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