Discussion:
[OpenSCAD] Problems importing STL models
W. Craig Trader
2012-03-21 14:36:23 UTC
Permalink
I've been printing parts for the local RepRap group, and as part of that
I've been using OpenSCAD to setup groups of objects to print together.
Most of the models worked fine, or worked after being pushed through
NetFabb to clean them up, but I still have a couple of models that
individually can be sliced and printed (Skeinforge) but OpenSCAD/CGAL can't
handle importing and manipulating.

I've put all of the models and ancillary files up on GitHub (
https://github.com/wcraigtrader/novareprep-prusa-parts). The specific
problems I'm having are with these parts:

module x_end_motor() {

import( "jason-models/x-end-motor-fixed.stl" );

}


module j_head_and_mg_mount() {

import( "jason-models/J-Head-and-MG-mount-fixed.stl" );

}


A typical error message would be:


Parsing design (AST generation)...

Compiling design (CSG Tree generation)...

Compilation finished.

Rendering Polygon Mesh using CGAL...

PolySetCache hit: cube(size=[105,105,0.25],center=true);

PolySetCache hit: cube(size=[104.5,104.5,0.5],center=true)

CGAL Cache insert: cube(size=[105,105,0.25],center=true); (10872 bytes)

CGAL Cache insert: cube(size=[104.5,104.5,0.5],center=true) (10872 bytes)

