# BRepMesh::Mesh question ?

Hi !

Is there any way built into Open cascade to tesselate a shape into a uniform number of triangles along U and V directions ?

Say that I have to bspline surfaces, not connected in any way but they are created to look as one single surface, with dynamic tesselation this look's very ugly as I get cracks at the edges, if the number of triangles was the same along this edge on both shapes this would fix the problem.

One possibility is to sew them together, would that fix it ?, in that case, that's a solution, I would prefer to be able to selected the number of triangles in U and V.

The problem of doing the tesselation on my own is that it's pretty messy to figure out all the trimming curves and so on, so I would prefer not to mess with that.

Mikael

Effectively, if you sew the two faces together, the problem of the crack at the common boundary edge will disappear because the edge will be shared by the two faces and so discretization of the curve is the same for both faces. As far as I know, there are no way to manage the tesselation by the number of triangles in U and V inside OpenCascade. I have not looked very far in this topic, so maybe someone else can have another solution.

Best Regards. Jean Michel.

Hey...

could you solve the problem? I'm also looking for a way to affect the tesselation/meshing of a TopoDS_Shape.
So, I'm searching for an parameter to set the number or the ratio of triangles, that should be created, e.g. if I have a plane OpenCascade normaly creates only two triangles, but due to the fact of lighting the plane I would have more smaller triangles.

THX

Josh

Hi Josh,

how about subdivide the result from meshing?

Regards,

Patrik

Hi,

is there a reverse way to compute the whole shape from the tesselated triangles or whatever else ?

MCV

Hi Christian,

you can build a TopoDS_Compound containing all triangles as TopoDS_Faces. Doesn't look so good (i.e. if you have triangulated a sphere) and uses a lot of memory but at the moment I don't know other possiblities (but I'm testing at the moment a new routine which gives better results - at least for smoothing).

Regards,

Patrik