A new type of primitive I've made for CSharpCAD, that might be of interest to JSCAD. #1104
Replies: 2 comments 19 replies
-
I am curious
|
Beta Was this translation helpful? Give feedback.
-
@hrgdavor Putting this in a new thread.
As expected Cyllinder Elliptic grows linearly with the number of segments: |
Beta Was this translation helpful? Give feedback.
-
So these two primitives are what I'm calling a "negative geometry object"... basically it's an object that is created only so that it can be subtracted from another object (yielding a presumably useful object).
(BTW, if you've ever seen a package contain "negative geometry objects" before, I'd love to know about it!)
I created Cutter2D and Cutter 3D. Their function is to remove a "pie slice" from circular/elliptical objects.
One of the few things I like better about OpenSCAD over JSCAD is that it's API is more simple.
Circle for example has those annoying startAngle and endAngle options.
Within JSCAD, the complexity of having Semi and Full circles in the same API has caused problems.
As no one is using CSharpCAD, I can make reasonable changes in the API... and this allows me to simplify all the circular/elliptical APIs, yet still be able for end users to make semi-objects easily.
JSCAD may want to adopt Cutter2D/3D, even if the APIs are not changed as it works with GeodesicSphere, Ellipsoid and Sphere, which don't have semi-versioning in their API. And also on any round compound objects.
Example:
Here's my C# implementation. Remember to translate to radians! (CSharpCAD uses degrees.)
Beta Was this translation helpful? Give feedback.
All reactions