Closed platypii closed 10 months ago
@platypii interesting. i really didn't like this extrude function from day one as, as you mentioned, is just putting two functions together. users should be able to figure out how to do this through a simple example.
i also don't like 'torus' either, as that is simply extrude rotate with a sphere. it makes no sense to implement primitives via complex functionality. primitives should exist by themselves. examples should show how to create a torus.
Rebased to fix merge conflicts.
Can anyone tell me what exactly is "rectangular" about extrudeRectangular
?
Rebased to fix merge conflicts.
Can anyone tell me what exactly is "rectangular" about
extrudeRectangular
?
Nope. You could go back and look at V1, which may have had the same issues, or different issues.
V2 allows 'corners' to be passed into extrudeRectangular() as well. So there are a few more options.
From CSG.js V1... math/Path2.js
// Expand the path to a CAG
// This traces the path with a circle with radius pathradius
expandToCAG: function (pathradius, resolution) {
}
Earliest I could find was this commit from 2012: joostn/OpenJsCad@b059ed95
So... can we kill it? :fire:
This might be controversial. Let's use this PR for discussion on removing
extrudeRectangular
from V3.The
extrudeRectangular
function is supposed to:But it's not doing that. If you "follow the outline(s) with a rectangle" you would get something more like the red shape, but
extrudeRectangular
returns the shape on the right:In reality
extrudeRectangular
is basically just doing:This is not easy to fix, so I suggest that we simply delete
extrudeRectangular
. I would be surprised if anyone is using it, but if they are, they can useoffset
+extrude
instead.I think what was really intended here was a
stroke
function like the suggestion in #1272All Submissions: