1
$\begingroup$

The following creates an object with two slots:

 translate([-40,-40,0]) difference() {
     cube ([90,28,12]);
     translate([12,-.01,5]) cube([12.7,28.02,14.02]);
     translate([65,-.01,5]) cube([12.7,28.02,14.02]);

How can the first main cube be extended to be a complex object of the syntax:

cube([60,20,10],center=true);translate([0,0,5])cube([30,20,10],center=true);

and then use difference to create holes?

$\endgroup$
3
  • 1
    $\begingroup$ I fail to see why this question "does not appear to be about tools and applications of 3D printing", since it is about the use of a popular 3D CAD package. Voting to re-open. $\endgroup$ – Mick Jan 16 at 10:09
  • 2
    $\begingroup$ @Mick CAD is only so far on topic as it solves a printing problem. You need to show how this operation you try is related to 3D printing - for example "cutting up" to print in parts. for "remove one part" you'd have to point out why this is not a simple CAD question but related to 3D printing, for example by telling something like "I want to print with 2 materials in my MMU. I have a model and want to put color A in most but color B in the cutout." $\endgroup$ – Trish Jan 16 at 13:53
  • 1
    $\begingroup$ Both Mick and Trish raise very valid points. Dan, if you can edit your question to make it more applicable to 3D Printing then the question could be re-opened, otherwise we fear than we may become a "non-3D Printing related CAD" support site, if you see what I mean. See our on-topic page and CAD Questions - Review. Hi and welcome to SE.3DP, btw! :-) $\endgroup$ – Greenonline Jan 16 at 15:30
2
$\begingroup$

The union syntax addresses this:

translate([-40,-40,0]) 
difference() {
    union() {
        cube ([90,28,12]);

        translate([20,0,20]) 
        cube([12,12,12]);
    }

    translate([12,-.01,5]) 
    cube([12.7,28.02,14.02]);

    translate([65,-.01,5]) 
    cube([12.7,28.02,14.02]); 
}

It supports creating an object before the difference syntax is applied.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.