DiscussionsIssue archiveOther usage issues

Archived discussion

How to tesselate edges

Other usage issuesFri, 11/21/2008 - 00:152 replies

Browse this forum
QuestionAuthor

Good afternoon,

I'd like to tesselate a TopoDS_Edge with no associated TopoDS_Face, I tried to use BRepMesh_FastDiscret, as following:

BRepMesh_FastDiscret *myMesh =
new BRepMesh_FastDiscret(deflection, *Topo_Edge, aBox, angle, Standard_True, Standard_True);
if (myMesh == NULL)
{
PRINT_ERROR("Can't get tesselatation for this curve.\n");
return CUBIT_FAILURE;
}

I did get a non-Null pointer for myMesh, but when I print it out, it doesn't have vertices and edges:

vertices = { = {myData1 = 0x0, myData2 = 0x0, isDouble = 0, mySaturated = 0, myNbBuckets = 1, mySize = 0}, }, edges = { = {myData1 = 0x0, myData2 = 0x0, isDouble = 0, mySaturated = 0, myNbBuckets = 1, mySize = 0}, },

so query of num_points = myMesh->NbVertices(); crashes.

How do I get a correct tesselation of an Edge?

Thanks!

Author

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

you can use one of the GCPnts_* classes (TangentialDeflection may be the best) with a BRepAdaptor_Curve created from your edge

Commenter-1

02Author

Thanks, Stephane. I'll try it out and let you know.

Author