CGAL Cache insert: difference(){cube(size=[105,105,0.25],ce (21336 bytes)

PolySetCache hit: import(file="jason-models/x-end-motor-fi

CGAL error in CGAL_Build_PolySet: CGAL ERROR: assertion violation!

Expr: check_protocoll == 0

File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h

Line: 198

CGAL Cache insert: import(file="jason-models/x-end-motor-fi (40 bytes)

CGAL Cache insert: group(){%multmatrix([[1,0,0,0],[0,1,0,0] (40 bytes)

CGAL Cache insert: group(){import(file="jason-models/x-end- (40 bytes)

CGAL Cache insert: group(){group(){%multmatrix([[1,0,0,0],[ (40 bytes)

PolySets in cache: 102

PolySet cache size in bytes: 2085192

CGAL Polyhedrons in cache: 528

CGAL cache size in bytes: 85761720

Total rendering time: 0 hours, 0 minutes, 0 seconds

WARNING: No top level geometry to render


If I'm reading the error correctly, it's happening when the
Polyhedron_incremental_builder_3 is being destroyed.


Thanks for any help you can suggest.


- Craig -
W. Craig Trader
2012-03-21 14:43:42 UTC
Permalink
Another problem that I missed: When I try to export a model that can be
imported by OpenSCAD/CGAL:

module x_carriage() {

import( "jason-models/x-carriage-fixed.stl" );

}


I get this error from the command line:

openscad -m make -o output/x_carriage.stl -d output/x_carriage.stl.deps
x_carriage.scad
Compiling library
'/net/storage/data/archive/parts/novareprep-prusa-parts/layout.scad'.
CGAL Cache insert: import(file="jason-models/x-carriage-fix (3706448 bytes)
CGAL Cache insert: group(){import(file="jason-models/x-carr (3706448 bytes)
CGAL Cache insert: group(){group(){import(file="jason-model (3706448 bytes)
sorry, this triangulation does not deal with
intersecting constraints
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198


If I try to do the export from the OpenSCAD GUI, it crashes the program.

OpenGL Program Link OK:
Vertex shader(s) linked, fragment shader(s) linked.
OpenGL Program Validation results:
Validation successful.
sorry, this triangulation does not deal with
intersecting constraints
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
Aborted
Post by W. Craig Trader
I've been printing parts for the local RepRap group, and as part of that
I've been using OpenSCAD to setup groups of objects to print together.
Most of the models worked fine, or worked after being pushed through
NetFabb to clean them up, but I still have a couple of models that
individually can be sliced and printed (Skeinforge) but OpenSCAD/CGAL can't
handle importing and manipulating.
I've put all of the models and ancillary files up on GitHub (
https://github.com/wcraigtrader/novareprep-prusa-parts). The specific
module x_end_motor() {
import( "jason-models/x-end-motor-fixed.stl" );
}
module j_head_and_mg_mount() {
import( "jason-models/J-Head-and-MG-mount-fixed.stl" );
}
Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compilation finished.
Rendering Polygon Mesh using CGAL...
PolySetCache hit: cube(size=[105,105,0.25],center=true);
PolySetCache hit: cube(size=[104.5,104.5,0.5],center=true)
CGAL Cache insert: cube(size=[105,105,0.25],center=true); (10872 bytes)
CGAL Cache insert: cube(size=[104.5,104.5,0.5],center=true) (10872 bytes)
CGAL Cache insert: difference(){cube(size=[105,105,0.25],ce (21336 bytes)
PolySetCache hit: import(file="jason-models/x-end-motor-fi
CGAL error in CGAL_Build_PolySet: CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
CGAL Cache insert: import(file="jason-models/x-end-motor-fi (40 bytes)
CGAL Cache insert: group(){%multmatrix([[1,0,0,0],[0,1,0,0] (40 bytes)
CGAL Cache insert: group(){import(file="jason-models/x-end- (40 bytes)
CGAL Cache insert: group(){group(){%multmatrix([[1,0,0,0],[ (40 bytes)
PolySets in cache: 102
PolySet cache size in bytes: 2085192
CGAL Polyhedrons in cache: 528
CGAL cache size in bytes: 85761720
Total rendering time: 0 hours, 0 minutes, 0 seconds
WARNING: No top level geometry to render
If I'm reading the error correctly, it's happening when the
Polyhedron_incremental_builder_3 is being destroyed.
Thanks for any help you can suggest.
- Craig -
nop head
2012-03-21 15:14:33 UTC
Permalink
It is a known bug that Openscad cannot import some of its own STLs. You
could try putting them through Netfabb Studio as when it exports STLs it
filters out triangles that it thinks will become degenerate due to
rounding, which seems to be the issue.
Post by W. Craig Trader
Another problem that I missed: When I try to export a model that can be
module x_carriage() {
import( "jason-models/x-carriage-fixed.stl" );
}
openscad -m make -o output/x_carriage.stl -d output/x_carriage.stl.deps
x_carriage.scad
Compiling library
'/net/storage/data/archive/parts/novareprep-prusa-parts/layout.scad'.
CGAL Cache insert: import(file="jason-models/x-carriage-fix (3706448 bytes)
CGAL Cache insert: group(){import(file="jason-models/x-carr (3706448 bytes)
CGAL Cache insert: group(){group(){import(file="jason-model (3706448 bytes)
sorry, this triangulation does not deal with
intersecting constraints
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
If I try to do the export from the OpenSCAD GUI, it crashes the program.
Vertex shader(s) linked, fragment shader(s) linked.
Validation successful.
sorry, this triangulation does not deal with
intersecting constraints
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
Aborted
Post by W. Craig Trader
I've been printing parts for the local RepRap group, and as part of that
I've been using OpenSCAD to setup groups of objects to print together.
Most of the models worked fine, or worked after being pushed through
NetFabb to clean them up, but I still have a couple of models that
individually can be sliced and printed (Skeinforge) but OpenSCAD/CGAL can't
handle importing and manipulating.
I've put all of the models and ancillary files up on GitHub (
https://github.com/wcraigtrader/novareprep-prusa-parts). The specific
module x_end_motor() {
import( "jason-models/x-end-motor-fixed.stl" );
}
module j_head_and_mg_mount() {
import( "jason-models/J-Head-and-MG-mount-fixed.stl" );
}
Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compilation finished.
Rendering Polygon Mesh using CGAL...
PolySetCache hit: cube(size=[105,105,0.25],center=true);
PolySetCache hit: cube(size=[104.5,104.5,0.5],center=true)
CGAL Cache insert: cube(size=[105,105,0.25],center=true); (10872 bytes)
CGAL Cache insert: cube(size=[104.5,104.5,0.5],center=true) (10872 bytes)
CGAL Cache insert: difference(){cube(size=[105,105,0.25],ce (21336 bytes)
PolySetCache hit: import(file="jason-models/x-end-motor-fi
CGAL error in CGAL_Build_PolySet: CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
CGAL Cache insert: import(file="jason-models/x-end-motor-fi (40 bytes)
CGAL Cache insert: group(){%multmatrix([[1,0,0,0],[0,1,0,0] (40 bytes)
CGAL Cache insert: group(){import(file="jason-models/x-end- (40 bytes)
CGAL Cache insert: group(){group(){%multmatrix([[1,0,0,0],[ (40 bytes)
PolySets in cache: 102
PolySet cache size in bytes: 2085192
CGAL Polyhedrons in cache: 528
CGAL cache size in bytes: 85761720
Total rendering time: 0 hours, 0 minutes, 0 seconds
WARNING: No top level geometry to render
If I'm reading the error correctly, it's happening when the
Polyhedron_incremental_builder_3 is being destroyed.
Thanks for any help you can suggest.
- Craig -
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
W. Craig Trader
2012-03-21 15:23:02 UTC
Permalink
I haven't had a chance to play with the free Netfabb software, just the
Netfabb Cloud (which did fix some problems, but not these).

- Craig -
Post by nop head
It is a known bug that Openscad cannot import some of its own STLs. You
could try putting them through Netfabb Studio as when it exports STLs it
filters out triangles that it thinks will become degenerate due to
rounding, which seems to be the issue.
Post by W. Craig Trader
Another problem that I missed: When I try to export a model that can be
module x_carriage() {
import( "jason-models/x-carriage-fixed.stl" );
}
openscad -m make -o output/x_carriage.stl -d output/x_carriage.stl.deps
x_carriage.scad
Compiling library
'/net/storage/data/archive/parts/novareprep-prusa-parts/layout.scad'.
CGAL Cache insert: import(file="jason-models/x-carriage-fix (3706448 bytes)
CGAL Cache insert: group(){import(file="jason-models/x-carr (3706448 bytes)
CGAL Cache insert: group(){group(){import(file="jason-model (3706448 bytes)
sorry, this triangulation does not deal with
intersecting constraints
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
If I try to do the export from the OpenSCAD GUI, it crashes the program.
Vertex shader(s) linked, fragment shader(s) linked.
Validation successful.
sorry, this triangulation does not deal with
intersecting constraints
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
Aborted
Post by W. Craig Trader
I've been printing parts for the local RepRap group, and as part of that
I've been using OpenSCAD to setup groups of objects to print together.
Most of the models worked fine, or worked after being pushed through
NetFabb to clean them up, but I still have a couple of models that
individually can be sliced and printed (Skeinforge) but OpenSCAD/CGAL can't
handle importing and manipulating.
I've put all of the models and ancillary files up on GitHub (
https://github.com/wcraigtrader/novareprep-prusa-parts). The specific
module x_end_motor() {
import( "jason-models/x-end-motor-fixed.stl" );
}
module j_head_and_mg_mount() {
import( "jason-models/J-Head-and-MG-mount-fixed.stl" );
}
Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compilation finished.
Rendering Polygon Mesh using CGAL...
PolySetCache hit: cube(size=[105,105,0.25],center=true);
PolySetCache hit: cube(size=[104.5,104.5,0.5],center=true)
CGAL Cache insert: cube(size=[105,105,0.25],center=true); (10872 bytes)
CGAL Cache insert: cube(size=[104.5,104.5,0.5],center=true) (10872 bytes)
CGAL Cache insert: difference(){cube(size=[105,105,0.25],ce (21336 bytes)
PolySetCache hit: import(file="jason-models/x-end-motor-fi
CGAL error in CGAL_Build_PolySet: CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
CGAL Cache insert: import(file="jason-models/x-end-motor-fi (40 bytes)
CGAL Cache insert: group(){%multmatrix([[1,0,0,0],[0,1,0,0] (40 bytes)
CGAL Cache insert: group(){import(file="jason-models/x-end- (40 bytes)
CGAL Cache insert: group(){group(){%multmatrix([[1,0,0,0],[ (40 bytes)
PolySets in cache: 102
PolySet cache size in bytes: 2085192
CGAL Polyhedrons in cache: 528
CGAL cache size in bytes: 85761720
Total rendering time: 0 hours, 0 minutes, 0 seconds
WARNING: No top level geometry to render
If I'm reading the error correctly, it's happening when the
Polyhedron_incremental_builder_3 is being destroyed.
Thanks for any help you can suggest.
- Craig -
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
W. Craig Trader
2012-03-21 15:35:27 UTC
Permalink
Well, NetFabb Studio was able to clean up this file, but not the other two
(at least, not so far).

- Craig -
Post by W. Craig Trader
I haven't had a chance to play with the free Netfabb software, just the
Netfabb Cloud (which did fix some problems, but not these).
- Craig -
Post by nop head
It is a known bug that Openscad cannot import some of its own STLs. You
could try putting them through Netfabb Studio as when it exports STLs it
filters out triangles that it thinks will become degenerate due to
rounding, which seems to be the issue.
Post by W. Craig Trader
Another problem that I missed: When I try to export a model that can be
module x_carriage() {
import( "jason-models/x-carriage-fixed.stl" );
}
openscad -m make -o output/x_carriage.stl -d output/x_carriage.stl.deps
x_carriage.scad
Compiling library
'/net/storage/data/archive/parts/novareprep-prusa-parts/layout.scad'.
CGAL Cache insert: import(file="jason-models/x-carriage-fix (3706448 bytes)
CGAL Cache insert: group(){import(file="jason-models/x-carr (3706448 bytes)
CGAL Cache insert: group(){group(){import(file="jason-model (3706448 bytes)
sorry, this triangulation does not deal with
intersecting constraints
terminate called after throwing an instance of
'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
If I try to do the export from the OpenSCAD GUI, it crashes the program.
Vertex shader(s) linked, fragment shader(s) linked.
Validation successful.
sorry, this triangulation does not deal with
intersecting constraints
terminate called after throwing an instance of
'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
Aborted
Post by W. Craig Trader
I've been printing parts for the local RepRap group, and as part of
that I've been using OpenSCAD to setup groups of objects to print together.
Most of the models worked fine, or worked after being pushed through
NetFabb to clean them up, but I still have a couple of models that
individually can be sliced and printed (Skeinforge) but OpenSCAD/CGAL can't
handle importing and manipulating.
I've put all of the models and ancillary files up on GitHub (
https://github.com/wcraigtrader/novareprep-prusa-parts). The specific
module x_end_motor() {
import( "jason-models/x-end-motor-fixed.stl" );
}
module j_head_and_mg_mount() {
import( "jason-models/J-Head-and-MG-mount-fixed.stl" );
}
Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compilation finished.
Rendering Polygon Mesh using CGAL...
PolySetCache hit: cube(size=[105,105,0.25],center=true);
PolySetCache hit: cube(size=[104.5,104.5,0.5],center=true)
CGAL Cache insert: cube(size=[105,105,0.25],center=true); (10872 bytes)
CGAL Cache insert: cube(size=[104.5,104.5,0.5],center=true) (10872 bytes)
CGAL Cache insert: difference(){cube(size=[105,105,0.25],ce (21336 bytes)
PolySetCache hit: import(file="jason-models/x-end-motor-fi
CGAL error in CGAL_Build_PolySet: CGAL ERROR: assertion violation!
Expr: check_protocoll == 0
File: /usr/include/CGAL/Polyhedron_incremental_builder_3.h
Line: 198
CGAL Cache insert: import(file="jason-models/x-end-motor-fi (40 bytes)
CGAL Cache insert: group(){%multmatrix([[1,0,0,0],[0,1,0,0] (40 bytes)
CGAL Cache insert: group(){import(file="jason-models/x-end- (40 bytes)
CGAL Cache insert: group(){group(){%multmatrix([[1,0,0,0],[ (40 bytes)
PolySets in cache: 102
PolySet cache size in bytes: 2085192
CGAL Polyhedrons in cache: 528
CGAL cache size in bytes: 85761720
Total rendering time: 0 hours, 0 minutes, 0 seconds
WARNING: No top level geometry to render
If I'm reading the error correctly, it's happening when the
Polyhedron_incremental_builder_3 is being destroyed.
Thanks for any help you can suggest.
- Craig -
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
Marius Kintel
2012-03-21 17:10:17 UTC
Permalink
It is a known bug that Openscad cannot import some of its own STLs. You could try putting them through Netfabb Studio as when it exports STLs it filters out triangles that it thinks will become degenerate due to rounding, which seems to be the issue.
Yes, nop head is correct.

This issue probably encompasses multiple sub issues, but this is probably the one you want to monitor:
https://github.com/openscad/openscad/issues/13

It shouldn't crash though - I'll take a look at that particular issue and make it fail gracefully.

-Marius

Continue reading on narkive:
Loading...