Sketch attachment and tree view (new concept of sketch groups).

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Sketch attachment and tree view (new concept of sketch groups).

Post by freedman »

My goals: to help my workflow and simplify modeling in PartDesign. Since I'm not a developer I do everything in macros.

The macro; I'm adding one button to create an new sketch with a creation mode (Lock) and the macro will also run/scan periodically to check for alignments.

What happens during the scan of the document; If a sketch has a non-zero AttachmentOffset (X or Y) then a "+" will be added to the front of the name (pic). If a sketch is created using the new Lock mode a "L+" will be added to the name.
A locked sketch can only be created if the prior sketch has a "+" and the new sketch will be created with an identical Support. The macro will scan periodically to verify that a locked sketch has an identical AttachmentOffset (X an Y) to the previous sketch that has the "+".

What I get from this; First, I can see exactly what sketches are not origin based by seeing the "+" as an identifier. Secondly, having the lock feature allows me to have a built-in external geometry location point. The lock guarantees an identical AttachmentOffset for a group of sketches, all based on the first sketch in the group.
In the pic as I scan down I see Sketch001, I know it's off-origin. As I go down further I see Sketch003, It's off-origin also. I see Sketch004 off-origin but I also notice that Sketch005 and Sketch006 are locked so I know they have the same AttachmentOffset as Sketch004.

This allows me to group sketches in specific places, for instance I have an I-beam 10 meters long, I can go to each end and create a set of sketches that are all based on one sketches placement. I can have two groups, one at each end. By using the TIP I can add additional sketches anytime to different sketch groups.
Maybe there is something useful to FreeCAD Master, I never know. It would be nice to have this in code instead of text based.
Attachments
Locked.png
Locked.png (84.49 KiB) Viewed 616 times
Post Reply