JJ
Johan Jonker
Wed, Jan 27, 2016 11:42 AM
*Already for weeks I am working on a configurable clarinet mouthpiece design.
I make use of the sweep functions make the objects.
I make three different stl files to keep the speed acceptable.
- The outside
- the inside
- the beak ; a part that is cut from the outside part too.
The combination file looks like this:*
module mouthpiece ()
{
difference()// body minus tafel
{
import("mouthpiece outside v11.stl");
import("mouthpiece inside v11.stl");
import("mouthpiece beak v11.stl");
}
}
The problem is that combinations of the outside and the beak gives an error
using F6.
I already check both objects with meshLab. The are allright. What can be
wrong?
This is the output of the console:
/Saved backup file:
C:/Users/Eigenaar/Documents/OpenSCAD/backups/mouthpiece-backup-gqHp8304.scad
Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL ERROR:
assertion violation! Expr: itl != it->second.end() File:
/data/OpenSCAD/libraries-mingw32-master/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1102
Geometries in cache: 8
Geometry cache size in bytes: 13645112
CGAL Polyhedrons in cache: 4
CGAL cache size in bytes: 97234272
Total rendering time: 0 hours, 1 minutes, 33 seconds
Top level object is a 3D object:
Simple: yes
Vertices: 18712
Halfedges: 109364
Edges: 54682
Halffacets: 71950
Facets: 35975
Volumes: 2
Rendering finished./
mouthpiece_beak_v11.stl
http://forum.openscad.org/file/n15909/mouthpiece_beak_v11.stl
mouthpiece_outside_v11.scad
http://forum.openscad.org/file/n15909/mouthpiece_outside_v11.scad
mouthpiece_inside_v11.stl
http://forum.openscad.org/file/n15909/mouthpiece_inside_v11.stl
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
*Already for weeks I am working on a configurable clarinet mouthpiece design.
I make use of the sweep functions make the objects.
I make three different stl files to keep the speed acceptable.
- The outside
- the inside
- the beak ; a part that is cut from the outside part too.
The combination file looks like this:*
module mouthpiece ()
{
difference()// body minus tafel
{
import("mouthpiece outside v11.stl");
import("mouthpiece inside v11.stl");
import("mouthpiece beak v11.stl");
}
}
*The problem is that combinations of the outside and the beak gives an error
using F6.
I already check both objects with meshLab. The are allright. What can be
wrong?*
*This is the output of the console:*
/Saved backup file:
C:/Users/Eigenaar/Documents/OpenSCAD/backups/mouthpiece-backup-gqHp8304.scad
Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL ERROR:
assertion violation! Expr: itl != it->second.end() File:
/data/OpenSCAD/libraries-mingw32-master/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1102
Geometries in cache: 8
Geometry cache size in bytes: 13645112
CGAL Polyhedrons in cache: 4
CGAL cache size in bytes: 97234272
Total rendering time: 0 hours, 1 minutes, 33 seconds
Top level object is a 3D object:
Simple: yes
Vertices: 18712
Halfedges: 109364
Edges: 54682
Halffacets: 71950
Facets: 35975
Volumes: 2
Rendering finished./
mouthpiece_beak_v11.stl
<http://forum.openscad.org/file/n15909/mouthpiece_beak_v11.stl>
mouthpiece_outside_v11.scad
<http://forum.openscad.org/file/n15909/mouthpiece_outside_v11.scad>
mouthpiece_inside_v11.stl
<http://forum.openscad.org/file/n15909/mouthpiece_inside_v11.stl>
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Wed, Jan 27, 2016 11:48 AM
Perhaps they intersect, so that although each mesh is manifold, the result
isn't.
On 27 January 2016 at 11:42, Johan Jonker johangjonker@zonnet.nl wrote:
*Already for weeks I am working on a configurable clarinet mouthpiece
design.
I make use of the sweep functions make the objects.
I make three different stl files to keep the speed acceptable.
- The outside
- the inside
- the beak ; a part that is cut from the outside part too.
The combination file looks like this:*
module mouthpiece ()
{
difference()// body minus tafel
{
import("mouthpiece outside v11.stl");
import("mouthpiece inside v11.stl");
import("mouthpiece beak v11.stl");
}
}
The problem is that combinations of the outside and the beak gives an
error
using F6.
I already check both objects with meshLab. The are allright. What can be
wrong?
This is the output of the console:
/Saved backup file:
C:/Users/Eigenaar/Documents/OpenSCAD/backups/mouthpiece-backup-gqHp8304.scad
Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL ERROR:
assertion violation! Expr: itl != it->second.end() File:
/data/OpenSCAD/libraries-mingw32-master/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1102
Geometries in cache: 8
Geometry cache size in bytes: 13645112
CGAL Polyhedrons in cache: 4
CGAL cache size in bytes: 97234272
Total rendering time: 0 hours, 1 minutes, 33 seconds
Top level object is a 3D object:
Simple: yes
Vertices: 18712
Halfedges: 109364
Edges: 54682
Halffacets: 71950
Facets: 35975
Volumes: 2
Rendering finished./
mouthpiece_beak_v11.stl
http://forum.openscad.org/file/n15909/mouthpiece_beak_v11.stl
mouthpiece_outside_v11.scad
http://forum.openscad.org/file/n15909/mouthpiece_outside_v11.scad
mouthpiece_inside_v11.stl
http://forum.openscad.org/file/n15909/mouthpiece_inside_v11.stl
--
View this message in context:
http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Perhaps they intersect, so that although each mesh is manifold, the result
isn't.
On 27 January 2016 at 11:42, Johan Jonker <johangjonker@zonnet.nl> wrote:
> *Already for weeks I am working on a configurable clarinet mouthpiece
> design.
> I make use of the sweep functions make the objects.
>
> I make three different stl files to keep the speed acceptable.
> - The outside
> - the inside
> - the beak ; a part that is cut from the outside part too.
>
> The combination file looks like this:*
> module mouthpiece ()
> {
> difference()// body minus tafel
> {
> import("mouthpiece outside v11.stl");
> import("mouthpiece inside v11.stl");
> import("mouthpiece beak v11.stl");
> }
> }
>
> *The problem is that combinations of the outside and the beak gives an
> error
> using F6.
> I already check both objects with meshLab. The are allright. What can be
> wrong?*
>
> *This is the output of the console:*
> /Saved backup file:
>
> C:/Users/Eigenaar/Documents/OpenSCAD/backups/mouthpiece-backup-gqHp8304.scad
> Compiling design (CSG Tree generation)...
> Rendering Polygon Mesh using CGAL...
> ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL ERROR:
> assertion violation! Expr: itl != it->second.end() File:
>
> /data/OpenSCAD/libraries-mingw32-master/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/SNC_external_structure.h
> Line: 1102
> Geometries in cache: 8
> Geometry cache size in bytes: 13645112
> CGAL Polyhedrons in cache: 4
> CGAL cache size in bytes: 97234272
> Total rendering time: 0 hours, 1 minutes, 33 seconds
> Top level object is a 3D object:
> Simple: yes
> Vertices: 18712
> Halfedges: 109364
> Edges: 54682
> Halffacets: 71950
> Facets: 35975
> Volumes: 2
> Rendering finished./
>
> mouthpiece_beak_v11.stl
> <http://forum.openscad.org/file/n15909/mouthpiece_beak_v11.stl>
> mouthpiece_outside_v11.scad
> <http://forum.openscad.org/file/n15909/mouthpiece_outside_v11.scad>
> mouthpiece_inside_v11.stl
> <http://forum.openscad.org/file/n15909/mouthpiece_inside_v11.stl>
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
NH
nop head
Wed, Jan 27, 2016 11:53 AM
On second thoughts that shouldn't be a problem. Please can you attach the
STL for the outside.
On 27 January 2016 at 11:48, nop head nop.head@gmail.com wrote:
Perhaps they intersect, so that although each mesh is manifold, the result
isn't.
On 27 January 2016 at 11:42, Johan Jonker johangjonker@zonnet.nl wrote:
*Already for weeks I am working on a configurable clarinet mouthpiece
design.
I make use of the sweep functions make the objects.
I make three different stl files to keep the speed acceptable.
- The outside
- the inside
- the beak ; a part that is cut from the outside part too.
The combination file looks like this:*
module mouthpiece ()
{
difference()// body minus tafel
{
import("mouthpiece outside v11.stl");
import("mouthpiece inside v11.stl");
import("mouthpiece beak v11.stl");
}
}
The problem is that combinations of the outside and the beak gives an
error
using F6.
I already check both objects with meshLab. The are allright. What can be
wrong?
This is the output of the console:
/Saved backup file:
C:/Users/Eigenaar/Documents/OpenSCAD/backups/mouthpiece-backup-gqHp8304.scad
Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL
ERROR:
assertion violation! Expr: itl != it->second.end() File:
/data/OpenSCAD/libraries-mingw32-master/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1102
Geometries in cache: 8
Geometry cache size in bytes: 13645112
CGAL Polyhedrons in cache: 4
CGAL cache size in bytes: 97234272
Total rendering time: 0 hours, 1 minutes, 33 seconds
Top level object is a 3D object:
Simple: yes
Vertices: 18712
Halfedges: 109364
Edges: 54682
Halffacets: 71950
Facets: 35975
Volumes: 2
Rendering finished./
mouthpiece_beak_v11.stl
http://forum.openscad.org/file/n15909/mouthpiece_beak_v11.stl
mouthpiece_outside_v11.scad
http://forum.openscad.org/file/n15909/mouthpiece_outside_v11.scad
mouthpiece_inside_v11.stl
http://forum.openscad.org/file/n15909/mouthpiece_inside_v11.stl
--
View this message in context:
http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On second thoughts that shouldn't be a problem. Please can you attach the
STL for the outside.
On 27 January 2016 at 11:48, nop head <nop.head@gmail.com> wrote:
> Perhaps they intersect, so that although each mesh is manifold, the result
> isn't.
>
> On 27 January 2016 at 11:42, Johan Jonker <johangjonker@zonnet.nl> wrote:
>
>> *Already for weeks I am working on a configurable clarinet mouthpiece
>> design.
>> I make use of the sweep functions make the objects.
>>
>> I make three different stl files to keep the speed acceptable.
>> - The outside
>> - the inside
>> - the beak ; a part that is cut from the outside part too.
>>
>> The combination file looks like this:*
>> module mouthpiece ()
>> {
>> difference()// body minus tafel
>> {
>> import("mouthpiece outside v11.stl");
>> import("mouthpiece inside v11.stl");
>> import("mouthpiece beak v11.stl");
>> }
>> }
>>
>> *The problem is that combinations of the outside and the beak gives an
>> error
>> using F6.
>> I already check both objects with meshLab. The are allright. What can be
>> wrong?*
>>
>> *This is the output of the console:*
>> /Saved backup file:
>>
>> C:/Users/Eigenaar/Documents/OpenSCAD/backups/mouthpiece-backup-gqHp8304.scad
>> Compiling design (CSG Tree generation)...
>> Rendering Polygon Mesh using CGAL...
>> ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL
>> ERROR:
>> assertion violation! Expr: itl != it->second.end() File:
>>
>> /data/OpenSCAD/libraries-mingw32-master/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/SNC_external_structure.h
>> Line: 1102
>> Geometries in cache: 8
>> Geometry cache size in bytes: 13645112
>> CGAL Polyhedrons in cache: 4
>> CGAL cache size in bytes: 97234272
>> Total rendering time: 0 hours, 1 minutes, 33 seconds
>> Top level object is a 3D object:
>> Simple: yes
>> Vertices: 18712
>> Halfedges: 109364
>> Edges: 54682
>> Halffacets: 71950
>> Facets: 35975
>> Volumes: 2
>> Rendering finished./
>>
>> mouthpiece_beak_v11.stl
>> <http://forum.openscad.org/file/n15909/mouthpiece_beak_v11.stl>
>> mouthpiece_outside_v11.scad
>> <http://forum.openscad.org/file/n15909/mouthpiece_outside_v11.scad>
>> mouthpiece_inside_v11.stl
>> <http://forum.openscad.org/file/n15909/mouthpiece_inside_v11.stl>
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909.html
>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> Discuss@lists.openscad.org
>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>
>
NH
nop head
Wed, Jan 27, 2016 11:56 AM
According to Netfabb the mouthpiece inside has degenerate triangles.
On 27 January 2016 at 11:53, nop head nop.head@gmail.com wrote:
On second thoughts that shouldn't be a problem. Please can you attach the
STL for the outside.
On 27 January 2016 at 11:48, nop head nop.head@gmail.com wrote:
Perhaps they intersect, so that although each mesh is manifold, the
result isn't.
On 27 January 2016 at 11:42, Johan Jonker johangjonker@zonnet.nl wrote:
*Already for weeks I am working on a configurable clarinet mouthpiece
design.
I make use of the sweep functions make the objects.
I make three different stl files to keep the speed acceptable.
- The outside
- the inside
- the beak ; a part that is cut from the outside part too.
The combination file looks like this:*
module mouthpiece ()
{
difference()// body minus tafel
{
import("mouthpiece outside v11.stl");
import("mouthpiece inside v11.stl");
import("mouthpiece beak v11.stl");
}
}
The problem is that combinations of the outside and the beak gives an
error
using F6.
I already check both objects with meshLab. The are allright. What can be
wrong?
This is the output of the console:
/Saved backup file:
C:/Users/Eigenaar/Documents/OpenSCAD/backups/mouthpiece-backup-gqHp8304.scad
Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL
ERROR:
assertion violation! Expr: itl != it->second.end() File:
/data/OpenSCAD/libraries-mingw32-master/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1102
Geometries in cache: 8
Geometry cache size in bytes: 13645112
CGAL Polyhedrons in cache: 4
CGAL cache size in bytes: 97234272
Total rendering time: 0 hours, 1 minutes, 33 seconds
Top level object is a 3D object:
Simple: yes
Vertices: 18712
Halfedges: 109364
Edges: 54682
Halffacets: 71950
Facets: 35975
Volumes: 2
Rendering finished./
mouthpiece_beak_v11.stl
http://forum.openscad.org/file/n15909/mouthpiece_beak_v11.stl
mouthpiece_outside_v11.scad
http://forum.openscad.org/file/n15909/mouthpiece_outside_v11.scad
mouthpiece_inside_v11.stl
http://forum.openscad.org/file/n15909/mouthpiece_inside_v11.stl
--
View this message in context:
http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
According to Netfabb the mouthpiece inside has degenerate triangles.
On 27 January 2016 at 11:53, nop head <nop.head@gmail.com> wrote:
> On second thoughts that shouldn't be a problem. Please can you attach the
> STL for the outside.
>
> On 27 January 2016 at 11:48, nop head <nop.head@gmail.com> wrote:
>
>> Perhaps they intersect, so that although each mesh is manifold, the
>> result isn't.
>>
>> On 27 January 2016 at 11:42, Johan Jonker <johangjonker@zonnet.nl> wrote:
>>
>>> *Already for weeks I am working on a configurable clarinet mouthpiece
>>> design.
>>> I make use of the sweep functions make the objects.
>>>
>>> I make three different stl files to keep the speed acceptable.
>>> - The outside
>>> - the inside
>>> - the beak ; a part that is cut from the outside part too.
>>>
>>> The combination file looks like this:*
>>> module mouthpiece ()
>>> {
>>> difference()// body minus tafel
>>> {
>>> import("mouthpiece outside v11.stl");
>>> import("mouthpiece inside v11.stl");
>>> import("mouthpiece beak v11.stl");
>>> }
>>> }
>>>
>>> *The problem is that combinations of the outside and the beak gives an
>>> error
>>> using F6.
>>> I already check both objects with meshLab. The are allright. What can be
>>> wrong?*
>>>
>>> *This is the output of the console:*
>>> /Saved backup file:
>>>
>>> C:/Users/Eigenaar/Documents/OpenSCAD/backups/mouthpiece-backup-gqHp8304.scad
>>> Compiling design (CSG Tree generation)...
>>> Rendering Polygon Mesh using CGAL...
>>> ERROR: CGAL error in CGALUtils::applyBinaryOperator difference: CGAL
>>> ERROR:
>>> assertion violation! Expr: itl != it->second.end() File:
>>>
>>> /data/OpenSCAD/libraries-mingw32-master/mxe/usr/i686-w64-mingw32.static/include/CGAL/Nef_3/SNC_external_structure.h
>>> Line: 1102
>>> Geometries in cache: 8
>>> Geometry cache size in bytes: 13645112
>>> CGAL Polyhedrons in cache: 4
>>> CGAL cache size in bytes: 97234272
>>> Total rendering time: 0 hours, 1 minutes, 33 seconds
>>> Top level object is a 3D object:
>>> Simple: yes
>>> Vertices: 18712
>>> Halfedges: 109364
>>> Edges: 54682
>>> Halffacets: 71950
>>> Facets: 35975
>>> Volumes: 2
>>> Rendering finished./
>>>
>>> mouthpiece_beak_v11.stl
>>> <http://forum.openscad.org/file/n15909/mouthpiece_beak_v11.stl>
>>> mouthpiece_outside_v11.scad
>>> <http://forum.openscad.org/file/n15909/mouthpiece_outside_v11.scad>
>>> mouthpiece_inside_v11.stl
>>> <http://forum.openscad.org/file/n15909/mouthpiece_inside_v11.stl>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909.html
>>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> Discuss@lists.openscad.org
>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>>
>>
>>
>
JJ
Johan Jonker
Wed, Jan 27, 2016 12:17 PM
Interesting, according to Meshlab its OK. How do I show that in NetFabb?
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15913.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Interesting, according to Meshlab its OK. How do I show that in NetFabb?
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15913.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Wed, Jan 27, 2016 12:22 PM
Just click on the red cross button.
On 27 January 2016 at 12:17, Johan Jonker <johangjonker@zonnet.nl> wrote:
> Interesting, according to Meshlab its OK. How do I show that in NetFabb?
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15913.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
JJ
Johan Jonker
Wed, Jan 27, 2016 12:32 PM
Ah, yes I see that.
I wonder what can cause that kind of errors.
It is just a hull of a cylinder and a rotated polyhedron.
Is there anything I should take car of combining that?
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15915.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Ah, yes I see that.
I wonder what can cause that kind of errors.
It is just a hull of a cylinder and a rotated polyhedron.
Is there anything I should take car of combining that?
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15915.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Wed, Jan 27, 2016 12:41 PM
It is caused by vertices so close together in one dimension that the
triangle collapses into a line or a point when its vertices are converted
to floats. OpenScad should fix when exporting STLs but as yet it doesn't.
The only way to avoid it is to avoid very close vertices. E.g. don't have
things meeting tangentially, overlap a bit, etc.
I can be tricky if you mix vertices created in 2D with ones created in 3D
as they can be slightly difference numerically.
On 27 January 2016 at 12:32, Johan Jonker johangjonker@zonnet.nl wrote:
It is caused by vertices so close together in one dimension that the
triangle collapses into a line or a point when its vertices are converted
to floats. OpenScad should fix when exporting STLs but as yet it doesn't.
The only way to avoid it is to avoid very close vertices. E.g. don't have
things meeting tangentially, overlap a bit, etc.
I can be tricky if you mix vertices created in 2D with ones created in 3D
as they can be slightly difference numerically.
On 27 January 2016 at 12:32, Johan Jonker <johangjonker@zonnet.nl> wrote:
> Ah, yes I see that.
>
> I wonder what can cause that kind of errors.
> It is just a hull of a cylinder and a rotated polyhedron.
>
> Is there anything I should take car of combining that?
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15915.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
JJ
Johan Jonker
Wed, Jan 27, 2016 12:53 PM
OK, thanks!
that's a usefull suggestion. It gives an idea where I can fix the design.
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15917.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OK, thanks!
that's a usefull suggestion. It gives an idea where I can fix the design.
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15917.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
JJ
Johan Jonker
Wed, Jan 27, 2016 1:04 PM
It helps when I limit the $fn for some shapes.
Now Nettfabb shows no errors anymore.
OpenScad still gives errors.
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15918.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
It helps when I limit the $fn for some shapes.
Now Nettfabb shows no errors anymore.
OpenScad still gives errors.
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15918.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Wed, Jan 27, 2016 1:23 PM
It is a sad fact that OpenScad can't import a lot of the STLs it makes
itself. I think it re-quantises vertices and they collapse. It also doesn't
detect invalid meshes until you do a CGAL operation on them.
You can isolate the problem one by just importing each one in turn and
unioning it with a cube().
If you post the code for the problem piece I might be able to suggest a
fix. I spent a many hours fixing up Mendel90 recently.
On 27 January 2016 at 13:04, Johan Jonker johangjonker@zonnet.nl wrote:
It is a sad fact that OpenScad can't import a lot of the STLs it makes
itself. I think it re-quantises vertices and they collapse. It also doesn't
detect invalid meshes until you do a CGAL operation on them.
You can isolate the problem one by just importing each one in turn and
unioning it with a cube().
If you post the code for the problem piece I might be able to suggest a
fix. I spent a many hours fixing up Mendel90 recently.
On 27 January 2016 at 13:04, Johan Jonker <johangjonker@zonnet.nl> wrote:
> It helps when I limit the $fn for some shapes.
> Now Nettfabb shows no errors anymore.
> OpenScad still gives errors.
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15918.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
T
Trygon
Wed, Jan 27, 2016 1:49 PM
You could try fixing the stl file with MeshLab before importing it into
OpenSCAD:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Why_is_my_imported_STL_file_only_showing_up_with_F5_but_not_F6.3F
Cheers,
Trygon
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15922.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
J
jon
Wed, Jan 27, 2016 1:59 PM
I often use NetFabb Basic on larger STL files. It usually produces
visually identical STL files which are much smaller than the originals.
Jon
On 1/27/2016 8:49 AM, Trygon wrote:
I often use NetFabb Basic on larger STL files. It usually produces
visually identical STL files which are much smaller than the originals.
Jon
On 1/27/2016 8:49 AM, Trygon wrote:
> You could try fixing the stl file with MeshLab before importing it into
> OpenSCAD:
>
> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Why_is_my_imported_STL_file_only_showing_up_with_F5_but_not_F6.3F
>
> Cheers,
> Trygon
>
NH
nop head
Wed, Jan 27, 2016 2:45 PM
I that because it writes binary STL files by default?
On 27 January 2016 at 13:59, jon jon@jonbondy.com wrote:
I often use NetFabb Basic on larger STL files. It usually produces
visually identical STL files which are much smaller than the originals.
Jon
On 1/27/2016 8:49 AM, Trygon wrote:
I that because it writes binary STL files by default?
On 27 January 2016 at 13:59, jon <jon@jonbondy.com> wrote:
> I often use NetFabb Basic on larger STL files. It usually produces
> visually identical STL files which are much smaller than the originals.
>
> Jon
>
> On 1/27/2016 8:49 AM, Trygon wrote:
>
>> You could try fixing the stl file with MeshLab before importing it into
>> OpenSCAD:
>>
>>
>> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#Why_is_my_imported_STL_file_only_showing_up_with_F5_but_not_F6.3F
>>
>> Cheers,
>> Trygon
>>
>>
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
CA
Carsten Arnholm
Wed, Jan 27, 2016 3:11 PM
On 27. jan. 2016 14:23, nop head wrote:
It is a sad fact that OpenScad can't import a lot of the STLs it makes
itself. I think it re-quantises vertices and they collapse. It also
doesn't detect invalid meshes until you do a CGAL operation on them.
Regardless of how OpenSCAD treats the STL files on import (it probably
could be improved), it shows that STL is the wrong format for
intermediate storage of parts when the intention is re-import for assembly.
Why is it the wrong format? Because STL files do not contain any
topology at all, so when you import the STL for further use in boolean
operations, the topology must be guessed and reconstructed using unsafe
coordinate comparisons. It is inefficient and bound to fail in many
cases, and it does. By 'fail' I mean the reconstructed topology is not
exactly the same as the original.
A better solution for this purpose would probably be to store one or
more computed polyhedrons to a file (assuming one takes an approach
native to OpenSCAD). The idea would be to allow such polyhedron files to
be re-imported as an alternative to STL. It would guarantee that the
imported object is the same as the exported object, it would be more
compact since each vertex is mentioned only once, and it would be faster
to process because no vertex matching would have to be done. You could
think of it as ready made 'parts' files that needs to be imported into
openscad as in the original mouthpiece example, just using a different
format for intermediate storage.
If you don't want to introduce another format for this purpose, perhaps
AMF could serve the same purpose, although the present (2015.03-2)
implementation of AMF export does not seem to separate between
independent bodies. I just tested it with a model containing several
bodies and they were written to AMF as a single <object>. For AMF to
work as intermediate format the way I described, each <object> on AMF
would have to be a valid polyhedron. AMF is an XML format so you could
perhaps add a property to the object type to indicate it is indeed a
polyhedron:
<object id="0" type="polyhedron">
Just my thoughts.
Carsten Arnholm
On 27. jan. 2016 14:23, nop head wrote:
> It is a sad fact that OpenScad can't import a lot of the STLs it makes
> itself. I think it re-quantises vertices and they collapse. It also
> doesn't detect invalid meshes until you do a CGAL operation on them.
Regardless of how OpenSCAD treats the STL files on import (it probably
could be improved), it shows that STL is the wrong format for
intermediate storage of parts when the intention is re-import for assembly.
Why is it the wrong format? Because STL files do not contain any
topology at all, so when you import the STL for further use in boolean
operations, the topology must be guessed and reconstructed using unsafe
coordinate comparisons. It is inefficient and bound to fail in many
cases, and it does. By 'fail' I mean the reconstructed topology is not
exactly the same as the original.
A better solution for this purpose would probably be to store one or
more computed polyhedrons to a file (assuming one takes an approach
native to OpenSCAD). The idea would be to allow such polyhedron files to
be re-imported as an alternative to STL. It would guarantee that the
imported object is the same as the exported object, it would be more
compact since each vertex is mentioned only once, and it would be faster
to process because no vertex matching would have to be done. You could
think of it as ready made 'parts' files that needs to be imported into
openscad as in the original mouthpiece example, just using a different
format for intermediate storage.
If you don't want to introduce another format for this purpose, perhaps
AMF could serve the same purpose, although the present (2015.03-2)
implementation of AMF export does not seem to separate between
independent bodies. I just tested it with a model containing several
bodies and they were written to AMF as a single <object>. For AMF to
work as intermediate format the way I described, each <object> on AMF
would have to be a valid polyhedron. AMF is an XML format so you could
perhaps add a property to the object type to indicate it is indeed a
polyhedron:
<object id="0" type="polyhedron">
Just my thoughts.
Carsten Arnholm
NH
nop head
Wed, Jan 27, 2016 3:34 PM
However deficient STL is, it is still possible to use it to represent 2
manifold meshes unambiguously, although it is very easy to make broken
ones. It is safe to compare vertex values as long as it has been written
correctly. I.e. topologically distinct vertices must have different
numerical values in the file representation and all vertices that are
equivalent must have exactly the same file representation.
The only reasons OpenScad can't import some of its own STLs and a lot of
perfectly good ones from other systems too is because it reduces the
precision of vertices without correcting the topological consequences. I
don't think AMF will help in this respect. You can't simply truncate from
higher precision to float or snap vertices to a grid without running the
risk of corrupting the topology.
On 27 January 2016 at 15:11, Carsten Arnholm arnholm@arnholm.org wrote:
On 27. jan. 2016 14:23, nop head wrote:
It is a sad fact that OpenScad can't import a lot of the STLs it makes
itself. I think it re-quantises vertices and they collapse. It also
doesn't detect invalid meshes until you do a CGAL operation on them.
Regardless of how OpenSCAD treats the STL files on import (it probably
could be improved), it shows that STL is the wrong format for intermediate
storage of parts when the intention is re-import for assembly.
Why is it the wrong format? Because STL files do not contain any topology
at all, so when you import the STL for further use in boolean operations,
the topology must be guessed and reconstructed using unsafe coordinate
comparisons. It is inefficient and bound to fail in many cases, and it
does. By 'fail' I mean the reconstructed topology is not exactly the same
as the original.
A better solution for this purpose would probably be to store one or more
computed polyhedrons to a file (assuming one takes an approach native to
OpenSCAD). The idea would be to allow such polyhedron files to be
re-imported as an alternative to STL. It would guarantee that the imported
object is the same as the exported object, it would be more compact since
each vertex is mentioned only once, and it would be faster to process
because no vertex matching would have to be done. You could think of it as
ready made 'parts' files that needs to be imported into openscad as in the
original mouthpiece example, just using a different format for intermediate
storage.
If you don't want to introduce another format for this purpose, perhaps
AMF could serve the same purpose, although the present (2015.03-2)
implementation of AMF export does not seem to separate between independent
bodies. I just tested it with a model containing several bodies and they
were written to AMF as a single <object>. For AMF to work as intermediate
format the way I described, each <object> on AMF would have to be a valid
polyhedron. AMF is an XML format so you could perhaps add a property to the
object type to indicate it is indeed a polyhedron:
<object id="0" type="polyhedron">
Just my thoughts.
Carsten Arnholm
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
However deficient STL is, it is still possible to use it to represent 2
manifold meshes unambiguously, although it is very easy to make broken
ones. It is safe to compare vertex values as long as it has been written
correctly. I.e. topologically distinct vertices must have different
numerical values in the file representation and all vertices that are
equivalent must have exactly the same file representation.
The only reasons OpenScad can't import some of its own STLs and a lot of
perfectly good ones from other systems too is because it reduces the
precision of vertices without correcting the topological consequences. I
don't think AMF will help in this respect. You can't simply truncate from
higher precision to float or snap vertices to a grid without running the
risk of corrupting the topology.
On 27 January 2016 at 15:11, Carsten Arnholm <arnholm@arnholm.org> wrote:
> On 27. jan. 2016 14:23, nop head wrote:
>
>> It is a sad fact that OpenScad can't import a lot of the STLs it makes
>> itself. I think it re-quantises vertices and they collapse. It also
>> doesn't detect invalid meshes until you do a CGAL operation on them.
>>
>
> Regardless of how OpenSCAD treats the STL files on import (it probably
> could be improved), it shows that STL is the wrong format for intermediate
> storage of parts when the intention is re-import for assembly.
>
> Why is it the wrong format? Because STL files do not contain any topology
> at all, so when you import the STL for further use in boolean operations,
> the topology must be guessed and reconstructed using unsafe coordinate
> comparisons. It is inefficient and bound to fail in many cases, and it
> does. By 'fail' I mean the reconstructed topology is not exactly the same
> as the original.
>
> A better solution for this purpose would probably be to store one or more
> computed polyhedrons to a file (assuming one takes an approach native to
> OpenSCAD). The idea would be to allow such polyhedron files to be
> re-imported as an alternative to STL. It would guarantee that the imported
> object is the same as the exported object, it would be more compact since
> each vertex is mentioned only once, and it would be faster to process
> because no vertex matching would have to be done. You could think of it as
> ready made 'parts' files that needs to be imported into openscad as in the
> original mouthpiece example, just using a different format for intermediate
> storage.
>
> If you don't want to introduce another format for this purpose, perhaps
> AMF could serve the same purpose, although the present (2015.03-2)
> implementation of AMF export does not seem to separate between independent
> bodies. I just tested it with a model containing several bodies and they
> were written to AMF as a single <object>. For AMF to work as intermediate
> format the way I described, each <object> on AMF would have to be a valid
> polyhedron. AMF is an XML format so you could perhaps add a property to the
> object type to indicate it is indeed a polyhedron:
> <object id="0" type="polyhedron">
>
> Just my thoughts.
>
> Carsten Arnholm
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
MK
Marius Kintel
Wed, Jan 27, 2016 3:54 PM
On Jan 27, 2016, at 10:34 AM, nop head nop.head@gmail.com wrote:
The only reasons OpenScad can't import some of its own STLs and a lot of perfectly good ones from other systems too is because it reduces the precision of vertices without correcting the topological consequences.
In addition: Zero area triangles is a perfectly valid in a manifold topology, but CGAL cannot handle that since it computes normal vectors in isolation and zero area gives no useful normal vector.
-Marius
> On Jan 27, 2016, at 10:34 AM, nop head <nop.head@gmail.com> wrote:
>
> The only reasons OpenScad can't import some of its own STLs and a lot of perfectly good ones from other systems too is because it reduces the precision of vertices without correcting the topological consequences.
In addition: Zero area triangles is a perfectly valid in a manifold topology, but CGAL cannot handle that since it computes normal vectors in isolation and zero area gives no useful normal vector.
-Marius
CA
Carsten Arnholm
Wed, Jan 27, 2016 4:00 PM
On 27. jan. 2016 16:34, nop head wrote:
However deficient STL is, it is still possible to use it to represent 2
manifold meshes unambiguously, although it is very easy to make broken
ones. It is safe to compare vertex values as long as it has been written
correctly. I.e. topologically distinct vertices must have different
numerical values in the file representation and all vertices that are
equivalent must have exactly the same file representation.
The only reasons OpenScad can't import some of its own STLs and a lot of
perfectly good ones from other systems too is because it reduces the
precision of vertices without correcting the topological consequences. I
don't think AMF will help in this respect. You can't simply truncate
from higher precision to float or snap vertices to a grid without
running the risk of corrupting the topology.
It appears I didn't manage to communicate properly. I have been doing
similar stuff in other areas and my experience is that a coordinate
based approach will often fail in preserving the original topology.
Maybe you are unlucky and end up with a valid topology describing
something different than the original intent, or alternatively it
becomes invalid. Wrong in both cases.
Yes, topologically distinct vertices must have different numerical
values when using STL. But since vertices are repeated you don't have
any guarantee that what should be one and the same vertex ends up with
numerically identical values in all repetitions. There could be many
reasons for this and you have to apply some tolerance on import,
creating its own set of issues.
Another thing is that there is no guarantee that an STL file even had a
valid topology in the first place, i.e. face corners ending between
vertices of another face. Or you might end up in that situation because
the wrong tolerance approach was applied.
My point is that this is really impossible to get right in all cases and
the solution is not to try, because there are simple and safe
alternatives which store the topology. AMF was just a suggestion since
it already exists in OpenSCAD, a native polyhedron format would perhaps
be better for openscad.
No, coordinate precision is irrelevant wrt. restoring the topology when
you represent the vertices separately as in AMF and other formats. The
topology is explicitly stated separately from the vertices and no
guessing/interpretation is required.
Carsten Arnholm
http://arnholm.org/
On 27. jan. 2016 16:34, nop head wrote:
> However deficient STL is, it is still possible to use it to represent 2
> manifold meshes unambiguously, although it is very easy to make broken
> ones. It is safe to compare vertex values as long as it has been written
> correctly. I.e. topologically distinct vertices must have different
> numerical values in the file representation and all vertices that are
> equivalent must have exactly the same file representation.
>
> The only reasons OpenScad can't import some of its own STLs and a lot of
> perfectly good ones from other systems too is because it reduces the
> precision of vertices without correcting the topological consequences. I
> don't think AMF will help in this respect. You can't simply truncate
> from higher precision to float or snap vertices to a grid without
> running the risk of corrupting the topology.
It appears I didn't manage to communicate properly. I have been doing
similar stuff in other areas and my experience is that a coordinate
based approach will often fail in preserving the original topology.
Maybe you are unlucky and end up with a valid topology describing
something different than the original intent, or alternatively it
becomes invalid. Wrong in both cases.
Yes, topologically distinct vertices must have different numerical
values when using STL. But since vertices are repeated you don't have
any guarantee that what should be one and the same vertex ends up with
numerically identical values in all repetitions. There could be many
reasons for this and you have to apply some tolerance on import,
creating its own set of issues.
Another thing is that there is no guarantee that an STL file even had a
valid topology in the first place, i.e. face corners ending between
vertices of another face. Or you might end up in that situation because
the wrong tolerance approach was applied.
My point is that this is really impossible to get right in all cases and
the solution is not to try, because there are simple and safe
alternatives which store the topology. AMF was just a suggestion since
it already exists in OpenSCAD, a native polyhedron format would perhaps
be better for openscad.
No, coordinate precision is irrelevant wrt. restoring the topology when
you represent the vertices separately as in AMF and other formats. The
topology is explicitly stated separately from the vertices and no
guessing/interpretation is required.
Carsten Arnholm
http://arnholm.org/
NH
nop head
Wed, Jan 27, 2016 4:12 PM
Yes they are still manifold but they cause other programs problems for the
same reason so should be removed.
On 27 January 2016 at 15:54, Marius Kintel marius@kintel.net wrote:
On Jan 27, 2016, at 10:34 AM, nop head nop.head@gmail.com wrote:
The only reasons OpenScad can't import some of its own STLs and a lot of
Yes they are still manifold but they cause other programs problems for the
same reason so should be removed.
On 27 January 2016 at 15:54, Marius Kintel <marius@kintel.net> wrote:
> > On Jan 27, 2016, at 10:34 AM, nop head <nop.head@gmail.com> wrote:
> >
> > The only reasons OpenScad can't import some of its own STLs and a lot of
> perfectly good ones from other systems too is because it reduces the
> precision of vertices without correcting the topological consequences.
>
> In addition: Zero area triangles is a perfectly valid in a manifold
> topology, but CGAL cannot handle that since it computes normal vectors in
> isolation and zero area gives no useful normal vector.
>
> -Marius
>
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
NH
nop head
Wed, Jan 27, 2016 4:18 PM
Yes, topologically distinct vertices must have different numerical values
when using STL. But since vertices are repeated you don't have any
guarantee that what should be one and the same vertex ends up with
numerically identical values in all repetitions.
At the time OpenScad writes the STL it knows the topology, so there is no
reason why it can't write every repetition of a vertex with an identical
numerical value and ensure all non identical values are distinct.
Yes you can't guaranteed an STL from another program is valid but can
guarantee to write valid ones and be able to read ones that are valid.
> Yes, topologically distinct vertices must have different numerical values
> when using STL. But since vertices are repeated you don't have any
> guarantee that what should be one and the same vertex ends up with
> numerically identical values in all repetitions.
At the time OpenScad writes the STL it knows the topology, so there is no
reason why it can't write every repetition of a vertex with an identical
numerical value and ensure all non identical values are distinct.
Yes you can't guaranteed an STL from another program is valid but can
guarantee to write valid ones and be able to read ones that are valid.
CA
Carsten Arnholm
Wed, Jan 27, 2016 4:23 PM
On 27. jan. 2016 17:18, nop head wrote:
Yes you can't guaranteed an STL from another program is valid but can
guarantee to write valid ones and be able to read ones that are valid.
From what I said before it is clear this is not a sufficient requirement.
Anyway, I just shared some thoughts, you are of course free to ignore them.
Carsten Arnholm
http://arnholm.org
On 27. jan. 2016 17:18, nop head wrote:
> Yes you can't guaranteed an STL from another program is valid but can
> guarantee to write valid ones and be able to read ones that are valid.
From what I said before it is clear this is not a sufficient requirement.
Anyway, I just shared some thoughts, you are of course free to ignore them.
Carsten Arnholm
http://arnholm.org
JJ
Johan Jonker
Wed, Jan 27, 2016 4:37 PM
thanks for discussing my problem.
It is still not solved. I get the idea that I am doing things that openscad
is not suitable for?
Mayby good to explain what I am doing.
http://forum.openscad.org/file/n15940/mp.jpg
The picture shows the mouthpiece outside.
The mouthpiece is build in the following parts:
- the tenon, the cylindrical part, in the pictures shown on the top
-
- this is simply made by a stack of cylinders
- the body, this is a cylinder for tenon to top of which the diameter is a
complex function. So I made this using Nspline and sweep functions. This has
to be quite accurate, so I use 40 steps for the Nspline and 120 for the
circles.
-- the flat part on the left picture is called the table. The last part of
it is curved.
I made several version of this one. The previous one was a separte object
that I subtracted from the body.
-- the curve top on the right pciture is called the beak.
I made it from two cylinders that are substracted using the difference
functions. Then rotated and then with the difference function cut from the
body.
It works using F5 but takes quite long when I increase the accuracy.
It often refused to render using F6 giving all the known fault codes.
I can use correction using Meshlab but they don't work always.
So the question is: is Openscad the right tool to design this?
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15940.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
thanks for discussing my problem.
It is still not solved. I get the idea that I am doing things that openscad
is not suitable for?
Mayby good to explain what I am doing.
<http://forum.openscad.org/file/n15940/mp.jpg>
The picture shows the mouthpiece outside.
The mouthpiece is build in the following parts:
- the tenon, the cylindrical part, in the pictures shown on the top
- - this is simply made by a stack of cylinders
- the body, this is a cylinder for tenon to top of which the diameter is a
complex function. So I made this using Nspline and sweep functions. This has
to be quite accurate, so I use 40 steps for the Nspline and 120 for the
circles.
-- the flat part on the left picture is called the table. The last part of
it is curved.
I made several version of this one. The previous one was a separte object
that I subtracted from the body.
-- the curve top on the right pciture is called the beak.
I made it from two cylinders that are substracted using the difference
functions. Then rotated and then with the difference function cut from the
body.
It works using F5 but takes quite long when I increase the accuracy.
It often refused to render using F6 giving all the known fault codes.
I can use correction using Meshlab but they don't work always.
So the question is: is Openscad the right tool to design this?
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15940.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
J
jon
Wed, Jan 27, 2016 4:48 PM
Have you considered creating these 3 parts as a single OpenSCAD
operation, rather than as 3 separate ones? Is the issue that they each
take a long time to calculate, so you are trying to pre-compute some of
them to save time? Perhaps we can help you optimize some of the code so
that re-calculating each one is more tolerable.
Jon
On 1/27/2016 11:37 AM, Johan Jonker wrote:
thanks for discussing my problem.
It is still not solved. I get the idea that I am doing things that openscad
is not suitable for?
Mayby good to explain what I am doing.
http://forum.openscad.org/file/n15940/mp.jpg
The picture shows the mouthpiece outside.
The mouthpiece is build in the following parts:
- the tenon, the cylindrical part, in the pictures shown on the top
-
- this is simply made by a stack of cylinders
- the body, this is a cylinder for tenon to top of which the diameter is a
complex function. So I made this using Nspline and sweep functions. This has
to be quite accurate, so I use 40 steps for the Nspline and 120 for the
circles.
-- the flat part on the left picture is called the table. The last part of
it is curved.
I made several version of this one. The previous one was a separte object
that I subtracted from the body.
-- the curve top on the right pciture is called the beak.
I made it from two cylinders that are substracted using the difference
functions. Then rotated and then with the difference function cut from the
body.
It works using F5 but takes quite long when I increase the accuracy.
It often refused to render using F6 giving all the known fault codes.
I can use correction using Meshlab but they don't work always.
So the question is: is Openscad the right tool to design this?
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15940.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7357 / Virus Database: 4522/11495 - Release Date: 01/27/16
Have you considered creating these 3 parts as a single OpenSCAD
operation, rather than as 3 separate ones? Is the issue that they each
take a long time to calculate, so you are trying to pre-compute some of
them to save time? Perhaps we can help you optimize some of the code so
that re-calculating each one is more tolerable.
Jon
On 1/27/2016 11:37 AM, Johan Jonker wrote:
> thanks for discussing my problem.
> It is still not solved. I get the idea that I am doing things that openscad
> is not suitable for?
>
> Mayby good to explain what I am doing.
> <http://forum.openscad.org/file/n15940/mp.jpg>
>
> The picture shows the mouthpiece outside.
> The mouthpiece is build in the following parts:
> - the tenon, the cylindrical part, in the pictures shown on the top
> - - this is simply made by a stack of cylinders
> - the body, this is a cylinder for tenon to top of which the diameter is a
> complex function. So I made this using Nspline and sweep functions. This has
> to be quite accurate, so I use 40 steps for the Nspline and 120 for the
> circles.
> -- the flat part on the left picture is called the table. The last part of
> it is curved.
> I made several version of this one. The previous one was a separte object
> that I subtracted from the body.
> -- the curve top on the right pciture is called the beak.
> I made it from two cylinders that are substracted using the difference
> functions. Then rotated and then with the difference function cut from the
> body.
>
> It works using F5 but takes quite long when I increase the accuracy.
> It often refused to render using F6 giving all the known fault codes.
> I can use correction using Meshlab but they don't work always.
>
> So the question is: is Openscad the right tool to design this?
>
>
>
> --
> View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15940.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2016.0.7357 / Virus Database: 4522/11495 - Release Date: 01/27/16
>
>
NH
nop head
Wed, Jan 27, 2016 4:56 PM
It isn't a good tool for reading STL files. If you create all the geometry
in OpenScad and then write an STL it should be fine.
On 27 January 2016 at 16:37, Johan Jonker johangjonker@zonnet.nl wrote:
thanks for discussing my problem.
It is still not solved. I get the idea that I am doing things that openscad
is not suitable for?
Mayby good to explain what I am doing.
http://forum.openscad.org/file/n15940/mp.jpg
The picture shows the mouthpiece outside.
The mouthpiece is build in the following parts:
- the tenon, the cylindrical part, in the pictures shown on the top
-
- this is simply made by a stack of cylinders
- the body, this is a cylinder for tenon to top of which the diameter is a
complex function. So I made this using Nspline and sweep functions. This
has
to be quite accurate, so I use 40 steps for the Nspline and 120 for the
circles.
-- the flat part on the left picture is called the table. The last part of
it is curved.
I made several version of this one. The previous one was a separte object
that I subtracted from the body.
-- the curve top on the right pciture is called the beak.
I made it from two cylinders that are substracted using the difference
functions. Then rotated and then with the difference function cut from the
body.
It works using F5 but takes quite long when I increase the accuracy.
It often refused to render using F6 giving all the known fault codes.
I can use correction using Meshlab but they don't work always.
So the question is: is Openscad the right tool to design this?
--
View this message in context:
http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15940.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
It isn't a good tool for reading STL files. If you create all the geometry
in OpenScad and then write an STL it should be fine.
On 27 January 2016 at 16:37, Johan Jonker <johangjonker@zonnet.nl> wrote:
> thanks for discussing my problem.
> It is still not solved. I get the idea that I am doing things that openscad
> is not suitable for?
>
> Mayby good to explain what I am doing.
> <http://forum.openscad.org/file/n15940/mp.jpg>
>
> The picture shows the mouthpiece outside.
> The mouthpiece is build in the following parts:
> - the tenon, the cylindrical part, in the pictures shown on the top
> - - this is simply made by a stack of cylinders
> - the body, this is a cylinder for tenon to top of which the diameter is a
> complex function. So I made this using Nspline and sweep functions. This
> has
> to be quite accurate, so I use 40 steps for the Nspline and 120 for the
> circles.
> -- the flat part on the left picture is called the table. The last part of
> it is curved.
> I made several version of this one. The previous one was a separte object
> that I subtracted from the body.
> -- the curve top on the right pciture is called the beak.
> I made it from two cylinders that are substracted using the difference
> functions. Then rotated and then with the difference function cut from the
> body.
>
> It works using F5 but takes quite long when I increase the accuracy.
> It often refused to render using F6 giving all the known fault codes.
> I can use correction using Meshlab but they don't work always.
>
> So the question is: is Openscad the right tool to design this?
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15940.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
MK
Marius Kintel
Wed, Jan 27, 2016 5:02 PM
I agree with this.
Also, we’ll eventually get this fixed, so the future will be brighter :)
-Marius
On Jan 27, 2016, at 11:56 AM, nop head nop.head@gmail.com wrote:
It isn't a good tool for reading STL files. If you create all the geometry in OpenScad and then write an STL it should be fine.
I agree with this.
Also, we’ll eventually get this fixed, so the future will be brighter :)
-Marius
> On Jan 27, 2016, at 11:56 AM, nop head <nop.head@gmail.com> wrote:
>
> It isn't a good tool for reading STL files. If you create all the geometry in OpenScad and then write an STL it should be fine.
>
JJ
Johan Jonker
Wed, Jan 27, 2016 5:51 PM
I tried to do the outside in one STL. But that results in errors.
It would be great when you can help me. But it is quite complex.
Here are the main files. I suppose the libraries are known.
mp_parameters.scad
http://forum.openscad.org/file/n15945/mp_parameters.scad
mouthpiece_outside_v11.scad
http://forum.openscad.org/file/n15945/mouthpiece_outside_v11.scad
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15945.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
I tried to do the outside in one STL. But that results in errors.
It would be great when you can help me. But it is quite complex.
Here are the main files. I suppose the libraries are known.
mp_parameters.scad
<http://forum.openscad.org/file/n15945/mp_parameters.scad>
mouthpiece_outside_v11.scad
<http://forum.openscad.org/file/n15945/mouthpiece_outside_v11.scad>
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15945.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
JJ
Johan Jonker
Wed, Jan 27, 2016 7:26 PM
In the program I tried to reduce calculation time by making the shapes that
are subtracted from the main body as small as possible. In an earlier
version the beak shape were two cylinders and I modified that into on
quarter of these. That appears to be a more complex function.
I put it back to the cylindrical version again. Now this part renders with
F6 and $fn=80.
http://forum.openscad.org/file/n15946/mp.jpg
Now I'll try to add the inside in the same scad.
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15946.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
In the program I tried to reduce calculation time by making the shapes that
are subtracted from the main body as small as possible. In an earlier
version the beak shape were two cylinders and I modified that into on
quarter of these. That appears to be a more complex function.
I put it back to the cylindrical version again. Now this part renders with
F6 and $fn=80.
<http://forum.openscad.org/file/n15946/mp.jpg>
Now I'll try to add the inside in the same scad.
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15946.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
RW
Rob Ward
Wed, Jan 27, 2016 8:00 PM
Isn't this a very good argument for the idea of an openSCAD format cache of objects, and the ability to programatically load/save individuals shapes from a list of shapes? These two concepts have been discussed at length in other threads and deserve consideration as a valuable in house feature if not of universal use to the 3-D community as a whole? Or have I oversimplified it all?
On 28 January 2016 2:11:21 AM AEDT, Carsten Arnholm arnholm@arnholm.org wrote:
On 27. jan. 2016 14:23, nop head wrote:
It is a sad fact that OpenScad can't import a lot of the STLs it
itself. I think it re-quantises vertices and they collapse. It also
doesn't detect invalid meshes until you do a CGAL operation on them.
Regardless of how OpenSCAD treats the STL files on import (it probably
could be improved), it shows that STL is the wrong format for
intermediate storage of parts when the intention is re-import for
assembly.
Why is it the wrong format? Because STL files do not contain any
topology at all, so when you import the STL for further use in boolean
operations, the topology must be guessed and reconstructed using unsafe
coordinate comparisons. It is inefficient and bound to fail in many
cases, and it does. By 'fail' I mean the reconstructed topology is not
exactly the same as the original.
A better solution for this purpose would probably be to store one or
more computed polyhedrons to a file (assuming one takes an approach
native to OpenSCAD). The idea would be to allow such polyhedron files
to
be re-imported as an alternative to STL. It would guarantee that the
imported object is the same as the exported object, it would be more
compact since each vertex is mentioned only once, and it would be
faster
to process because no vertex matching would have to be done. You could
think of it as ready made 'parts' files that needs to be imported into
openscad as in the original mouthpiece example, just using a different
format for intermediate storage.
If you don't want to introduce another format for this purpose, perhaps
AMF could serve the same purpose, although the present (2015.03-2)
implementation of AMF export does not seem to separate between
independent bodies. I just tested it with a model containing several
bodies and they were written to AMF as a single <object>. For AMF to
work as intermediate format the way I described, each <object> on AMF
would have to be a valid polyhedron. AMF is an XML format so you could
perhaps add a property to the object type to indicate it is indeed a
polyhedron:
<object id="0" type="polyhedron">
Just my thoughts.
Carsten Arnholm
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Isn't this a very good argument for the idea of an openSCAD format cache of objects, and the ability to programatically load/save individuals shapes from a list of shapes? These two concepts have been discussed at length in other threads and deserve consideration as a valuable in house feature if not of universal use to the 3-D community as a whole? Or have I oversimplified it all?
On 28 January 2016 2:11:21 AM AEDT, Carsten Arnholm <arnholm@arnholm.org> wrote:
>On 27. jan. 2016 14:23, nop head wrote:
>> It is a sad fact that OpenScad can't import a lot of the STLs it
>makes
>> itself. I think it re-quantises vertices and they collapse. It also
>> doesn't detect invalid meshes until you do a CGAL operation on them.
>
>Regardless of how OpenSCAD treats the STL files on import (it probably
>could be improved), it shows that STL is the wrong format for
>intermediate storage of parts when the intention is re-import for
>assembly.
>
>Why is it the wrong format? Because STL files do not contain any
>topology at all, so when you import the STL for further use in boolean
>operations, the topology must be guessed and reconstructed using unsafe
>
>coordinate comparisons. It is inefficient and bound to fail in many
>cases, and it does. By 'fail' I mean the reconstructed topology is not
>exactly the same as the original.
>
>A better solution for this purpose would probably be to store one or
>more computed polyhedrons to a file (assuming one takes an approach
>native to OpenSCAD). The idea would be to allow such polyhedron files
>to
>be re-imported as an alternative to STL. It would guarantee that the
>imported object is the same as the exported object, it would be more
>compact since each vertex is mentioned only once, and it would be
>faster
>to process because no vertex matching would have to be done. You could
>think of it as ready made 'parts' files that needs to be imported into
>openscad as in the original mouthpiece example, just using a different
>format for intermediate storage.
>
>If you don't want to introduce another format for this purpose, perhaps
>
>AMF could serve the same purpose, although the present (2015.03-2)
>implementation of AMF export does not seem to separate between
>independent bodies. I just tested it with a model containing several
>bodies and they were written to AMF as a single <object>. For AMF to
>work as intermediate format the way I described, each <object> on AMF
>would have to be a valid polyhedron. AMF is an XML format so you could
>perhaps add a property to the object type to indicate it is indeed a
>polyhedron:
><object id="0" type="polyhedron">
>
>Just my thoughts.
>
>Carsten Arnholm
>
>
>
>
>
>
>
>
>
>
>
>
>_______________________________________________
>OpenSCAD mailing list
>Discuss@lists.openscad.org
>http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
JJ
Johan Jonker
Wed, Jan 27, 2016 8:05 PM
Yes, rendered with f6 and $fn=120 in 3 minutes.
Thanks for helping me out.
Conclusion: better a simple structure than a smalll structure?
http://forum.openscad.org/file/n15949/mp.png
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15949.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Yes, rendered with f6 and $fn=120 in 3 minutes.
Thanks for helping me out.
Conclusion: better a simple structure than a smalll structure?
<http://forum.openscad.org/file/n15949/mp.png>
--
View this message in context: http://forum.openscad.org/CGAL-errors-when-combining-two-correct-STL-s-tp15909p15949.html
Sent from the OpenSCAD mailing list archive at Nabble.com.