Home
Reply
Contributor
vbsingh
Posts: 11

How to create conformal mesh for a solid body having multiple faces

I want to create the mesh from part of solid body i.e. sheet body but the problem is that the triangles (edge and vertices) are not conformant at the edges of solid face. Because of this the topology is missing at the edges. This is Ok for rendering purposes but topology based algorithms fail when multiple faces are present in sheet body.

 

The pseudo code is:

 

REFINEMENT* refinement = NULL;

outcome res = api_create_refinement(refinement);

check_outcome(res);

 

refinement->set_normal_tol(15);

               

MESH_MANAGER *meshManager = ACIS_NEW LINKED_MESH_MANAGER;

res = api_set_mesh_manager(meshManager);

check_outcome(res);

 

//perform meshing

ENTITY *ent;

for( each ent in entity list)

{

  res = api_set_entity_refinement(ent, refinement, FALSE);

  res = api_facet_entity(ent);

  ENTITY_LIST faceList;

  api_get_faces(ent, faceList);

}

 

// collect mesh points and normals

for( each ent in entity list)

{

  ENTITY_LIST faceList;

  api_get_faces(ent, faceList);

  MESH* faceMesh = NULL;

  af_query((ENTITY*)face, IDX_MESH_APP, IDX_MESH_ID, faceMesh);

  SEQUENTIAL_MESH *pMesh = (SEQUENTIAL_MESH*)faceMesh;

  // save mesh points and normals

}

Spatial Moderator
rbagley
Posts: 126

Re: How to create conformal mesh for a solid body having multiple faces

Hi vbsingh,

 

I think you need to stitch your list of faces into a single body and call api_facet_entity on the body.  When you call the faceter on each face individually, it has no knowledge of your intended topology at the 'common' edges because they are not linked with real topology.  When faceting bodies, the ACIS faceter always makes the mesh conformal across edges.

 

Best,

Ray

Contributor
vbsingh
Posts: 11

Re: How to create conformal mesh for a solid body having multiple faces

Thanks Ray.

 

It seems logical and I'm going to try it.

 

But I could find only API for creating single body out of faces - "api_mk_by_faces" and help says "This API should not be used on faces that are already contained within a shell it should only be used on "free" faces to wrap those faces in a body "

 

And I want to mesh some faces of a single body, so I'm not sure whether it'll work.

 

Any suggestions..?

Spatial Moderator
rbagley
Posts: 126

Re: How to create conformal mesh for a solid body having multiple faces

You could unhook the faces to mesh using api_unhook_faces.  I'm not sure if it will return the unhooked faces as one body (which would be ready to facet) or as multiple bodies (which you would need to combine using stitching or api_mk_by_faces).