discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

How to set a limit for extended/pattern objects to be contained in the volume of a desired object

NS
nlck.summers@yahoo.com
Thu, Feb 12, 2015 5:59 AM

Here is my current setup:
module bars()
{
for(x=[-30,-20,-10,0,10,20,30], y=[-30,-20,-10,0,10,20,30 ])

translate([x,y,0]) cylinder (r=2,h=100,$fn=100,
center=true);

}

difference()
{
bars();
sphere(r=30);
}

How can I make it possible that the bars will only show up within the limits
of the sphere?
I don't want a solid sphere, I want to see the bars existing only within a
given shape/set of dimensions.

Thank you kindly, maybe I can help you.

--
View this message in context: http://forum.openscad.org/How-to-set-a-limit-for-extended-pattern-objects-to-be-contained-in-the-volume-of-a-desired-object-tp11623.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Here is my current setup: module bars() { for(x=[-30,-20,-10,0,10,20,30], y=[-30,-20,-10,0,10,20,30 ]) translate([x,y,0]) cylinder (r=2,h=100,$fn=100, center=true); } difference() { bars(); sphere(r=30); } How can I make it possible that the bars will only show up within the limits of the sphere? I don't want a solid sphere, I want to see the bars existing only within a given shape/set of dimensions. Thank you kindly, maybe I can help you. -- View this message in context: http://forum.openscad.org/How-to-set-a-limit-for-extended-pattern-objects-to-be-contained-in-the-volume-of-a-desired-object-tp11623.html Sent from the OpenSCAD mailing list archive at Nabble.com.
EN
Ed Nisley
Thu, Feb 12, 2015 12:25 PM

On 02/12/2015 12:59 AM, nlck.summers@yahoo.com wrote:

the bars existing only within a
given shape/set of dimensions

Replacing difference() with intersection() should do the trick.

--
Ed
softsolder.com

On 02/12/2015 12:59 AM, nlck.summers@yahoo.com wrote: > the bars existing only within a > given shape/set of dimensions Replacing difference() with intersection() should do the trick. -- Ed softsolder.com
MS
Mr. Summers
Thu, Feb 12, 2015 1:55 PM

It works! Thank you so so much my good sir.

--
View this message in context: http://forum.openscad.org/How-to-set-a-limit-for-extended-pattern-objects-to-be-contained-in-the-volume-of-a-desired-object-tp11623p11625.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

It works! Thank you so so much my good sir. -- View this message in context: http://forum.openscad.org/How-to-set-a-limit-for-extended-pattern-objects-to-be-contained-in-the-volume-of-a-desired-object-tp11623p11625.html Sent from the OpenSCAD mailing list archive at Nabble.com.