discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

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

C
corpsman
Mon, Dec 24, 2018 11:19 AM

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

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
NH
nop head
Mon, Dec 24, 2018 11:30 AM

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 corpsman@corpsman.de 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
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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 <corpsman@corpsman.de> 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 > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >