Feature request: Layers on Sketcher

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!
Smiling_user
Posts: 173
Joined: Tue Jul 28, 2020 7:31 am

Re: Feature request: Layers on Sketcher

Postby Smiling_user » Wed Sep 09, 2020 12:26 pm

My vote for kind of mechanism resembling layers...
Here is a long thinking path, so try reading the Proposed solution at the end...
The main use of them is to save the time:
-- decompose a huge solver's equation onto smaller
-- avoid preparing jobs like reference DatumPlanes
-- avoid binding jobs by importing external geometry

But also the problems that might come up:
-- if there is an "import" link from one layer to another and the original of imported element is deleted: what happens with the dependant line?

So on implementing layering, might imagine:
-- solver toggle control
-- a specific naming mechanism
-- line replace tool (to auto-re-aplly constraints to a new element) etc.

Might be an easier solution (from the view to simplify solving) to implement groups in the sketcher
And a control to perform solving on all groups or just on a selected group.
( groups can be hidden, shown, toggled sketch/construction state,
imported as ShapeBinders to other bodies
(??changed inner/outer display colour), )
There would be a TotalSketchGroup, and a tree of sub groups.
Groups might be fixed - thus excluded from recalculation.
The same functionality is applecable to Layers. Layers would serve as grouping container.

UseCase:
No building a fence. With multiple vertical rods. Each rod must be positioned. and Guide line requires 3 constraints + 6 contraints for guide
Having 50 rods on one section it comes to 450 constraints. It slows down the modelling.
Just before reading this topic - have come to the solution to split in "pseudo-layers" - multiple sketches.
It gave me two sketches(SkB and SkC) (instead of one possible) dependant on the third (SkA)
So on each change of the SkA I have to correct two sketches (open-edit-close)*2.

The opposite, what is also mentioned here - if there happens destruction of the sketch SkC - due to changes in the SkB - possible to delete SkC and make it again. While if it was one single sketch - it would break in whole (?). And would be a need to re-make all the "layers".

Proposed solution:

So maybe the solution would be to implement a "outer layering" - attach sketch to sketch?
And make it possible to switch between sketches trough TreeView without closing one sketch and opening another?
Seems the only advantage of layering is: easy switching between editing of different features.

So... the grouping element for sketches would be a SketchGroupDatumPlane. And all sketches attached to it are editable like layers with easier switching between them?



##Addition:
After reading some more in this topic, it seems that groups (maybe even not layers) would be more efficient and useful to limit the area of equation for the solver.
And also looks nice to combine the "outer-layering" and internal grouping mechanisms - these would complement each to another.
And this would involve mainly the TreeView programming
TreeView
...Group_DatumPlane
\\Sketch_MainFrame
\\Sketch_InnerFrame
\\ \\ ExternalGroup:= MainFrame
\\ \\ Group_InnerFrameOffsetConstructional
\\ \\ Group_InnerFrame
\\ Sketch_OrnamentFrames
\\ \\ ExternalGroup:= ImportInnerFrame
\\ \\ Group_OrnamentFramesConstructional
\\ \\ Group_OrnamentFrames
\\ \\ Group_Ornament_1_Elements
\\ \\ Group_Ornament_2_Elements
.................................................
\\ \\ Group_Ornament_N_Elements


##Addition 2
After having the A2Plus freezed ( no conflicts found, but no solving happens on applied constraints)
And not possible to locate the problem - seems that in-file/in-object module-limited solving would be useful all-around the FC.
Last edited by Smiling_user on Wed Sep 09, 2020 12:55 pm, edited 2 times in total.
drmacro
Posts: 1968
Joined: Sun Mar 02, 2014 4:35 pm

Re: Feature request: Layers on Sketcher

Postby drmacro » Wed Sep 09, 2020 12:48 pm

Seems this is just a way of thinking inside the boxes of previously used cad programs.

Sketches should be as simple as possible.

Create a new, sketch and give it a line color, use space bar to toggle hide/unhide.

If you insist, hit F2 and rename it Layer001. ;)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."

My beginners, written treatise: Learning FreeCAD
Smiling_user
Posts: 173
Joined: Tue Jul 28, 2020 7:31 am

Re: Feature request: Layers on Sketcher

Postby Smiling_user » Wed Sep 09, 2020 1:04 pm

WMayer, this is definitely the way of thinking!

Naming-renaming is "Yes, of course".
And CAD stands for Computer Assisted Decisign.
I'd prefer that binding, referencing(and naming) of multiple elements would be done by machine, where my attention is not required.

And this thinking does not look like "rare-individual" but one of the general ones: when debugging people prefer not to deal with the whole project, but extract certain part of code to a controllable module (module, Class, function), make an interface and test that code locally against most possible inputs /outputs.

Maybe you prefer the same, don't you?

And another thing: you mentioned the previous experience on CAD programs... Me - do not have the one.
But still... Is the FC concept different? Any explanation, please?
Maybe all my headaches come from this?

With respect
S._u.
cron