discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: Why?????

MM
Michael Möller
Fri, Mar 3, 2023 2:24 PM

Various "illegalities" are tolerated on a single object (the STL file
polyhedron) but not allowed when unioned with other objects where more
strict rules (closed, inward/outard faces) are enforced. Try a F5 with
"thrown together"

On Fri, 3 Mar 2023 at 14:27, fred via Discuss discuss@lists.openscad.org
wrote:

---------- Forwarded message ----------
From: fred fred_dot_u@yahoo.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Fri, 3 Mar 2023 13:27:01 +0000 (UTC)
Subject: [OpenSCAD] Re: Why?????
without the stl file to import, it's just a rough guess on my part, not
being particularly skilled with OpenSCAD, but I'd venture a guess that the
imported file sits on the x/y plane and your d_base is slightly below that
level. Translate one down or the other up and aim for a bit of overlap
(i.e., 0.0625 mm) to ensure a clean join/union.

On Friday, March 3, 2023 at 08:03:26 AM EST, gmagyar6@gmail.com <
gmagyar6@gmail.com> wrote:

I would like to import an stl file and then add a shape.

If I render ONLY the stl file (F6), everything is fine!!!

If I create a base for it, however, it runs into an error:
ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron.

WHY????


$fn=64;
turret_height = 25;
p0 = 0;
p1 = 50;
p2 = 60;

module base(){
difference(){
cylinder(h=15, r1=50, r2=52, center=true);

   translate([0,0,5])
     cylinder(h=15, r1=47, r2=49, center=true);

}//difference
}

module d_base(){
difference(){
base();

 translate([0,0,1])
   for (i=[0 : 45 : 360]) {
     rotate([0, 0, i])
       linear_extrude(height = turret_height) {
         polygon( points=[[0,0],[p2,p1],[p1,p2]] );
       } //linear_extrude
   } //for

} //difference
} //module

module gorilla(){
resize([48,0,0], auto=true)
translate([0,0,3])
import("buddha_gorilla.stl",convexity=10);
}

gorilla();
d_base();

/*union(){
gorilla();
d_base();

}//union
*/


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

---------- Forwarded message ----------
From: fred via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: fred fred_dot_u@yahoo.com
Bcc:
Date: Fri, 3 Mar 2023 13:27:01 +0000 (UTC)
Subject: [OpenSCAD] Re: Why?????


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

