discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] restrict hull function to one or two dimensions

R
Ronaldo
Wed, Apr 6, 2016 5:01 PM
You will need also https://github.com/OskarLinde/scad-utils <https://github.com/OskarLinde/scad-utils> -- View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p16986.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
rav0r
Wed, Apr 6, 2016 5:08 PM

That is easier said than done, but the frame has an irregular shape. I could,
of course use this module http://www.thingiverse.com/thing:210099 for the
extrusion but I need all the grid's elements to have a specific bevel and 3D
orientation. I guess the whole job is harder than I thought, though, for a
core 2 duo cpu. Probably an i7 would do just fine.

--
View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p16987.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

That is easier said than done, but the frame has an irregular shape. I could, of course use this module http://www.thingiverse.com/thing:210099 for the extrusion but I need all the grid's elements to have a specific bevel and 3D orientation. I guess the whole job is harder than I thought, though, for a core 2 duo cpu. Probably an i7 would do just fine. -- View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p16987.html Sent from the OpenSCAD mailing list archive at Nabble.com.
RP
Ronaldo Persiano
Wed, Apr 6, 2016 5:52 PM

Do you have an image of the frame?

2016-04-06 14:08 GMT-03:00 rav0r coltoiu.matei@gmail.com:

That is easier said than done, but the frame has an irregular shape. I
could,
of course use this module http://www.thingiverse.com/thing:210099 for the
extrusion but I need all the grid's elements to have a specific bevel and
3D
orientation. I guess the whole job is harder than I thought, though, for a
core 2 duo cpu. Probably an i7 would do just fine.

--
View this message in context:
http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p16987.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

Do you have an image of the frame? 2016-04-06 14:08 GMT-03:00 rav0r <coltoiu.matei@gmail.com>: > That is easier said than done, but the frame has an irregular shape. I > could, > of course use this module http://www.thingiverse.com/thing:210099 for the > extrusion but I need all the grid's elements to have a specific bevel and > 3D > orientation. I guess the whole job is harder than I thought, though, for a > core 2 duo cpu. Probably an i7 would do just fine. > > > > -- > View this message in context: > http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p16987.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 >
R
rav0r
Sat, Apr 9, 2016 2:12 PM

Rendering Polygon Mesh using CGAL...
WARNING: CGAL Evaluator: Root node didn't fit into cache
PolySets in cache: 9
PolySet cache size in bytes: 221448
CGAL Polyhedrons in cache: 597
CGAL cache size in bytes: 104854928
Top level object is a 3D object:
Simple:        yes
Vertices:  175957
Halfedges:  529502
Edges:      264751
Halffacets: 191240
Facets:      95620
Volumes:      3420
Total rendering time: 20 hours, 48 minutes, 39 seconds
Rendering finished.

In reality, it took 3 times that much as it says.
http://forum.openscad.org/file/n17004/scad.jpg

--
View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17004.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Rendering Polygon Mesh using CGAL... WARNING: CGAL Evaluator: Root node didn't fit into cache PolySets in cache: 9 PolySet cache size in bytes: 221448 CGAL Polyhedrons in cache: 597 CGAL cache size in bytes: 104854928 Top level object is a 3D object: Simple: yes Vertices: 175957 Halfedges: 529502 Edges: 264751 Halffacets: 191240 Facets: 95620 Volumes: 3420 Total rendering time: 20 hours, 48 minutes, 39 seconds Rendering finished. In reality, it took 3 times that much as it says. <http://forum.openscad.org/file/n17004/scad.jpg> -- View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17004.html Sent from the OpenSCAD mailing list archive at Nabble.com.
RP
Ronaldo Persiano
Sat, Apr 9, 2016 2:53 PM

Well, it is a lot of rendering time indeed for an object so simple. And
because of its simplicity, the slicing approach doesn't seem to be the
best. Do you need a so fine slicing? You have more than 1000 slices!

What OpenSCAD version are you using? "Let" was not recognized by your
version!
I am sure you would have a huge benefit from using sweep. But certainly it
would not work with older versions like yours. You will need the last
official version.
Would you share the code of your grid frame?

2016-04-09 11:12 GMT-03:00 rav0r coltoiu.matei@gmail.com:

Rendering Polygon Mesh using CGAL...
WARNING: CGAL Evaluator: Root node didn't fit into cache
PolySets in cache: 9
PolySet cache size in bytes: 221448
CGAL Polyhedrons in cache: 597
CGAL cache size in bytes: 104854928
Top level object is a 3D object:
Simple:        yes
Vertices:  175957
Halfedges:  529502
Edges:      264751
Halffacets: 191240
Facets:      95620
Volumes:      3420
Total rendering time: 20 hours, 48 minutes, 39 seconds
Rendering finished.

In reality, it took 3 times that much as it says.
http://forum.openscad.org/file/n17004/scad.jpg

--
View this message in context:
http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17004.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

