Close

[T] Bullet-based CAD

A project log for enSweepen [gd0096]

Procedural and parametric, node-based CAD for 3D modelling with sketches.

kelvinakelvinA 08/16/2022 at 07:591 Comment

I just got an idea. I've been thinking about Fornjot-developer's stance on code-based CAD and I saw the appeal in everything (like git versioning and vast text editor options) except the code. Now I'm thinking that I just need to think differently on how the "code" is layed out. With bullet points, I can visualise a solution that works like the node-based solution, just in raw text. It's like the merge of HTML, the "with" keyword from Visual Basic, indentation from Python, CLI syntax and a dash of cadquery.

For those unaware, if I recall correctly, the with keyword in VBA went something like this:

with Application.Current()
    .action1
    .action2
end with

 Searches it up...

Yeah something like that.

The reason I prefer this idea to something like codeblocks (think Scratch) is that the path of operations is linear by scrolling down, and features aren't encapsulated inside other features. I'd very much like to be able to use 1 sketch for more than 1 extrude.

CadQuery is pretty cool in that it captures more design intent. The main showcase is with .faces(">Z"), which finds and selects the face of the parent object with the highest Z elevation.

Proposed Example

- Exposurenode in     - CarriageLength = 40     # Exposurenodes are all the things you want to expose to other     # files. "Exposurenode in" works like function arguments for     # the group (each feature bullet is a group, like Timeline or     # Sketch) and "Exposurenode" is the output. The vast majority     # of Exposurenodes don't need to be visible or specified by the     # user. - Timeline MainTimeline

    - Joint Carriage to Rail         - Slider along XZ # Specify if joint type is different from                           # file defaults         - Jointpoint1              - Select centre snap position from <Z face         - Jointpoint2             - Select centre snap position from >Z face - Timeline CreateRail     # This bullet is actually minimised     # Each Timeline is computed from the start at the same time. This     # is why the MainTimeline can reference from Timeline's under it.     # Unless you make a sub-timeline, features under a timeline are     # procedural. You can think of Timeline's more like media tracks     # in video editing software. Want max multithreading? You gotta     # bump those Timeline's up. - Timeline CreateCarriage     - Sketch from XZ Plane         - Centerpoint Rectangle from Origin             # In Fusion, the above would be clicking "Center Rectangle"             # and clicking from the origin. Using "coincident to"             # instead of "from" would apply a constraint to the centre             # of the rectangle.             - Width: 20mm Locked    # Locked = Dimension to this value             - Height: 10mm Locked         - Nonplanar # All sketch entities that you don't                     # want auto planar constraints             - Line                 - Set as Guide Rail # This is for the sweep             - Coincident Line01 Startpoint to Origin             - Perpendicular Line01 to XZ plane             - Dimension Line01 to CarriageLength mm     - Sweep Sketch01     - Make Body01 into Component called Carriage

Discussions

kelvinA wrote 08/17/2022 at 22:51 point

Some more thoughts:

- Exposure Nodes are technically before and after every feature. "Exposure Node" -> "exposurenode" -> "en" -> BAM I've just justified the en's in the project name enSweepen. I wonder if I should use en-Sweep-en in branding to further exemplify this fundamental principle. I've always imagined those - signs in the name anyway before this realisation.

- A "Note" keyword is a "Note" node for enSweepen. This is for multiline comments. In enSweepen, # comments would be more like tooltips. 

  Are you sure? yes | no