Various "illegalities" are tolerated on a single object (the STL file polyhedron) but not allowed when unioned with other objects where more strict rules (closed, inward/outard faces) are enforced. Try a F5 with "thrown together" On Fri, 3 Mar 2023 at 14:27, fred via Discuss <discuss@lists.openscad.org> wrote: > > > > ---------- Forwarded message ---------- > From: fred <fred_dot_u@yahoo.com> > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > Cc: > Bcc: > Date: Fri, 3 Mar 2023 13:27:01 +0000 (UTC) > Subject: [OpenSCAD] Re: Why????? > without the stl file to import, it's just a rough guess on my part, not > being particularly skilled with OpenSCAD, but I'd venture a guess that the > imported file sits on the x/y plane and your d_base is slightly below that > level. Translate one down or the other up and aim for a bit of overlap > (i.e., 0.0625 mm) to ensure a clean join/union. > > On Friday, March 3, 2023 at 08:03:26 AM EST, gmagyar6@gmail.com < > gmagyar6@gmail.com> wrote: > > > I would like to import an stl file and then add a shape. > > If I render ONLY the stl file (F6), everything is fine!!! > > If I create a base for it, however, it runs into an error: > ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. > > WHY???? > > > ------------------------------ > > > $fn=64; > turret_height = 25; > p0 = 0; > p1 = 50; > p2 = 60; > > module base(){ > difference(){ > cylinder(h=15, r1=50, r2=52, center=true); > > translate([0,0,5]) > cylinder(h=15, r1=47, r2=49, center=true); > }//difference > } > > module d_base(){ > difference(){ > base(); > > translate([0,0,1]) > for (i=[0 : 45 : 360]) { > rotate([0, 0, i]) > linear_extrude(height = turret_height) { > polygon( points=[[0,0],[p2,p1],[p1,p2]] ); > } //linear_extrude > } //for > } //difference > } //module > > > module gorilla(){ > resize([48,0,0], auto=true) > translate([0,0,3]) > import("buddha_gorilla.stl",convexity=10); > } > > gorilla(); > d_base(); > > /*union(){ > gorilla(); > d_base(); > > }//union > */ > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > > ---------- Forwarded message ---------- > From: fred via Discuss <discuss@lists.openscad.org> > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > Cc: fred <fred_dot_u@yahoo.com> > Bcc: > Date: Fri, 3 Mar 2023 13:27:01 +0000 (UTC) > Subject: [OpenSCAD] Re: Why????? > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Rogier Wolff
Fri, Mar 3, 2023 2:39 PM

I always repair STLs (when necessary) at:
https://www.formware.co/onlinestlrepair

This is also sometimes necessary with STLs generated by openSCAD, even
when just unioning and differencing primitive objects.  I have one
project where after exporting the STL contains funnies that cause the
slicer to simply leave out one layer in the middle. With the next
layer sticking "a bit" onto the previous one, it looks normal, but the
object breaks easily. But after repair: all layers are converted to
gcode.

Roger.

On Fri, Mar 03, 2023 at 03:24:31PM +0100, Michael Möller wrote:

Various "illegalities" are tolerated on a single object (the STL file
polyhedron) but not allowed when unioned with other objects where more
strict rules (closed, inward/outard faces) are enforced. Try a F5 with
"thrown together"

On Fri, 3 Mar 2023 at 14:27, fred via Discuss discuss@lists.openscad.org
wrote:

---------- Forwarded message ----------
From: fred fred_dot_u@yahoo.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Fri, 3 Mar 2023 13:27:01 +0000 (UTC)
Subject: [OpenSCAD] Re: Why?????
without the stl file to import, it's just a rough guess on my part, not
being particularly skilled with OpenSCAD, but I'd venture a guess that the
imported file sits on the x/y plane and your d_base is slightly below that
level. Translate one down or the other up and aim for a bit of overlap
(i.e., 0.0625 mm) to ensure a clean join/union.

On Friday, March 3, 2023 at 08:03:26 AM EST, gmagyar6@gmail.com <
gmagyar6@gmail.com> wrote:

I would like to import an stl file and then add a shape.

If I render ONLY the stl file (F6), everything is fine!!!

If I create a base for it, however, it runs into an error:
ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron.

WHY????


$fn=64;
turret_height = 25;
p0 = 0;
p1 = 50;
p2 = 60;

module base(){
difference(){
cylinder(h=15, r1=50, r2=52, center=true);

   translate([0,0,5])
     cylinder(h=15, r1=47, r2=49, center=true);

}//difference
}

module d_base(){
difference(){
base();

 translate([0,0,1])
   for (i=[0 : 45 : 360]) {
     rotate([0, 0, i])
       linear_extrude(height = turret_height) {
         polygon( points=[[0,0],[p2,p1],[p1,p2]] );
       } //linear_extrude
   } //for

} //difference
} //module

module gorilla(){
resize([48,0,0], auto=true)
translate([0,0,3])
import("buddha_gorilla.stl",convexity=10);
}

gorilla();
d_base();

/*union(){
gorilla();
d_base();

}//union
*/


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

---------- Forwarded message ----------
From: fred via Discuss discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: fred fred_dot_u@yahoo.com
Bcc:
Date: Fri, 3 Mar 2023 13:27:01 +0000 (UTC)
Subject: [OpenSCAD] Re: Why?????


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


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

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

I always repair STLs (when necessary) at: https://www.formware.co/onlinestlrepair This is also sometimes necessary with STLs generated by openSCAD, even when just unioning and differencing primitive objects. I have one project where after exporting the STL contains funnies that cause the slicer to simply leave out one layer in the middle. With the next layer sticking "a bit" onto the previous one, it looks normal, but the object breaks easily. But after repair: all layers are converted to gcode. Roger. On Fri, Mar 03, 2023 at 03:24:31PM +0100, Michael Möller wrote: > Various "illegalities" are tolerated on a single object (the STL file > polyhedron) but not allowed when unioned with other objects where more > strict rules (closed, inward/outard faces) are enforced. Try a F5 with > "thrown together" > > On Fri, 3 Mar 2023 at 14:27, fred via Discuss <discuss@lists.openscad.org> > wrote: > > > > > > > > > ---------- Forwarded message ---------- > > From: fred <fred_dot_u@yahoo.com> > > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > > Cc: > > Bcc: > > Date: Fri, 3 Mar 2023 13:27:01 +0000 (UTC) > > Subject: [OpenSCAD] Re: Why????? > > without the stl file to import, it's just a rough guess on my part, not > > being particularly skilled with OpenSCAD, but I'd venture a guess that the > > imported file sits on the x/y plane and your d_base is slightly below that > > level. Translate one down or the other up and aim for a bit of overlap > > (i.e., 0.0625 mm) to ensure a clean join/union. > > > > On Friday, March 3, 2023 at 08:03:26 AM EST, gmagyar6@gmail.com < > > gmagyar6@gmail.com> wrote: > > > > > > I would like to import an stl file and then add a shape. > > > > If I render ONLY the stl file (F6), everything is fine!!! > > > > If I create a base for it, however, it runs into an error: > > ERROR: The given mesh is not closed! Unable to convert to CGAL_Nef_Polyhedron. > > > > WHY???? > > > > > > ------------------------------ > > > > > > $fn=64; > > turret_height = 25; > > p0 = 0; > > p1 = 50; > > p2 = 60; > > > > module base(){ > > difference(){ > > cylinder(h=15, r1=50, r2=52, center=true); > > > > translate([0,0,5]) > > cylinder(h=15, r1=47, r2=49, center=true); > > }//difference > > } > > > > module d_base(){ > > difference(){ > > base(); > > > > translate([0,0,1]) > > for (i=[0 : 45 : 360]) { > > rotate([0, 0, i]) > > linear_extrude(height = turret_height) { > > polygon( points=[[0,0],[p2,p1],[p1,p2]] ); > > } //linear_extrude > > } //for > > } //difference > > } //module > > > > > > module gorilla(){ > > resize([48,0,0], auto=true) > > translate([0,0,3]) > > import("buddha_gorilla.stl",convexity=10); > > } > > > > gorilla(); > > d_base(); > > > > /*union(){ > > gorilla(); > > d_base(); > > > > }//union > > */ > > > > > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > > > > > > ---------- Forwarded message ---------- > > From: fred via Discuss <discuss@lists.openscad.org> > > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > > Cc: fred <fred_dot_u@yahoo.com> > > Bcc: > > Date: Fri, 3 Mar 2023 13:27:01 +0000 (UTC) > > Subject: [OpenSCAD] Re: Why????? > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.