Linear Deflection and Angular Deflection

Hello,

I am having trouble to undestand how "linear deflection" and "angular deflection" are used in the process of triangulation of a Shape. I already read the documentation, but I still have some questions:

  • A discretized edge must satisfy both parameters, or only one of them?
  • What is the contribution of each one of these parameters to the final mesh?
  • Is there a way to combine both parameters in only one real parameter? 
  • In the documentation is written that angular deflection is the maximum angle between 2 polylines segments. But in the same documentation a ilustration shows that it is the angle between the tangents of the surface in the extremes of the line segment. I put the image bellow.

Sorry if my writing is confuse, my english is not very good.

Thank you.

Rafael Batista de Moraes's picture

anyone?

Mikhail Sazonov's picture

I think the picture in the documentation does not reflect the true. The algorithm in BRepMesh uses GCPnts_TangentialDeflection class to tessellate the curves. You may read details in the description of that class.

Kirill Gavrilov's picture

A discretized edge must satisfy both parameters, or only one of them?

Tessellation algorithm is expected to satisfy both restrictions - effectively choosing the most restricting in a particular case. If you have a small cylinder - angular deflection would split circle even though an entire cylinder would fit into linear deflection; if you have a large smooth landscape - linear deflection would split it into smaller pieces.

Is there a way to combine both parameters in only one real parameter? 

No, that doesn't make sense. You may ignore one parameter (assign a large value to it) but this would just lead to not good triangulation in corner cases. Of course, you may define some abstract "quality" parameter and define linear + angular deflection parameters based on this quality metrics (using some lookup table or similar approach), but this logic should be defined at application level.

I put the image bellow.

These images are very illustrative - just to bring the idea of the meaning of these parameters. The real algorithm is more complicated and uses more parameters, so you would need to read detailed description in documentation or/and into the code to understand how restrictions are actually applied.