tag:blogger.com,1999:blog-1409654809690469042.post8154404116759172182..comments2016-06-25T20:08:05.481-04:00Comments on I Heart Robotics: OpenSCAD Tip: Manifold Space and TimeI Heart Roboticsnoreply@blogger.comBlogger6125tag:blogger.com,1999:blog-1409654809690469042.post-89304253365285023622013-02-27T19:05:32.393-05:002013-02-27T19:05:32.393-05:00It's not like floating-point roundoff errors c...It's not like floating-point roundoff errors can't be handled sanely. Even problems like solids touching at a corner can be handled in some reasonable manner, especially if the solids are both created from linear_extrude. And then, it is very easy to create examples that are clearly correct that OpenSCAD still insists are not. There are a lot of bugs and a lot of fixing to be done.Unknownhttp://www.blogger.com/profile/02878815217919505806noreply@blogger.comtag:blogger.com,1999:blog-1409654809690469042.post-22186326829383671912013-01-14T22:46:00.686-05:002013-01-14T22:46:00.686-05:00It is not a physical problem, it is a mathematical...It is not a physical problem, it is a mathematical problem.<br /><br />Here is a better example in python<br />>>> print repr(1.0/3.0)<br />0.3333333333333333<br />>>> print repr(1.0-(2.0/3.0))<br />0.33333333333333337<br /><br />Both of these numbers should be the exact same, but they are not due to the issues with floating point math. This is because most computers do math in base 2, <br /><br />Which works out to something like 1/3 = 2^−2 + 2^−5 + 2^−6 + 2^−9<br />And dis-intuitively 1 - 2/3 does not produce the same series.<br /><br />A longer explanation of floating point problems can be found <a href="http://www.theregister.co.uk/2006/08/12/floating_point_approximation/" rel="nofollow">here</a>. <br /><br />The other problem is having a <a href="http://en.wikipedia.org/wiki/Mathematical_singularity" rel="nofollow">singularity</a>. I'm not sure this is clearer than the wikipedia example but this can perhaps be explained by considering a venn diagram. Consider two overlapping circles whose intersection is considered the solution. If the circles are tangent there is one solution at the point where they meet, however there is no area. So if you then try to subtract one circle from the other you need to remove the point without removing any area, which is undefined.I Heart Roboticshttp://www.blogger.com/profile/12538673939219132671noreply@blogger.comtag:blogger.com,1999:blog-1409654809690469042.post-21766051299418836712013-01-14T20:48:06.865-05:002013-01-14T20:48:06.865-05:00I think it may be possible that these are simply b...I think it may be possible that these are simply bugs in both CGAL and in OpenCSG... there doesn't seem to be a 'physical' reason that we shouldn't be able to print any of the stuff you have rendered above. . . Don Brighthttp://github.com/donbrightnoreply@blogger.comtag:blogger.com,1999:blog-1409654809690469042.post-78928131723478879172010-01-26T19:12:05.102-05:002010-01-26T19:12:05.102-05:00While "watertightness" is a nice by-prod...While "watertightness" is a nice by-product of a manifold mesh, the real test of whether a mesh is manifold or not is that all edges must be shared by exactly two polygons (usually triangles). If we think about a hole (or a leak, in terms of watertightness) that would be a triangle with an edge used by only one polygon. But another way to make a non-manifold, but still technically watertight mesh is to take a manifold mesh and connect two arbitrary edges with a triangle -- that would create at least one edge shared by three polygons.<br /><br />The computer has issues with this, because it can't decide what the inside and outside are, if there are multiple volumes enclosed by meshes. <br /><br />In this case, it looks like you might have had an errant triangle, or an edge that didn't terminate correctly, because of how many edges shared that upper vertex. Making the step freed the vertex up.<br /><br />Nice work on the part. I'll give it a test with my makerbot when she's up and running.Dominic Murenhttp://www.blogger.com/profile/18268620780873177982noreply@blogger.comtag:blogger.com,1999:blog-1409654809690469042.post-90156178497575952302010-01-19T17:36:27.468-05:002010-01-19T17:36:27.468-05:00Sometimes that will help, but usually its caused b...Sometimes that will help, but usually its caused by the geometry being mathematically indeterminate. Floating point errors often causes geometry problems. <br /><br />In python for example<br />>>> print repr(32.0/100.0)<br />0.32000000000000001<br />>>> print repr((132.0/100.0)-(100.00/100.00))<br />0.32000000000000006<br /><br />So if you have two surfaces that are supposed to meet exactly, they may not.<br /><br />I did try smoothing the mesh but OpenSCAD doesn't seem to do it consistently.<br /><br />scale([1/100, 1/100, 1/100]) cylinder(h = (H)*100, r=(ID/2)*100, center = true);I Heart Roboticshttp://www.blogger.com/profile/12538673939219132671noreply@blogger.comtag:blogger.com,1999:blog-1409654809690469042.post-8070092819889844892010-01-19T16:10:36.188-05:002010-01-19T16:10:36.188-05:00If you apply a smoothing operation to the mesh to ...If you apply a smoothing operation to the mesh to increase its polygon count, would that help?Robotblinghttp://www.plasticpals.comnoreply@blogger.com