Skip to content

Possibility of supporting ImplicitCAD (extopenscad)? #134

@Digital-Monk

Description

@Digital-Monk

ImplicitCAD doesn't yet have everything that OpenSCAD has. But it does have at least one killer feature that OpenSCAD lacks: trivial fillets for cubes and boolean operations.

https://github.com/colah/ImplicitCAD

(It has several other nice features -- but fillets are the one single thing that would force me to leave OpenSCAD and use FreeCAD or something else that "gets" fillets. So it makes me happy to have them in an "extended OpenSCAD" compiler.)

Instead of cube([10,10,10]);, if you say cube([10,10,10],false,1);, you'll get a 10 unit cube with 1 unit fillets along all edges. (The 'false' is a value for 'centered'. My quick and dirty experiments only worked if I used positional arguments in that order, but there may be better ways to do this).

difference(), union(), and intersection() now all take an 'r' parameter that specifies the radius of the fillet to apply along the edges.

It's fairly trivial to load the result of scad_render_to_file(object) into a text editor and just paste the necessary extra parameters into place, but it would be slick if there was some way to do this directly from SolidPython.

Not sure of the best approach, but probably one settable flag to enable .escad output, and then a way to specify a fillet radius. My lazy feeling is to just make it a setting in the solid library, so that I can tell solid to use 1 unit fillets and then go on about my business of creating geometry, knowing that it will apply a 1 unit r to any cubes or operations that it generates. In my head, this seems reasonable, because you probably want the same fillet for each conceptual chunk of your model, so set it once, build, then change it before building a different piece.

You could allow the fillet radius in the cube function easily enough. And you could likewise accept and pass through the fillet in the union/difference/intersection functions. But it's kind of slick to be able to use +, -, and * instead, and there's no straightforward way to give them that extra parameter...

Alternatively, maybe there could be a way to specify a fillet radius for a SCAD object. That seems more complicated to me, because then you have to answer some design questions:

  1. If the SCAD object is the result of operations on other objects, should you recursively apply the new fillet down the tree? That would override any lower level fillets already in place...
  2. When performing an operation on SCAD objects, should the result inherit fillets from the children? This raises questions if the input objects have different fillets...
  3. If you neither recurse nor inherit, then you have to spend a lot of time setting fillets on each piecewise operation result, which seems tedious...

Sorry if this is rambling or disorganized. I found ImplicitCAD and SolidPython essentially on the same day after years of loving OpenSCAD's programmability and hating how hard it made some things. I may have gotten a bit over-excited ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions