Date:2011-07-23 20:23:30 (8 years 1 month ago)
Author:Werner Almesberger
Commit:3f820dc41d82c78d972efe3c69f139f209a742f9
Message:cad/test2/README: added more results and cleaned up the text

Files: cad/test2/README (5 diffs)

Change Details

cad/test2/README
1717New findings and hypotheses
1818===========================
1919
20The first test revealed several problems in both OpenSCAD and
21Cadmium. It turned out that most of them could be resolved by making
22small changes to the models.
23
2024
2125The road to hell is paved with good intentions
2226----------------------------------------------
...... 
3438Before: 4901.0 4904.4 1.5 8362 3183
3539After: 316.3 315.9 0.3 2942 1473
3640
37This makes Cadmium only about 3.7 times slower than OpenSCAD's CGAL
41This makes Cadmium only about 4-5 times slower than OpenSCAD's CGAL
3842rendering, a marked improvement from the previous factor of 57. The
3943resulting mesh is now less than half the size of the mesh generated
4044by OpenSCAD.
...... 
4347understandable without these extra tolerances.
4448
4549
46Context: preventing artefacts
50Background: preventing artefacts
51--------------------------------
4752
4853When subtracting volumes from each other, surfaces that coincide in
49both the original volume and the one subtracted from it, can remain
54both the original volume and the one subtracted from it can remain
5055as arbitrarily thin artefacts.
5156
5257This 2D example illustrates the effect:
5358
54- given an original shape A like this
59- given an original shape like this
5560
5661  +---------------+
5762  | |
...... 
99103         +---------+
100104
101105
102Artefacts in OpenSCAD's mesh may also be rounding errors
106Artefacts in OpenSCAD's mesh were rounding errors
107-------------------------------------------------
108
109The artefacts found in the mesh produced by OpenSCAD were also caused
110by rounding errors. In this case, the problem were parts that were
111fused along a common surface. As in the above example, this could be
112solved by making the parts overlap a little.
103113
104The artefacts found in the mesh produced by OpenSCAD may also be
105caused from rounding errors. In this case, the problem would be parts
106that are fused along a common surface. As in the above example, this
107could be solved by making the parts overlap a little.
114This change affected the rendering performance as follows:
115
116                real user system faces vertices
117Before: 85.5 85.0 0.4 7798 3351
118After: 68.8 65.4 0.5 6508 3258
108119
109Whether this is truly the source of the artefacts still needs to be
110verified.
120The resulting mesh looks as good as the one generated by Cadmium.
111121
112122
113123OpenCSG problems may be an OpenGL compatibility issue
...... 
118127different color without actually removing them is caused by using
119128OpenGL emulation in Mesa. This needs further investigation.
120129
130
131Conclusion
132==========
133
134The model used in the first test contained constructs that were meant
135to help avoid ambiguous situations. It turned out that Cadmium did
136not need this "help" and removing the constructs substantially
137increased the rendering speed.
138
139OpenSCAD is the exact opposite: it produces clearly visible
140artefacts in ambiguous cases and rendering speed also benefits from
141manual resolution of these issues. The cost of doing so is an
142increase of the complexity of the model.
143
144Performance after the model changes (times are in seconds):
145
146                real user system faces vertices
147OpenSCAD: 68.8 65.4 0.5 6508 3258
148Cadmium: 316.3 315.9 0.3 2942 1473
149
150The sources of the models used are in
151http://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/master/cad/test2/
152
153The meshes can be downloaded from
154http://downloads.qi-hardware.com/people/werner/cad/test2/
155
121156---------------------------------------------------------------------

Archive Download the corresponding diff file

Branches:
master



interactive