View Issue Details

IDProjectCategoryView StatusLast Update
0033691CommunityOCCT:Meshpublic2024-10-31 10:13
Reporterventu Assigned Tobugmaster  
PrioritynormalSeveritymajor 
Status closedResolutionwon't fix 
Summary0033691: Linear deflection not respected in mesh
DescriptionI'm trying to mesh surfaces with a given tolerance (i.e. getting triangles which are all within a given distance from the face).

I've tried:

BRepMesh_IncrementalMesh M{CurrentFace,*i,Standard_False,M_PI,Standard_True};

and

IMeshTools_Parameters MP;
MP.Angle=MP.AngleInterior=M_PI;
MP.Deflection=MP.DeflectionInterior=.002;
MP.Relative=Standard_False;
MP.ControlSurfaceDeflection=Standard_True;
MP.ForceFaceDeflection=Standard_False;
BRepMesh_IncrementalMesh M{CurrentFace,MP};

In both cases it seems the given linear is not respected, i.e. triangles deviate more than 0.002mm from the surface.
Also interesting is how triangles are more dense near the edges, but get coarser in the inside.

See an example tessellated surface imported from the attached sample file.

P.S.
I've set MP.Angle=MP.AngleInterior=M_PI as we are not interested in angular deflection.
Setting angular deflection to a lower value of course actually gives a finer mesh, but that's not the criterion we need.
TagsNo tags attached.
Test case number

Activities

oan

2024-05-16 15:44

developer   ~0115834

Dear @ventu,

Please attach test shapes which you are using to reproduce the problem.
Without that it is impossible to evaluate the problem you are describing.

Could you also describe the evaluation process you are utilizing to check whether the linear deflection is respected or not?
Is it something standard or developed by yourself? If the last, can you share that as well?

In general case, BRepMesh does not guarantee the specified tolerance to be fulfilled due to its nature.
BRepMesh is not a mesher that is intended to provide precise result, this is a general purpose tool used mostly for visualization needs and provides results UP TO the specified deflection depending on the shape specifics.
Its tolerance checks do not implement any complex approach and by the definition can skip even the very obvious cases if those cases lie outside the considered test points.

If you are interested in a solution providing more quality result, please consider evaluation of our commercial ExpressMesh component: https://www.opencascade.com/components/express-mesh-component/

You are also welcome to provide your patches improving functionality of the component and making it more precise and reliable according to your needs and expectations.

ventu

2024-05-17 11:44

reporter   ~0115839

I'm pretty sure I had attached some pictures, but it seems they did not get through.
In any case, you've answered my question: if BRepMesh is not meant to be precise, it's not suited for our use case.
Thanks anyway.

oan

2024-05-20 14:29

developer   ~0115862

@ventu,

I see, thank you. Anyway, unfortunately, just pictures are not enough to reproduce and analyze the issue.
If you have some models (step, brep or other format), do not hesitate to attach them.
If size of attached files is too big, attach them using split archives.

oan

2024-10-31 01:36

developer   ~0116863

@bugmaster,

Please close the issue.

Issue History

Date Modified Username Field Change
2024-04-19 10:42 ventu New Issue
2024-04-19 10:42 ventu Assigned To => oan
2024-05-16 15:44 oan Note Added: 0115834
2024-05-17 11:44 ventu Note Added: 0115839
2024-05-20 14:29 oan Note Added: 0115862
2024-10-31 01:36 oan Assigned To oan => bugmaster
2024-10-31 01:36 oan Status new => confirmed
2024-10-31 01:36 oan Note Added: 0116863
2024-10-31 10:13 dpasukhi Status confirmed => closed
2024-10-31 10:13 dpasukhi Resolution open => won't fix