Hi,
I wrote a little SCAD script to help those battling with Elephant's Foot. It allows a user to import their STL, and it slices the bottom (n) layers, offsets those layers by user selected amount and, when rendered, creates a new model with basically a custom chamfer along the bottom. Elephants Foot Compensation https://www.thingiverse.com/thing:4800868
Now I am trying to do the same thing in openJSCAD
openSCAD uses a "projection" tool that seems to create a 2d path where the model intersects with the Z=0 plane. The path has both external vertices (the outside of the model) and internal vertices (if their are holes).
openSCAD also has an offset tool. This allows one to offset the aforementioned path. If one offsets in the positive, then it will expand the external vertices along the path pushing out along normals AND it would "shrink" internal vertices, pushing normally inward along the path.
Those paths can then be re-extruded to recreate the modified model. Anyway, those are the tools I used in openSCAD to make the tool.
As a newb to JSCAD, I'm not really understanding the overall difference between V1 and V2.
For slicing, I have tried this
var cag = obj.projectToOrthoNormalBasis(z0basis);
return cag;
And it seems to be a path, but then I can't seem to offset it or extrude it.
Extrusion:
When I try this as an example
var z0basis = CSG.OrthoNormalBasis.Z0Plane();
var cag = obj.projectToOrthoNormalBasis(z0basis);
var NewCag = cag.extrude([0,0,25]);
return NewCag;
There is a slight extrusion. But no matter what value I put in for the Z val, the slight extrusion appears to be the same.
Offset:
I read that there is no offset in V1 but there is in V2.
After that long intro...
- Is there a JSCAD equivalent to SCAD projection that can yield a 2d path
- is there a JSCAD equivalent to SCAD offset that can offset that 2d path
- can that path then be extruded back into a 3d solid
Thank you in advance
Steve