3D Modelling

john's Avatar

john

31 Jan, 2022 10:06 PM

This thread is a branch from a discussion that started under the General Discussion "Why I Still Care About Nodebox". This first post is a recap of the initial conversation:

Posted by willadams on Jan 28, 2022 @ 07:32 AM

I'd like to use Nodebox, or something like to it --- the thing is, I want to do 3D though.

Right now I'm limping along doing modeling in BlockSCAD and then exporting to OpenSCAD --- the problem is the latter won't write out text files, and what one can capture as a DXF or SVG from it is limited (and STLs won't work for my purposes, since I can't find any CAM tools which will use the tooling which I wish to use efficiently enough).

So, could we connect Nodebox to the kind of 3D modeling which OpenSCAD does?

Once we've done so, could we allow writing out a text file?

Posted by john on Jan 28, 2022 @ 02:53 PM

Hi Willadams,

I assume you can already create 2D shapes in Nodebox and import them as SVGs into OpenSCAD for extrusion, but I gather you want to do more than this.

It's certainly possible to create Nodebox nodes which would draw 2D perspectives of simple 3D objects, but recreating OpenSCAD would be a heavy lift.

What kind of text files do you want to export? Some kind of XML file to drive CAM tools of some sort? I'm not clear what your end goal is and what your proposed workflow would look like.

Nodebox can create drawings and export them as text files. It can certainly be part of an overall workflow. But I'm skeptical that you could stretch it into a usable and efficient one-stop CADCAM tool just by adding nodes. Even if you could do it there would probably be easier ways to accomplish what you want.

Nevertheless I am always happy to explore ideas. If you can describe exactly what kind of text files you want to export maybe Nodebox could help. Feel free to start a separate thread if you'd like to have a conversation about this.

John

Posted by willadams on Jan 30, 2022 @ 06:29 AM

I would like to write out G-Code:

https://en.wikipedia.org/wiki/G-code

but I want to do it in the context of 3D modeling, and using a Node/block editor --- as noted, I'm currently using BlockSCAD:

https://willadams.gitbook.io/design-into-3d/3d-project

