discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

2d hull

RW
Ray West
Wed, Apr 21, 2021 7:56 PM

Another snag, in working from 2d to 3d.

If you have a hull in 2D, then linear extrude its mirror, it won't.  Not
sure if hull of a hull is OK, though.

The following code, (viewed in thrown together explains why, I guess)

module profile(){
    hull(){
        circle (d=40);
        translate([50,21]) circle (d=28);
    }
}

// moved over for comparison
 translate([100,0,0])linear_extrude(20)profile();
translate([100,0,0])linear_extrude(10)mirror([0,1]) profile();  // if only

// this at origin x,y

linear_extrude(20)profile();
//  this works
hull(){
    mirror([0,1])linear_extrude(10)profile();
  }

Another snag, in working from 2d to 3d. If you have a hull in 2D, then linear extrude its mirror, it won't.  Not sure if hull of a hull is OK, though. The following code, (viewed in thrown together explains why, I guess) module profile(){     hull(){         circle (d=40);         translate([50,21]) circle (d=28);     } } // moved over for comparison  translate([100,0,0])linear_extrude(20)profile(); translate([100,0,0])linear_extrude(10)mirror([0,1]) profile();  // if only // this at origin x,y linear_extrude(20)profile(); //  this works hull(){     mirror([0,1])linear_extrude(10)profile();   }
A
adrianv
Wed, Apr 21, 2021 8:15 PM

I'd call this a bug.

linear_extrude(10)
mirror([0,1])
hull()
circle(10);

It seems that mirror() is flipping the direction of the face, but only if
you use hull().  Seems pretty strange.

mondo wrote

Another snag, in working from 2d to 3d.

If you have a hull in 2D, then linear extrude its mirror, it won't.  Not
sure if hull of a hull is OK, though.

The following code, (viewed in thrown together explains why, I guess)

module profile(){
    hull(){
        circle (d=40);
        translate([50,21]) circle (d=28);
    }
}

// moved over for comparison
 translate([100,0,0])linear_extrude(20)profile();
translate([100,0,0])linear_extrude(10)mirror([0,1]) profile();  // if only

// this at origin x,y

linear_extrude(20)profile();
//  this works
hull(){
    mirror([0,1])linear_extrude(10)profile();
  }


OpenSCAD mailing list
To unsubscribe send an email to

discuss-leave@.openscad

I'd call this a bug. linear_extrude(10) mirror([0,1]) hull() circle(10); It seems that mirror() is flipping the direction of the face, but only if you use hull(). Seems pretty strange. mondo wrote > Another snag, in working from 2d to 3d. > > If you have a hull in 2D, then linear extrude its mirror, it won't.  Not > sure if hull of a hull is OK, though. > > The following code, (viewed in thrown together explains why, I guess) > > module profile(){ >     hull(){ >         circle (d=40); >         translate([50,21]) circle (d=28); >     } > } > > // moved over for comparison >  translate([100,0,0])linear_extrude(20)profile(); > translate([100,0,0])linear_extrude(10)mirror([0,1]) profile();  // if only > > > // this at origin x,y > > linear_extrude(20)profile(); > //  this works > hull(){ >     mirror([0,1])linear_extrude(10)profile(); >   } > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to > discuss-leave@.openscad -- Sent from: http://forum.openscad.org/
NH
nop head
Wed, Apr 21, 2021 8:39 PM

https://github.com/openscad/openscad/issues/3415

On Wed, 21 Apr 2021 at 21:15, adrianv avm4@cornell.edu wrote:

I'd call this a bug.

linear_extrude(10)
mirror([0,1])
hull()
circle(10);

It seems that mirror() is flipping the direction of the face, but only if
you use hull().  Seems pretty strange.

mondo wrote
Another snag, in working from 2d to 3d.

If you have a hull in 2D, then linear extrude its mirror, it won't.  Not
sure if hull of a hull is OK, though.

The following code, (viewed in thrown together explains why, I guess)

module profile(){
hull(){
circle (d=40);
translate([50,21]) circle (d=28);
}
}

// moved over for comparison
translate([100,0,0])linear_extrude(20)profile();
translate([100,0,0])linear_extrude(10)mirror([0,1]) profile();  // if only

// this at origin x,y

linear_extrude(20)profile();
//  this works
hull(){
mirror([0,1])linear_extrude(10)profile();
}


OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
http:///user/SendEmail.jtp?type=email&email=discuss-leave%40.openscad


Sent from the OpenSCAD mailing list archive http://forum.openscad.org/
at Nabble.com.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

https://github.com/openscad/openscad/issues/3415 On Wed, 21 Apr 2021 at 21:15, adrianv <avm4@cornell.edu> wrote: > I'd call this a bug. > > linear_extrude(10) > mirror([0,1]) > hull() > circle(10); > > It seems that mirror() is flipping the direction of the face, but only if > you use hull(). Seems pretty strange. > > > mondo wrote > Another snag, in working from 2d to 3d. > > If you have a hull in 2D, then linear extrude its mirror, it won't. Not > sure if hull of a hull is OK, though. > > The following code, (viewed in thrown together explains why, I guess) > > module profile(){ > hull(){ > circle (d=40); > translate([50,21]) circle (d=28); > } > } > > // moved over for comparison > translate([100,0,0])linear_extrude(20)profile(); > translate([100,0,0])linear_extrude(10)mirror([0,1]) profile(); // if only > > > // this at origin x,y > > linear_extrude(20)profile(); > // this works > hull(){ > mirror([0,1])linear_extrude(10)profile(); > } > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to [hidden email] > <http:///user/SendEmail.jtp?type=email&email=discuss-leave%40.openscad> > > > ------------------------------ > Sent from the OpenSCAD mailing list archive <http://forum.openscad.org/> > at Nabble.com. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
CA
Carsten Arnholm
Thu, Apr 22, 2021 11:26 AM

On 21.04.2021 22:15, adrianv wrote:

I'd call this a bug.

linear_extrude(10)
  mirror([0,1])
      hull()
        circle(10);

It seems that mirror() is flipping the direction of the face, but only
if you use hull().  Seems pretty strange.

In OpenSCAD 2021.01 it shows inverted faces for the cylinder faces in F8
preview "Thrown together". The exported STL also has inverted faces.
This STL can be repaired using "polyfix" -nflip option:

$ polyfix -nflip -overwrite mirror_hull.stl

Alternatively, one may also process the original .scad source with
AngelCAD and the result then has correctly oriented faces.

Carsten Arnholm

On 21.04.2021 22:15, adrianv wrote: > I'd call this a bug. > > linear_extrude(10) >   mirror([0,1]) >       hull() >         circle(10); > > It seems that mirror() is flipping the direction of the face, but only > if you use hull().  Seems pretty strange. In OpenSCAD 2021.01 it shows inverted faces for the cylinder faces in F8 preview "Thrown together". The exported STL also has inverted faces. This STL can be repaired using "polyfix" -nflip option: $ polyfix -nflip -overwrite mirror_hull.stl Alternatively, one may also process the original .scad source with AngelCAD and the result then has correctly oriented faces. Carsten Arnholm