@ParkinbotMy stl represents the land masses of the globe. It is currently
only a shell (no thickness). But I first wanted to be able to run this
through CGAL before trying to construct a valid manifold from it (adding an
inner shell and connect them properly).
However it looks like I will never be able to create CGAL accepted facets .
I am giving a try now to avoid CGAL by creating a printable manifold with
the help of the python stl library. The slicers stl handling of the printer
software looks to be more robust or flexible concerning small
inconsistencies in facets.
--
View this message in context: http://forum.openscad.org/cgal-error-with-2-triangles-tp21240p21291.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I do not agree that it only accepts manyfolds - otherwise the warning "stl
might not be manifold" does not make sense?
Well good luck trying to get CGAL to do CSG operations on invalid meshes in
OpenSCAD.
Note that even with manifold operands CSG ops can result in non-manifold
results. So the warning does make sense.
On 18 April 2017 at 15:28, juerg.maier juerg.maier@pobox.ch wrote:
@Parkinbot My stl represents the land masses of the globe. It is currently
only a shell (no thickness). But I first wanted to be able to run this
through CGAL before trying to construct a valid manifold from it (adding an
inner shell and connect them properly).
However it looks like I will never be able to create CGAL accepted facets
.
View this message in context: Re: cgal error with 2 triangles
http://forum.openscad.org/cgal-error-with-2-triangles-tp21240p21291.html
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Hi, just out of curiosity, is that file around 7.2GB in size?
--
View this message in context: http://forum.openscad.org/cgal-error-with-2-triangles-tp21240p21294.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Hi Juerg,
If I understand you correctly, what you really are trying to do is 3D print
a globe? If that is the case, forget about CGAL entirely and consider
polyhedron() or surface(). Either will give you a 3D shape that is
compatible with CGAL, as long as you adhere to CGAL's requirement of
Is_Simple. If you violate that requirement and trigger a Is_Simple assertion
violation, OpenSCAD will print as error message "stl might not be
manifold". For members of the computer graphics community, these two
messages are identical and interchangeable, for someone relying on a
background in mathematics the term "non-manifold" is unadulterated nonsense,
as any graphics you might display on a computer screen will have a dimension
greater than zero. People are entitled to assigning different meanings to a
word . . . (if it isn't done to confuse other people)
If my interpretation is correct and all you want to do is print a globe, the
OpenSCAD manual should give you enough on surface() if you want to follow
that route. As I have not used that command, I cannot give you further
guidance there.
If, on the other hand, you want to use polyhedron() to create your globe, I
can give you further guidance, as I have done most of the steps needed
before. In step 1, you create a sphere in such a way that you can access and
manipulate the distance each facet/vertex on this sphere has. In a second
step, you then change the radius of that sphere as a function of both
altitude and longitude, and, voila, you have your globe, at the resolution
you can obtain radius (=elevation) information.
wolf
--
View this message in context: http://forum.openscad.org/cgal-error-with-2-triangles-tp21240p21296.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
@adrian, I have 2 files, one is a profiled globe (mountains and sea depht)
from http://www.thingiverse.com/thing:1924651. I would like to use the
earth_9_24 data which is 250 MB in binary format.
I have tried to separate the mesh into land and sea parts for a printable 2
color globe but a difference with a sphere at sea level is
a) insufficient as some land parts differ only marginally from the sea level
b) fail due to CGAL errors with the globe mesh
I searched than for a land only mesh but run into more problems (some do not
map with the globe data, others are hard to work on). I finally succeeded to
extract a land mass shell using my own python script from this globe
https://grabcad.com/library/earth-globe.
Next thing I want to try now is to categorize each facet of the profiled
globe data into a land and sea part based on my land shell. If I can
accomplish that and wait out the processing I will need to add a thickness
to my 2 shell data sets to get 2 combinable stl to be loaded into
Simplify3D, the printers software program I use.
I also have a Multec 2Move print header which will allow me to get a good 2
colored printout. But currently that looks rather a good distance away. So I
do it step by step and also learn a lot about 3d vectors, python and stl.
Unfortunately it is almost impossible to use imported stl data that runs
through CGAL unless you create it with an openscad script. Also cleaning
such stl's with the bunch of free programs available (meshlab, meshmixer,
netfabb, microsoft stl fixer) returns good results but will not be accepted
by CGAL. And CGAL instead of at least pointing to a facet of my data only
refers to an internal code line which is absolutely of no help to a standard
openscad user.
--
View this message in context: http://forum.openscad.org/cgal-error-with-2-triangles-tp21240p21298.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
@wolf
thanks for coming back on this. maybe the explanations I have given to
@adrian make it clear what i finally want to accomplish.
My initial question - how come CGAL throws an exception with 2 triangle
definitions - must be far out of my math horizon.
The puzzle is not solved in my brain - if CSG can generate a view of an stl
from all possible angles and distances - why can we not have a program that
creates an stl after applying a boolean operation on that object. And if
CGAL is not made for such a job - why can I not select another rendering
method that is not as picky as CGAL? Or maybe STL is the real problem and we
should have the option to convert STL into another format - apply boolean
operations on that data - and reconvert it to a valid STL or stay with this
better suited format for 3d objects?
--
View this message in context: http://forum.openscad.org/cgal-error-with-2-triangles-tp21240p21299.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
CSG operations work on solids. Two triangles don't define a solid. You need
a mesh that completely encloses a volume, with no holes and no self
intersections or degenerate triangles.
Even then you might not be able to import it in to OpenSCAD because STL
import and export don't work if you have vertices very close together. A
long standing bug.
On 19 April 2017 at 10:42, juerg.maier juerg.maier@pobox.ch wrote:
@wolf
thanks for coming back on this. maybe the explanations I have given to
@adrian make it clear what i finally want to accomplish.
My initial question - how come CGAL throws an exception with 2 triangle
definitions - must be far out of my math horizon.
View this message in context: Re: cgal error with 2 triangles
http://forum.openscad.org/cgal-error-with-2-triangles-tp21240p21299.html
Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
juerg.maier wrote
I finally succeeded to extract a land mass shell using my own python
script from this globe https://grabcad.com/library/earth-globe.
...
Unfortunately it is almost impossible to use imported stl data that runs
through CGAL unless you create it with an openscad script.
if your STL exporter doesn't generate a valid solid (i.e. a proper 3D
manifold, no holes and self-intersections allowed), CGAL as well as any
other programm seriously processing STLs will complain. The CSG subsystem
does not complain, because it does not rely on valid manifolds. It uses the
GPU to more or less put the set of triangles or polygons into RAM, calculate
a view projection and then apply boolean operations in a "sloppy" way.
Slicers in contrast, can be fault-tolerant due to their way of operation.
Because they slice a solid into a sequence of 2D-polygon sets (which they
further transform into a sequential 1D fill path for G-Code description), it
is easy for them to close an open 2D-polygon to fix a hole, or split
self-intersecting 2D-polygons (think about an "8") into a set of non
self-intersecting polygons (think about "oo"). The result will not always be
a "do what I mean", but it is printable.
I have created and manipulated hundreds of STLs with C#, C++ and
Matlab-Code in ASCII and binary format for import to OpenSCAD. CGAL did not
complain. The secret is: proper solids, no holes, no self-intersections.
If you have a set of triangles describing a single landmass as a proper
surface (i.e. proper triangulation into a 2D-solid embedded in 3D, no holes,
no self-intersections), it is quite easy to construct a 3D manifold from
that. Add a common center point CP to the point list and introduce a
triangle between this point and every edge that is border i.e. that is not
shared by two triangles. While this works for one continuous landmass
(check: the border must be described by n distinct edges and n distinct
vertices. No self-intersection allowed), you run into a problem, if your
triangles describe a set of landmasses. Why? OpenSCAD does not allow Boolean
operations on sets of solids that share single vertices or edges. See this
code:
n=0; // no CGAL union possible
n=0.01; // CGAL union possible
p = [[n, 0, 0], [n, 0, 1], [n, 1, 1], [1, 0, 1]];
p1 = -p;
polyhedron(p, [[0, 2, 1], [0, 3, 2], [0, 1, 3], [1, 2, 3]]);
polyhedron(-p, [[0, 1, 2], [0, 2, 3], [0, 3, 1], [1, 3, 2]]);
setting n=0 will create a CGAL warning, which leads to trouble if ignored.
Also cleaning such stl's with the bunch of free programs available
(meshlab, meshmixer, netfabb, microsoft stl fixer) returns good results
but will not be accepted by CGAL. And CGAL instead of at least pointing to
a facet of my data only refers to an internal code line which is
absolutely of no help to a standard openscad user.
Hopping around from tool to tool, doesn't make things better.
--
View this message in context: http://forum.openscad.org/cgal-error-with-2-triangles-tp21240p21343.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
@parkinbot<p>
Thanks for your elaborations and the hint for 'multi island problems' i
might encounter.<p>
My current plans are to leave CGAL out of my processing steps. I have been
able to print objects with many intersecting triangles (some however come
out misbuilded) but the slicer looks to accept such inconsistencies.<p>
I am currently working on assining my profiled shell data either to the land
or the sea parts. So far it has beef fun to work on the data and I have a
lot of time to spend and learn new stuff like "is my profile point in a
triangle pyramid defined by the center of my globe and one of the land
triangles".<p>
--
View this message in context: http://forum.openscad.org/cgal-error-with-2-triangles-tp21240p21344.html
Sent from the OpenSCAD mailing list archive at Nabble.com.