discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] combine a union child and a difference child in oneobject.

L
Leef_me
Mon, Nov 30, 2015 8:40 PM

Part A should only be used as a difference.

Part B should appear loose in the cube.

From: Peter Falke
Sent: Monday, November 30, 2015 12:28 PM
To: OpenSCAD general discussion
Subject: Re: [OpenSCAD] combine a union child and a difference child in oneobject.

I'm not sure what you want to use the # for. Its normally only for diagnostics.

How about this:

$fn=16;

difference()
{
cube([5,5,5], center=true);
wire(); // part A
}

wire();

module wire(){
cylinder(d=1, h=15, center=true); // part B
color("red")cylinder(d=1.5, h=12, center=true); // part A
}

2015-11-30 21:12 GMT+01:00 Leef_me Leef_me@cox.net:

// Is it possible to combine the two lines marked part A and part B,
//  into one object, module or whatever?
//  If so, I'd appreciate an an example.

$fn=16;

difference()
{
cube([5,5,5], center=true);
#cylinder(d=1.5, h=12, center=true); // part A
}

cylinder(d=1, h=15, center=true); // part B

Thanks in advance

Leef_me


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org



OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Part A should only be used as a difference. Part B should appear loose in the cube. From: Peter Falke Sent: Monday, November 30, 2015 12:28 PM To: OpenSCAD general discussion Subject: Re: [OpenSCAD] combine a union child and a difference child in oneobject. I'm not sure what you want to use the # for. Its normally only for diagnostics. How about this: $fn=16; difference() { cube([5,5,5], center=true); wire(); // part A } wire(); module wire(){ cylinder(d=1, h=15, center=true); // part B color("red")cylinder(d=1.5, h=12, center=true); // part A } 2015-11-30 21:12 GMT+01:00 Leef_me <Leef_me@cox.net>: // Is it possible to combine the two lines marked part A and part B, // into one object, module or whatever? // If so, I'd appreciate an an example. $fn=16; difference() { cube([5,5,5], center=true); #cylinder(d=1.5, h=12, center=true); // part A } cylinder(d=1, h=15, center=true); // part B Thanks in advance Leef_me _______________________________________________ OpenSCAD mailing list Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -------------------------------------------------------------------------------- _______________________________________________ OpenSCAD mailing list Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org