BOSL2 icon indicating copy to clipboard operation
BOSL2 copied to clipboard

mutators mystery

Open adrianVmariano opened this issue 1 year ago • 0 comments

The mutators.scad file is the last really disorganized file. It's a catchall of the stuff we weren't able to organize into anything sensible, under the name "mutators" which basically means nothing and provides no insight to a user. How can this be improved?

The modules in mutators.scad include:

extrusion modules:

  • path_extrude2d()
  • cylindrical_extrude()
  • extrude_from_to()
  • path_extrude()

The unclassifiables:

  • bounding_box()
  • chain_hull()

and then the offset modules

  • minkowski_difference()
  • offset3d()
  • round3d()

And round3d() is apparently there just to prove we know how to do it, because the docs say it's too slow to actually provide an example. We could put the last three into shapes3d.scad, perhaps. We put round2d() and shell2d() into shapes2d.scad, so that would fit. We could put the 4 extrusion functions also in shapes3d.scad. The problem with adding everything to shapes3d.scad is that it's already arguably too long. We could put them in a separate extrusion.scad. Or split shapes3d.scad somehow and put these things there?

Presumably chain_hull() and bounding_box() work in 2d or 3d, so putting them in shapes3d.scad doesn't really make sense.

There is one other extrusion module in BOSL2, which is convex_offset_extrude() in rounding.scad. Its reliance on interface features for offset_sweep() make it seem bad to split it off from rounding.scad.

adrianVmariano avatar Jan 16 '23 21:01 adrianVmariano