[OpenSCAD] sumUp() to Replace Difference() (in most cases)

don bright hmbright at fastmail.com
Thu Oct 6 20:34:51 EDT 2016

That is very cool, seems a little bit like using "negative objects" and
"positive objects".

  don bright
  hmbright at fastmail.com

On Thu, Oct 6, 2016, at 02:55 PM, pproj at posteo.de wrote:
> hello after few years of work on my quite complex  cad project, which
> i created using openscad .(my love to openscad was hampered by quite
> few a limittions for a compex project- but i am still working with it)
>  anyway,
>  i have decided it is time to share with others some of the things i
>  have discovered and developed in the years of use.
>  i will start with the sumUp(). which is an advanced replacement for
>  the difference() keyword and allows for holes inside modules, and
>  reduced nesting producing simpler code among other things.
>  i have put it it under:
> https://github.com/solidboredom/sumUp
>  but to show you why i have been using it so much: it can produce this
>  example. the  code below  and the lib  is all you need
>  :
> include<sumup.scad>  sumUp() {  add() cube([20,20,7],center=true);
> lidWithNailsAndWasher(); }

> //== modules below  == module lidWithNailsAndWasher() {  add()
> //washer translate([,,8]) cube([20,20,1],center=true);
> addAfterRemoving() //top cover without holes translate([,,11])
> color("green") cube([17,17,2],center=true); for(x=[-1,1],y=[-1,1])
> translate([x*7,y*7,2]) {  remove() cylinder(h=25,d=4.5,center=true);
> #addAfterRemoving() cylinder(h=10,d2=3,d1=1); } }

> i have been quite happy with thhe library (actually its predecessor)
> so i hope you will find it useful too.
>  i have been using it so much i would like to have its approach
>  somehow integrated in openscad itself.
>   this perhaps could resolve its main drawback: speed on complex
>   models: openscad creates a lot groups and getting much slower on
>   complex models than with the difference().
>  i would also like to share another library: essentially a human(not
>  linear algebra robot) oriented syntax rewrite library for basic
>  openscad operations i use a lot, but still need to make it ready for
>  publishing and documented first.
>  so whats your take folks?
>  Peter
> _________________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20161006/17ba8046/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kepcmgkjcehfdfmd.png
Type: image/png
Size: 10841 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20161006/17ba8046/attachment.png>

More information about the Discuss mailing list