Using Manifold-3d npm package from node? #754
Replies: 5 comments 11 replies
-
You and I are well-aligned! First, did you see that ManifoldCAD can export 3MF already in addition to GLB? I wanted that same TS -> 3MF path as you. Also, yes, I can't see why our npm package wouldn't work in nodejs, though I haven't personally tested it. Would love to know what troubles you've had. The main thing I feel ManifoldCAD is lacking is the ability to import libraries (e.g. involute gears, screws, etc) and existing manifold meshes. Of course Manifold is perfectly capable, but the web doesn't have great local file access and I don't feel like setting up a server. I have an idea to package ManifoldCAD into a VSCode extension to make it a lot more powerful (and more discoverable). I'd love to find collaborators for this project and it sounds like you have the right skill set. Let me know if you're interested! |
Beta Was this translation helpful? Give feedback.
-
Oh, actually, our CI runs our npm package's tests in Node, so it definitely works! |
Beta Was this translation helpful? Give feedback.
-
maybe we should convert this to a discussion? |
Beta Was this translation helpful? Give feedback.
-
Wait ... you did 3dBuilder? Wow. A week ago I went on a hunt for the source for that and found the repo internally at work, I was seriously considering seeing if I could hack that to add an OpenSCAD-like (but TypeScript) scripting interface to that. I guess no point in going down that rabbit hole 😄 |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm poking around at this too. What I want and will probably end up with: a model viewer that updates on save from definitions on node. When I have something ergonomic I'll share here |
Beta Was this translation helpful? Give feedback.
-
Is it possible to use the manifold-3d package as part of a nodejs (or Deno) app?
I played around with the package a bit, and didn't really get very far.
I couldn't really even tell if it is possible to run it in node - the typescript typings are fighting me a bit, and before I dove in too deep, I thought I'd see if I'm even in the ballpark.
I really want to be able to make 3d models in TypeScript and then use a CLI to spit out 3MF (or ... STL or something else that the slicer will like)
Background:
My ultimate goal is to be able to construct 3d models for printing. And to have more programmatic control over them than OpenSCAD alone gives me.
I've done a considerable amount of work with OpenSCAD in the past (and, by the way, manifest made that a metric brazillion better!) - but the OpenSCAD syntax has never been my favorite. I poked around looking for a TypeScript/JavaScript front end that would do what I wanted, and found a couple efforts, but wasn't really satisfied with the direction or style. Yeah, I'm picky 😄 (and I really don't much enjoy python, in spite of its many benefits)
So a couple weeks back I started prototyping my own "Tscad" for the hell of it, and made some really good progress, and then I wandered across https://manifoldcad.org/ ... which was surprisingly nice.
I'm not married to outputting OpenSCAD - although, it's pretty solid for so many things. I'm pretty sure that I'd be just as happy using Manifold-3d directly if I could get it to do what I'd like.
And then I think about all the nice libraries from OpenSCAD and either I'd have to implement a transpiler to go from that to TS. Hmm.
thoughts?
Beta Was this translation helpful? Give feedback.
All reactions