Hacker Newsnew | past | comments | ask | show | jobs | submit | Cargo4286's commentslogin

Neither Fornjot nor Truck are ready for general use as a BREP CAD kernel.


Here's an ellipsoid in build123d using geometric transformation of a sphere:

    from build123d import *
    mat = Matrix([[2,0,0,0],[0,1.5,0,0],[0,0,0.5,0]])
    ellipsoid = Sphere(100).transform_geometry(mat)
Also, FYI build123d now runs in the browser thanks to OCP.wasm. Example playground here https://jojain.github.io/build123d-sandbox/


If you are using build123d, probably the easiest way is to sketch an ellipse and revolve it.


The definition of an ellipsoid is that it can have three independent radii. A revolved ellipse only has two independent radii. If only two independent radii are needed then yes I agree with you, but I wanted to provide a fully qualified answer.


build123d isn't Microcad


>OpenSCAD however fails spectacularly for any kind of complex filetting situation when compared to tools like Fusion or even FreeCAD (FreeCAD's UI is an abomination though).

build123d[1] is based on the same kernel as FreeCAD and has full support for complex filleting situations. Furthermore it also has first class support for 1D and 2D primitives which enable a more flexible design approach.

> The morphological ops in OpenSCAD (minkowski type stuff) are a very poor substitute to real fillets, and are extremely slow (underlying algos are all polynomials in number of triangles) when your objects get complex, and they are global operations, it is extremely hard to limit their action to a localized part of your object.

Agreed.

> Another thing that's a real pain in OpenSCAD: you cannot "probe" (measure) your existing object at a certain stage, grab the result of that measurement and re-use it in the rest of the code. MAJOR limitation.

This is another area where build123d excels. You can create a line and query its length. You can create a face and query its area, position, size, bounding box, etc. You can select parts of a solid and perform operations on them (like a chamfer/fillet, or use them as a reference for positioning). You can query the geometric type of any topological entity; e.g. is this curve linear, a circular arc, elliptical, or a spline?

build123d is IMHO easily one of the most powerful CAD packages that are not well known by a wide audience (owing in part to its ~3 year history). OpenSCAD is a fantastic tool; it was my introduction to CodeCAD and I used it for years. Therefore, my objection isn't to OpenSCAD itself, but to the limitations inherent in any single tool -- and in this case, those limitations are quite significant.

[1]: https://github.com/gumyr/build123d and docs https://build123d.readthedocs.io/en/latest/


You should really look at build123d -- it is a full CAD package including 3D but it also treats 1D and 2D as first class citizens.

Your idea about drawing lines is already supported in build123d:

  m1 = Line((0,0),(0,24))      # vertical line
  m2 = Line(m1@1,m1@1+(24,0))  # horizontal line starting at the end of m1
Further you could use logic based on some ruleset to place stock symbols on these "construction lines". It is also very easy to create custom objects that would conform to your exact syntax above.


Fillets in BREP software are so much more complex than this, your statement is a huge oversimplification.


Have you taken a look at the build123d "algebra API" yet? It is intended to be near zero magic without any of the with blocks from the "builder API". There are algebra and builder API versions of all of the introductory examples on this page https://build123d.readthedocs.io/en/latest/introductory_exam...


Algebra has its own magic though, c.f. the "vectorization" stuff which implements an IMHO really confusing syntax as a kludge to get around having to implement a lazy evaluator. And the placement operator syntax is... yikes. But yes, if you have a CSG problem you're porting naturally from a tool like OpenSCAD you should be using Algebra and not Builder, 100%.

Really it's just an odd area, without solid conventions, and so any API in the 3D space is going to look weird in some places. But IMHO build123d leans way too far out on the "clever" end of the spectrum for my taste. OpenSCAD is limited, but has the advantage of having stuck to a dry, dumb, obvious API.


Have you taken a look at the build123d "algebra API" yet? It is intended to be near zero magic without any of the with blocks from the "builder API". There are algebra and builder API versions of all of the introductory examples on this page https://build123d.readthedocs.io/en/latest/introductory_exam...


I have not, and I will. Thanks for the link.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: