OpenJSCAD
openjscad.org
openjscad.org
So far OpenCASCADE is the most promising library I've found. And it's been around for a long while: I don't remember the last time I had to tell bindgen about the "DECOSF1" macro!
And of course AutoCAD, but this is a hobby and I don't feel like spending thousands :-)
I create writing in Inkscape and save as DXF, then open in DraftSight, scale correctly, an other detail (outline, holes, etc).
Inkscape creates a DXF file with a whole lot of splines. The OEM CAM software is ok with this. The new third party app is creating overly complex G-code that causes our laser cutter to pause briefly at some of the end / beginning of the splines, which results in huge heat input and the stainless steel parts look terrible with small discolouration at the pauses.
I’m trying to find alternative methods of creating text, but I don’t know the space very well.
Maybe I need a different CAD or vector graphics app that can create letters with fewer objects?
AutoCAD has an explodetext command, but it creates completely useless outlines that look a mess. DraftSight’s same commsnd results in text outlines that are comprised of hundreds of small straight lines, also useless.
Any ideas?
Going to give that a go today, just got to work at 05:40 so will let you know how I go later.
Here's my most complex creation to date, a NASA spotlight/generator trailer to light up my LEGO Saturn V: https://www.thingiverse.com/thing:2758119
OpenJSCAD provide nothing more than much higher CPU consumption & heavy network traffic usage, comparing to 'native' OpenSCAD desktop app.
And for design complex 3D models modern web-browser and powerful PC is needed to use it comfortably.
But for fans of web-hosted/cloud apps OpenJSCAD, off course, is the real thing.
Perhaps the 3MF https://github.com/3MFConsortium output format could be useful too?
Edit: ah, i didn't see any dates; but I do see a "Google+ community" link ... Perhaps there's more to be done to make this a viable alternative.
EDIT: There's a giant V2 branch with newer updates and updated links to their new community. I am not sure they realize how dead the project looks with no commits to master since 2019 and Google+ links on their homepage and readme.
I used it for a project recently and found it to be really nice and expressive. I love that it's got a functional feel but you can do loops and compose modules in a really powerful way.
if (some_condition) {
x = 2;
}
x doesn't get set to 2. Or even better, this: x = 2;
echo("x = ", x);
x = 5;
This prints out that x = 5.I work with these kinds of things a lot, having that clear divide between declarative and imperative operations on whatever being expressed isn't only easier to learn and read, it's far more expressive and powerful for complex systems.
I'm just saying its odd behavior makes a lot more sense once you know it's meant to be declarative, and you can make a lot more headway when working with it.
i =0;
for (j = [1:5]){
echo(i);
i=i+1;
}
keeps printing "1" instead of 0 to 4- you can't store objects in variables, so code looks convoluted with deep nesting as you need to apply multiple transforms to objects
- there are no real variables, more like constants that take the value of the last assignment, so you can't do basic stuff like x = min(x, 5)
- you can't access object attributes (size, etc.) so it's not possible to generate features that depend on another object. You always need to have lots of parameters in scope. A simple use case would be to punch 4 holes in the corners of a box cover.
- string functions are very limited, there is only str() to convert a value to string but with no control on the formatting, there is no printf-equivalent
``` module thing(x) { cylinder(r=x,h=10); }
translate([10,0,0]) thing(5); x = min(4,2) + 1; translate([-10,0,0]) thing(x); ```
works for me.
It is very easy to import modules for operations like threaded holes or gear teeth, and it feels very familiar if you are coming from a graphical CAD tool like Inventor or SolidWorks because it follows the same process of generating parts from a nested series of elementary operations. I've never felt frustrated trying to write parts, but to be fair, I also don't use it for serious manufacturing.
https://github.com/farrellm/scad-clj
Haven't tried it but enjoyed this talk (about 3d printing ergonomic keyboards using the above): https://www.youtube.com/watch?v=uk3A41U0iO4
I dream of a day when parametric CAD is bundled with a usable package library. Being able to `import` versioned parts would be a huge upgrade, and would lead to the development of better standard libraries.
There are also some land mines around the rendering process, e.g. shapes that render just fine as a preview, but will crash the CGAL renderer. I’ve also had the opposite happen. It seems like there’s room to add better validation (or maybe a way of automatically simplifying ASTs?) before they hit the renderer.
Also, onshape.com (commercial with hobby free tier) has a scripting interface that i believe is js-like (i have not yet had to use it, but i use onshape quite a bit for hobby projects). Their versioning and importing of community parametric parts is pretty tight imo.
OpenCASCADE (FreeCAD's kernel) is pretty good too.
https://github.com/GilesBathgate/RapCAD
Feature matrix: https://github.com/GilesBathgate/RapCAD/blob/master/doc/feat...
conda install -c dlr-sc pythonocc-core=7.4.0
What does OpenJSCAD used as internal geometric representation?
Is it also exact?
Unfortunately its GitHub is not ... expansive about its innards. It says "this library implements CSG operations on meshes..." which I assume means it is NOT operating on a parametrized boundary representation like the industrial-strength CAD kernels (Parasolid, OpenCASCADE, CGAL).
I would be very careful about using models generated in OpenJSCAD to manufacture anything (this is one area where proper handling of topology and degeneracy is critical).
It looks like several minutes later one of my changes took effect - is the site getting hugged to death? Does parsing and rendering not occur on the client side?