2d hull

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

2d hull

mondo
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]
Reply | Threaded
Open this post in threaded view
|

Re: 2d hull

adrianv
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]


Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: 2d hull

nophead

On Wed, 21 Apr 2021 at 21:15, adrianv <[hidden email]> 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]


Sent from the OpenSCAD mailing list archive at Nabble.com.
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: 2d hull

cacb
In reply to this post by adrianv
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
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]