[OpenSCAD] Making a whole of small parts

adrianv avm4 at cornell.edu
Fri Jul 26 17:20:54 EDT 2019


I don't understand your goal.  Do you want to print 20 copies of the same
part?  Or 20 copies of the same part but with variations in part parameters? 
And your question is how to arrange them on a line?  

This code will put 20 identical parts on the X axis.  The BOSL library is
here:  https://github.com/revarbat/BOSL

include <BOSL/constants.scad>
use <BOSL/transforms.scad>

xspread(spacing=5, n=20) part();

You can do something like

xspread(spacing=5, n=20) part(partpos=$pos);

which will modify the part depending on its position to create 20 different
parts.  

Is this the kind of thing you're looking for?  If not, please clarify.  
Maybe give a specific example of what you're doing.


gounthar wrote
> Hi,
> 
> as I'm coming from onShape, I'm kind of lost sometimes.
> I design boxes for hosting hardware. Most of the time, some small parts
> don't fit that well (because I made errors when taking measurements, or
> the
> printer is not that accurate), so I modify the small part of the big box,
> and print once more everything.
> If I ever want to add or modify something, I have to do the same again.
> Print the whole box, and not the small part of the box.
> Time, resource, and energy consuming.
> 
> I thought I had found the perfect tool with OpenSCAD, because I can define
> my small parts in different files, use functions and modules, so that my
> small parts can be printed more quickly, and modified if needed.
> I'm getting used to it, but I'm not sure I am following the right path,
> embracing the right phylosophy.
> For example, I'm still struggling with translate in order to replicate
> lots
> of small parts which are symmetrical to a construction line... I should
> maybe get with mirror().
> But let's say it's ok, mostly ok.
> 
> How am I supposed to integrate those small parts in the bigger part?
> Just with translate() followed by the call to my module (with some
> parameters maybe)?
> Is there any other way that would be easier, or more OpenSCAD-like?
> 
> Thanks.
> 
> Bruno
> 
> 
> 
> --
> Sent from: http://forum.openscad.org/
> 
> _______________________________________________
> OpenSCAD mailing list

> Discuss at .openscad

> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org





--
Sent from: http://forum.openscad.org/



More information about the Discuss mailing list