discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] hull command flattens result in 2D - circle vs cube

M
MichaelAtOz
Mon, Apr 17, 2017 11:54 PM

memsfactory wrote

Hi everyone,

this is my first post and i hope the question is not dumb. I cannot figure
out why the hull command with a circle results in a projection in the xy
plane (ie nothing the z direction)?

hull(){
translate([10,10,10]) circle(1);
translate([1,1,1]) circle(1);}

where as this code, creates the solid in the z direction as expected:

hull(){
translate([10,10,10]) cube(1);
translate([1,1,1]) cube(1);}

thanks for the help.

memsfactory

hull() operates in the dimentionality of the child objects.

1st is feeding it 2x 2D objects (no Z) so hull produces a 2D hull.
2nd is feeding 2x 3D objects (incl. z) so hull produces a 3D hull.


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/hull-command-flattens-result-in-2D-circle-vs-cube-tp21271p21272.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

memsfactory wrote > Hi everyone, > > this is my first post and i hope the question is not dumb. I cannot figure > out why the hull command with a circle results in a projection in the xy > plane (ie nothing the z direction)? > > hull(){ > translate([10,10,10]) circle(1); > translate([1,1,1]) circle(1);} > > where as this code, creates the solid in the z direction as expected: > > hull(){ > translate([10,10,10]) cube(1); > translate([1,1,1]) cube(1);} > > > thanks for the help. > > memsfactory hull() operates in the dimentionality of the child objects. 1st is feeding it 2x 2D objects (no Z) so hull produces a 2D hull. 2nd is feeding 2x 3D objects (incl. z) so hull produces a 3D hull. ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/hull-command-flattens-result-in-2D-circle-vs-cube-tp21271p21272.html Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Mon, Apr 17, 2017 11:58 PM

I missed the z you had in the translate in the 1st.
You shouldn't use z with 2D.
I believe z is ignored when rendering with on 2D objects, but preview shows
it.


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/hull-command-flattens-result-in-2D-circle-vs-cube-tp21271p21273.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I missed the z you had in the translate in the 1st. You shouldn't use z with 2D. I believe z is ignored when rendering with on 2D objects, but preview shows it. ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/hull-command-flattens-result-in-2D-circle-vs-cube-tp21271p21273.html Sent from the OpenSCAD mailing list archive at Nabble.com.
M
memsfactory
Tue, Apr 18, 2017 3:19 AM

aha. :) thank you!

--
View this message in context: http://forum.openscad.org/hull-command-flattens-result-in-2D-circle-vs-cube-tp21271p21280.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

aha. :) thank you! -- View this message in context: http://forum.openscad.org/hull-command-flattens-result-in-2D-circle-vs-cube-tp21271p21280.html Sent from the OpenSCAD mailing list archive at Nabble.com.