and I just find that the most workable way for me to do design work. I suspect I'll have to write my own tool --- we'll see.

  1. Support Staff 1 Posted by john on 31 Jan, 2022 10:26 PM

    john's Avatar

    Willadams,

    I've been thinking about this and learning more about CADCAM and G-Code. I still think writing a general purpose CAD tool that could also export G-code would be challenging to do in a robust, general purpose way. But perhaps it could be done for a special purpose project that only requires a subset of capabilities.

    I am noodling around with a 3D rotation node posted by another Nodebox user, Rioch, back in 2013. I think within a day or so I should be able to craft a simple proof of concept network that allows you to extrude, rotate, place and display simple objects. This would be a subset of what you can do in BlockSCAD or OpenSCAD. I think it might also be possible to import ASCII STL files from BlocksCAD if that would be preferable.

    As for the G-code, it's fairly easy to generate and export a text file in NodeBox. The simplest way would be to render each line of code as a string, combine those strings into a list, put that list in to a one-column table with the first line (e.g. "%") as the header, export the table as a CSV, then change the extension from .CSV to .TXT (or whatever).

    I still don't understand the connection between these two pieces of the puzzle, though. You say you want to generate G-code "in the context of 3D modeling". Does this mean you want to derive coordinates and length measurements from the objects and use these as parameters for individual G-code instructions? Would you also need to model your work path, or parts of your machinery?

    I'll keep working on and post again when I have something worth showing,

    John

  2. 2 Posted by willadams on 31 Jan, 2022 11:28 PM

    willadams's Avatar

    The way I want to do this is:

     - model the stock in 3D
     - model the tool in 3D
     - have code which determines the toolpath of the tool and subtracts it from the stock and writes out the G-Code for that movement

    see:

    https://community.carbide3d.com/t/doing-cam-in-openscad/25214

    The idea is to bypass CAD entirely and do the design as CAM, modeling the tool and toolpath --- that way, one can only design things which can be made on the machine, and conversely, anything which can be made on the machine can be designed --- it's that latter point which is the issue for me currently. I've been designing joinery which I can't find CAM tools which will create toolpaths for.

  3. Support Staff 3 Posted by john on 12 Feb, 2022 01:13 PM

    john's Avatar

    Will,

    Just a quick update in case you are still there...

    I am intrigued by your project and, in spare moments, have taken a deep dive into 3D, CADCAM, etc. I've taught myself rudimentary prospective geometry, learned how to use BlocksCAD and OpenSCAD, downloaded Carbide Create, parsed one of your G code files, read through parts of your website and ebook, learned a bit about rabbet joints and woodworking, sifted through OpenSCAD code on GitHub, learned some 3D modeling techniques like face culling and winding order, and lost myself down more rabbit holes and dead ends than I'd care to admit.

    In parallel, I started noodling around in NodeBox, trying to build a rudimentary 3D modeler - something I've been meaning to do for years now. Lots of fits and starts and a few quick animations just for fun which I posted on Twitter and Instagram:

    https://twitter.com/jcartan/status/1490659354961334275

    https://twitter.com/jcartan/status/1492002282405195776

    I am also thinking about how to create a small library of 3D nodes for my fellow Nodeboxers. This involves coming up with not just individual nodes to accomplish a single project, but a whole interlocking system of ways to construct 3D objects and pass information and orientations from node to node in a generic and robust way. There are many possible systems, each with pros and cons depending on just what kind of 3D work you want to do.

    All the while I go back and forth on the fundamental question: how crazy would it be to do your project in Nodebox?

    As I said at the outset, if you constrain yourself to a small subset of CADCAM capabilities I think you could so something useful using Nodebox. But I'm still not sure Nodebox would be the best tool. You might have to be almost as crazy as me to stretch it far enough to do what you want.

    All of this is to say that I am still working on this, but it may take awhile. As soon as I have something worth playing with I will post it here. So please check back every now and then. Meanwhile, if you are noodling around with Nodebox yourself and get stuck, please feel free to ask me specific questions.

    John

  4. 4 Posted by willadams on 14 Mar, 2022 04:55 PM

    willadams's Avatar

    I think doing the projects I envision in Nodebox should be pretty straight-forward.

    Really, all that's needed for G-Code and CNC is the ability to:

     - model a 3D shape to be the stock (this can be a regular cuboid)
     - model various endmill shapes (all based on symmetrical/rotated a shapes --- a cylinder, a sphere (ideally attached to the bottom of a cylinder) and cones of various angles (again, ideally attached to the bottom of a cylinder)
     - plot the movement of the endmill shapes and remove the hulled shape from the stock
     - the ability to write out code/coordinates so as to make a G-Code file for cutting things out

    I've tried to put everything I envision up at:

    https://willadams.gitbook.io/design-into-3d/

    and one can do some really neat projects using just 2D:

    http://tug.org/TUGboat/tb40-2/tb125adams-3d.pdf

    Let me know when you have something I could experiment with! Really looking forward to it!

  5. 5 Posted by willadams on 16 Mar, 2022 08:39 PM

    willadams's Avatar

    My apologies, I'd thought I had responded here previously.

    The 3D stuff sounds awesome!

    I think the projects I've been working on could be done in NodeBox pretty easily --- I actually used it for a couple of proof of concepts, but had a problem w/ precision which caused me to drop it --- there was one person who used it for a sundial design which was later CNCd.

    All that I want to be able to do is:

     - model a piece of stock
     - model tooling
     - algorithmically describe toolpaths
     - subtract the 3D shape created by the 3D modeled tooling traveling along the toolpaths
     - write out G-Code files w/ coordinates

  6. Support Staff 6 Posted by john on 17 Mar, 2022 06:34 AM

    john's Avatar

    Will,

    Thanks for checking in. I was wondering if you were still there.

    My apologies for the delay. I got distracted and then distracted from my distractions. As soon as I finish the next rev of my library I will get back to me rudimentary 3D modeling nodes.

    I warn you, though, that they will be rudimentary. You could use them to algorithmically make some simple 3D shapes and view them from different perspectives. And you could use those same algorithms to generate some G code.

    But I doubt I will be able to provide any of the 3D set operations (union, difference, intersection, and hull) you would need for the fourth item on your wishlist. Perhaps if your geometry skills are better than mine you can extend my framework to provide those functions yourself.

    Anyway, stay tuned. I really will get back to this interesting challenge.

    John

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

06 Sep, 2023 07:20 AM
05 Sep, 2023 08:40 PM
30 Aug, 2023 03:16 AM
19 Aug, 2023 03:22 AM
29 Jul, 2023 05:52 AM

 

28 Jul, 2023 10:53 PM
23 Jul, 2023 07:04 AM
14 Jul, 2023 03:05 AM
07 Jul, 2023 06:26 AM
05 Jul, 2023 11:44 PM
30 Jun, 2023 12:48 PM