Tessellation routines seems to present problems for sketches
mixing arcs with Beziers and arcs with arcs.
Attached herein there's an example of correct behavior
(file correct.g) consisting in a sketch composed of closed
beziers and circles that extrudes and converts well to (for
example) STL format:
$ g-stl -o correct.stl correct.g ext
428 triangles written
In addition there's the problematic example mixing arcs
and beziers in a topological correct closed sketch (see incorrect.asc
for details about correctness of vertex linking) that extrudes well on mged
and can be raytraced without problems but makes g-stl complain
about some issue regarding the fact that sketch loop is not closed:
$ g-stl -o incorrect.stl incorrect.g ext
rt_extrude_tess: A loop is not closed in sketch sk
tessellation failed!!
nmg_booltree_leaf_tess(ext): tessellation failure
db_walk_subtree() FAIL on '/ext'
0 triangles written
alfonso.egio@gmail.com
aegio
2009-02-03
Two examples of tessellation correct Vs. incorrect behavior
John Anderson
2009-02-05
The problem with the sketch in "incorrect.g" is that the segments are not consistent in their direction. Every segment (line, circular arc, bezier) has a start vertex and an end vertex. For a loop to be closed, each end vertex must be the start vertex of another segment. In "incorrect.g" there are segments that start at a vertex that is the start vertex of another segment, and segments with an end vertex that is the end vertex of another segment. Reversing the direction of two of the segments in "incorrect.g" will allow g-stl to succeed. This change can be accomplished using the command:
db adjust sk SL { { bezier D 3 P { 3 2 1 0 } } { bezier D 3 P { 4 5 6 7 } } { carc S 0 E 4 R 0.8669825810741810245829697 L 1 O 0 } { carc S 7 E 3 R 0.8617633860033965254032751 L 1 O 0 } }