- It is always the better (and faster) to start a design like this in 2D
(and stay in xy) and do all the nasty operations like hull, minkowsky and
boolean operations before extrusion.
- Avoid difference operations where the second operand exactly matches one
or two "borders" (matching vertices, edges, and so on) of the first
operand. Usually the second operand can be easily enlarged. Similar rules
apply for all boolean operations.
- try to avoid rotations before going into boolean operations having
operands with matching borders. At best avoid unnessecary rotations.
Following these guidelines will change your code into:
$fn= 90;
rotate([90,0,0])
linear_extrude(2)
difference()
{
hull()
{
translate ([-47,5]) circle(5);
translate ([47,5]) circle(5);
translate ([42,22]) square(10);
translate ([-52,22]) square(10);
}
hull()
{
translate ([-20,17]) circle(5);
translate ([20,17]) circle(5);
translate ([-25,23]) square(10);
translate ([15,23]) square(10);
}
}
1. It is always the better (and faster) to start a design like this in 2D
(and stay in xy) and do all the nasty operations like hull, minkowsky and
boolean operations before extrusion.
2. Avoid difference operations where the second operand exactly matches one
or two "borders" (matching vertices, edges, and so on) of the first
operand. Usually the second operand can be easily enlarged. Similar rules
apply for all boolean operations.
3. try to avoid rotations before going into boolean operations having
operands with matching borders. At best avoid unnessecary rotations.
Following these guidelines will change your code into:
> $fn= 90;
> rotate([90,0,0])
> linear_extrude(2)
> difference()
> {
> hull()
> {
> translate ([-47,5]) circle(5);
> translate ([47,5]) circle(5);
> translate ([42,22]) square(10);
> translate ([-52,22]) square(10);
> }
> hull()
> {
> translate ([-20,17]) circle(5);
> translate ([20,17]) circle(5);
> translate ([-25,23]) square(10);
> translate ([15,23]) square(10);
> }
> }
--
View this message in context: http://forum.openscad.org/i-am-crazy-of-openscad-but-openscad-makes-me-crazy-tp21571p21575.html
Sent from the OpenSCAD mailing list archive at Nabble.com.