Well, it is a lot of rendering time indeed for an object so simple. And because of its simplicity, the slicing approach doesn't seem to be the best. Do you need a so fine slicing? You have more than 1000 slices! What OpenSCAD version are you using? "Let" was not recognized by your version! I am sure you would have a huge benefit from using sweep. But certainly it would not work with older versions like yours. You will need the last official version. Would you share the code of your grid frame? 2016-04-09 11:12 GMT-03:00 rav0r <coltoiu.matei@gmail.com>: > Rendering Polygon Mesh using CGAL... > WARNING: CGAL Evaluator: Root node didn't fit into cache > PolySets in cache: 9 > PolySet cache size in bytes: 221448 > CGAL Polyhedrons in cache: 597 > CGAL cache size in bytes: 104854928 > Top level object is a 3D object: > Simple: yes > Vertices: 175957 > Halfedges: 529502 > Edges: 264751 > Halffacets: 191240 > Facets: 95620 > Volumes: 3420 > Total rendering time: 20 hours, 48 minutes, 39 seconds > Rendering finished. > > In reality, it took 3 times that much as it says. > <http://forum.openscad.org/file/n17004/scad.jpg> > > > > -- > View this message in context: > http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17004.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 >
R
rav0r
Sat, Apr 9, 2016 9:38 PM

//bevel

use <bevel_extrude.scad>

module grila() {
union() {
//grid
translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_pct.dxf");
}

//horizontal
translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_1.dxf");
}

translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_2.dxf");
}

translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_3.dxf");
}

translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_4.dxf");
}

translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_5.dxf");
}

//vertical
translate ([0,0,0]){
linear_extrude(height=3)
import("rama_vert.dxf");
}
}
}

grila();

--
View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17014.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

//bevel use <bevel_extrude.scad> module grila() { union() { //grid translate ([0,0,0]){ bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_pct.dxf"); } //horizontal translate ([0,0,0]){ bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_1.dxf"); } translate ([0,0,0]){ bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_2.dxf"); } translate ([0,0,0]){ bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_3.dxf"); } translate ([0,0,0]){ bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_4.dxf"); } translate ([0,0,0]){ bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_5.dxf"); } //vertical translate ([0,0,0]){ linear_extrude(height=3) import("rama_vert.dxf"); } } } grila(); -- View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17014.html Sent from the OpenSCAD mailing list archive at Nabble.com.
RP
Ronaldo Persiano
Sat, Apr 9, 2016 10:30 PM

I can't reproduce your model without the dxf files.
Do you have images of your them?

2016-04-09 18:38 GMT-03:00 rav0r coltoiu.matei@gmail.com:

//bevel

use <bevel_extrude.scad>

module grila() {
union() {
//grid
translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_pct.dxf");
}

//horizontal
translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_1.dxf");
}

translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_2.dxf");
}

translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_3.dxf");
}

translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_4.dxf");
}

translate ([0,0,0]){
bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_5.dxf");
}

//vertical
translate ([0,0,0]){
linear_extrude(height=3)
import("rama_vert.dxf");
}
}
}

grila();

--
View this message in context:
http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17014.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

I can't reproduce your model without the dxf files. Do you have images of your them? 2016-04-09 18:38 GMT-03:00 rav0r <coltoiu.matei@gmail.com>: > //bevel > > use <bevel_extrude.scad> > > > > > module grila() { > union() { > //grid > translate ([0,0,0]){ > bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_pct.dxf"); > } > > //horizontal > translate ([0,0,0]){ > bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_1.dxf"); > } > > translate ([0,0,0]){ > bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_2.dxf"); > } > > translate ([0,0,0]){ > bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_3.dxf"); > } > > translate ([0,0,0]){ > bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_4.dxf"); > } > > translate ([0,0,0]){ > bevel_extrude(height=10,bevel_depth=6,$fn=16)import("rama_oriz_5.dxf"); > } > > //vertical > translate ([0,0,0]){ > linear_extrude(height=3) > import("rama_vert.dxf"); > } > } > } > > grila(); > > > > -- > View this message in context: > http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17014.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 >
R
rav0r
Wed, Apr 13, 2016 6:47 PM
https://drive.google.com/open?id=0BxF2sz0RGuRSejlvanZWNS1tTUk <https://drive.google.com/open?id=0BxF2sz0RGuRSejlvanZWNS1tTUk> -- View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17111.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
Ronaldo
Thu, Apr 14, 2016 6:24 PM

Thank you for that. I agree that my suggestion of using sweep is hard, if not
impossible, to implement if your sections come from dxf files like this one.
To adopt sweep you will need the 2D shapes expressed as a list of points and
there is no way in the language, and this is an unfortunate missing feature
of OpenSCAD, to access the points of dxf files.

If you are able to generate the list of points of your dxf files I am sure
you would have a huge time gain by using sweep to get your intent. The
chamfer in the bars would not be an obstacle to the sweep approach.

--
View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17120.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Thank you for that. I agree that my suggestion of using sweep is hard, if not impossible, to implement if your sections come from dxf files like this one. To adopt sweep you will need the 2D shapes expressed as a list of points and there is no way in the language, and this is an unfortunate missing feature of OpenSCAD, to access the points of dxf files. If you are able to generate the list of points of your dxf files I am sure you would have a huge time gain by using sweep to get your intent. The chamfer in the bars would not be an obstacle to the sweep approach. -- View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17120.html Sent from the OpenSCAD mailing list archive at Nabble.com.
N
Neon22
Fri, Apr 15, 2016 12:15 AM

to convert dxf files to polygon lists is easily done in inkscape using this
plugin.

--
View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17121.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

to convert dxf files to polygon lists is easily done in inkscape using this plugin. - http://www.thingiverse.com/thing:1065500 Inside the resulting file are variables conataining the polygon vertices. -- View this message in context: http://forum.openscad.org/restrict-hull-function-to-one-or-two-dimensions-tp16696p17121.html Sent from the OpenSCAD mailing list archive at Nabble.com.