Hi, I am running Openscad v2021.01 and am having problems with the following script.
$fn=32;
difference()
{
union(){
import("base_slide_heavy_duty_HA.stl", 4);
hull(){
translate([22,-13,0]) color("red") cube([20,70,3]);
translate([35.5,-13,0]) color("green") cylinder(h=3, d=13);
translate([28.5,-19.5,0]) color("blue") cube([7,5,3]);
translate([24,57,0]) color("green")cylinder(h=3, d=4);
translate([40,57,0]) color("green")cylinder(h=3, d=4);
}
}
translate([25.8,-17,-1]) color("red")cylinder(h=5, d=3);
}
and when I hit F5 I get the following display
i.e. there are "holes" in the render.
If I comment out the difference() it appears correctly except the red cylinder isn't subtracted :-
The "imported" .STL file is attached.
This is only a problem for the preview, the generated STL is fine.
What am I doing wrong ??
Regards,
Dave
You need to add convexity=10 to your import call.
On Sat, Feb 19, 2022 at 11:10 AM Dave softfoot@hotmail.com wrote:
Hi, I am running Openscad v2021.01 and am having problems with the
following script.
$fn=32;
difference()
{
union(){
import("base_slide_heavy_duty_HA.stl", 4);
hull(){
translate([22,-13,0]) color("red") cube([20,70,3]);
translate([35.5,-13,0]) color("green") cylinder(h=3, d=13);
translate([28.5,-19.5,0]) color("blue") cube([7,5,3]);
translate([24,57,0]) color("green")cylinder(h=3, d=4);
translate([40,57,0]) color("green")cylinder(h=3, d=4);
}
}
translate([25.8,-17,-1]) color("red")cylinder(h=5, d=3);
}
and when I hit F5 I get the following display
i.e. there are "holes" in the render.
If I comment out the difference() it appears correctly except the red
cylinder isn't subtracted :-
The "imported" .STL file is attached.
This is only a problem for the preview, the generated STL is fine.
What am I doing wrong ??
Regards,
Dave
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Hi Dave,
It doesn' t seem to like some boolean ops on the stl. I've modified the
code, below, and made the red hole so it avoids countersink renders Ok
$fn=32;
import("C:/Users/Ray/Downloads/base_slide_heavy_duty_HA.stl");
plate();
module plate (){
difference(){
hull(){
translate([22,-13,0]) color("red") cube([20,70,3]);
translate([35.5,-13,0]) color("green") cylinder(h=3, d=13);
translate([28.5,-19.5,0]) color("blue") cube([7,5,3]);
translate([24,57,0]) color("green")cylinder(h=3, d=4);
translate([40,57,0]) color("green")cylinder(h=3, d=4);
}
translate([25.8,-17,-1]) color("red")cylinder(h=5, d=6);
}
}
On 19/02/2022 16:09, Dave wrote:
Hi, I am running Openscad v2021.01 and am having problems with the
following script.
$fn=32;
difference()
{
union(){
import("base_slide_heavy_duty_HA.stl", 4);
hull(){
translate([22,-13,0]) color("red") cube([20,70,3]);
translate([35.5,-13,0]) color("green") cylinder(h=3, d=13);
translate([28.5,-19.5,0]) color("blue") cube([7,5,3]);
translate([24,57,0]) color("green")cylinder(h=3, d=4);
translate([40,57,0]) color("green")cylinder(h=3, d=4);
}
}
translate([25.8,-17,-1]) color("red")cylinder(h=5, d=3);
}
and when I hit F5 I get the following display
i.e. there are "holes" in the render.
If I comment out the difference() it appears correctly except the red
cylinder isn't subtracted :-
The "imported" .STL file is attached.
This is only a problem for the preview, the generated STL is fine.
What am I doing wrong ??
Regards,
Dave
OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org