mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-21 16:06:17 +02:00
cad/test2/README: added more results and cleaned up the text
This commit is contained in:
parent
521f0315bb
commit
3f820dc41d
@ -17,6 +17,10 @@ http://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/master/cad/te
|
|||||||
New findings and hypotheses
|
New findings and hypotheses
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
The first test revealed several problems in both OpenSCAD and
|
||||||
|
Cadmium. It turned out that most of them could be resolved by making
|
||||||
|
small changes to the models.
|
||||||
|
|
||||||
|
|
||||||
The road to hell is paved with good intentions
|
The road to hell is paved with good intentions
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
@ -34,7 +38,7 @@ This is a comparison of run time (in seconds) and mesh size:
|
|||||||
Before: 4901.0 4904.4 1.5 8362 3183
|
Before: 4901.0 4904.4 1.5 8362 3183
|
||||||
After: 316.3 315.9 0.3 2942 1473
|
After: 316.3 315.9 0.3 2942 1473
|
||||||
|
|
||||||
This makes Cadmium only about 3.7 times slower than OpenSCAD's CGAL
|
This makes Cadmium only about 4-5 times slower than OpenSCAD's CGAL
|
||||||
rendering, a marked improvement from the previous factor of 57. The
|
rendering, a marked improvement from the previous factor of 57. The
|
||||||
resulting mesh is now less than half the size of the mesh generated
|
resulting mesh is now less than half the size of the mesh generated
|
||||||
by OpenSCAD.
|
by OpenSCAD.
|
||||||
@ -43,16 +47,16 @@ Furthermore, the model is much easier to design and more
|
|||||||
understandable without these extra tolerances.
|
understandable without these extra tolerances.
|
||||||
|
|
||||||
|
|
||||||
Context: preventing artefacts
|
Background: preventing artefacts
|
||||||
-----------------------------
|
--------------------------------
|
||||||
|
|
||||||
When subtracting volumes from each other, surfaces that coincide in
|
When subtracting volumes from each other, surfaces that coincide in
|
||||||
both the original volume and the one subtracted from it, can remain
|
both the original volume and the one subtracted from it can remain
|
||||||
as arbitrarily thin artefacts.
|
as arbitrarily thin artefacts.
|
||||||
|
|
||||||
This 2D example illustrates the effect:
|
This 2D example illustrates the effect:
|
||||||
|
|
||||||
- given an original shape A like this
|
- given an original shape like this
|
||||||
|
|
||||||
+---------------+
|
+---------------+
|
||||||
| |
|
| |
|
||||||
@ -99,16 +103,21 @@ This 2D example illustrates the effect:
|
|||||||
+---------+
|
+---------+
|
||||||
|
|
||||||
|
|
||||||
Artefacts in OpenSCAD's mesh may also be rounding errors
|
Artefacts in OpenSCAD's mesh were rounding errors
|
||||||
--------------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|
||||||
The artefacts found in the mesh produced by OpenSCAD may also be
|
The artefacts found in the mesh produced by OpenSCAD were also caused
|
||||||
caused from rounding errors. In this case, the problem would be parts
|
by rounding errors. In this case, the problem were parts that were
|
||||||
that are fused along a common surface. As in the above example, this
|
fused along a common surface. As in the above example, this could be
|
||||||
could be solved by making the parts overlap a little.
|
solved by making the parts overlap a little.
|
||||||
|
|
||||||
Whether this is truly the source of the artefacts still needs to be
|
This change affected the rendering performance as follows:
|
||||||
verified.
|
|
||||||
|
real user system faces vertices
|
||||||
|
Before: 85.5 85.0 0.4 7798 3351
|
||||||
|
After: 68.8 65.4 0.5 6508 3258
|
||||||
|
|
||||||
|
The resulting mesh looks as good as the one generated by Cadmium.
|
||||||
|
|
||||||
|
|
||||||
OpenCSG problems may be an OpenGL compatibility issue
|
OpenCSG problems may be an OpenGL compatibility issue
|
||||||
@ -118,4 +127,30 @@ It could be that OpenCSG showing volumes to be removed just with a
|
|||||||
different color without actually removing them is caused by using
|
different color without actually removing them is caused by using
|
||||||
OpenGL emulation in Mesa. This needs further investigation.
|
OpenGL emulation in Mesa. This needs further investigation.
|
||||||
|
|
||||||
|
|
||||||
|
Conclusion
|
||||||
|
==========
|
||||||
|
|
||||||
|
The model used in the first test contained constructs that were meant
|
||||||
|
to help avoid ambiguous situations. It turned out that Cadmium did
|
||||||
|
not need this "help" and removing the constructs substantially
|
||||||
|
increased the rendering speed.
|
||||||
|
|
||||||
|
OpenSCAD is the exact opposite: it produces clearly visible
|
||||||
|
artefacts in ambiguous cases and rendering speed also benefits from
|
||||||
|
manual resolution of these issues. The cost of doing so is an
|
||||||
|
increase of the complexity of the model.
|
||||||
|
|
||||||
|
Performance after the model changes (times are in seconds):
|
||||||
|
|
||||||
|
real user system faces vertices
|
||||||
|
OpenSCAD: 68.8 65.4 0.5 6508 3258
|
||||||
|
Cadmium: 316.3 315.9 0.3 2942 1473
|
||||||
|
|
||||||
|
The sources of the models used are in
|
||||||
|
http://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/master/cad/test2/
|
||||||
|
|
||||||
|
The meshes can be downloaded from
|
||||||
|
http://downloads.qi-hardware.com/people/werner/cad/test2/
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user