Why i can not hull two 2d shapes thate are translated in z direction ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why i can not hull two 2d shapes thate are translated in z direction ?

corpsman
Hello List,

if i write:

union()
   {
     circle(5/2);
     translate([0,0,7])square([8.5,4], true);
   }


i see 2 objects now i want the hull of this

hull()
   {
     circle(5/2);
     translate([0,0,7])square([8.5,4], true);
   }


And the z-translation of the square is gone. How is it possible to get
this done so i get a correct 3D-object ?


best regards


Corpsman


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Why i can not hull two 2d shapes thate are translated in z direction ?

nophead
To produce a 3D object you need to hull 3D objects. Hulling 2D objects only produces a 2D result and there are no Z coordinates.

eps = 1/128;

hull()
   {
     cylinder(r = 5/2, h = eps);
     translate([0,0, 7 - eps])cube([8.5,4, eps], true);
   }

There is no technical reason why you can't hull 2D objects in 3D but OpenSCAD doesn't allow it.

On Mon, 24 Dec 2018 at 11:20, corpsman <[hidden email]> wrote:
Hello List,

if i write:

union()
   {
     circle(5/2);
     translate([0,0,7])square([8.5,4], true);
   }


i see 2 objects now i want the hull of this

hull()
   {
     circle(5/2);
     translate([0,0,7])square([8.5,4], true);
   }


And the z-translation of the square is gone. How is it possible to get
this done so i get a correct 3D-object ?


best regards


Corpsman


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org