Layers/sublayers/groups and draftview questions/suggestions

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Layers/sublayers/groups and draftview questions/suggestions

Post by paullee »

I have revisited this thread somehow experiencing similar issues :)

dimitar wrote: Wed Mar 02, 2022 8:00 am As for DraftView, I am finding out that even if the Override Style property is set to False, dashed lines appear as solid instead of dashed. I have unset the Line Style property from solid to none. It's string so i just deleted the string Solid. But here is the output
Found this thread and noted Yorik comment on github discussion.

Seem it is something about Edit->Preferences->Draft->Visual settings> but SVG pattern default size nor SVG pattern resolution works, asking Yorik on github.

dimitar wrote: Thu Mar 03, 2022 5:37 pm Filter-based smart groups

I would also like to propose the ability to automatically group elements. We need to have filter-based groups that can take any object property as filter for grouping behavior. Examples could be layer colours, object types (line, wall, curve, slab, etc).
Not sure I understand what you meant, but seems filter is a good idea (instead of attempting to make many groups to house different kinds of objects; bear in mind one object could only be housed in 1 group) :-
- add a Filter attribute in DraftView, and Shape2DView
- so if DraftView/Shape2dView has Filter e.g. set to Window/Door, only these objects get shown in the DraftView/Shape2dView
- now, one can make just 1 group with a few DraftView/Shape2dView, the latter with different Filter to result in different output

Any comments?

Thanks :)




Screenshot from 2022-07-21 00-07-42.png
Screenshot from 2022-07-21 00-07-42.png (105.79 KiB) Viewed 1525 times
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Layers/sublayers/groups and draftview questions/suggestions

Post by thomas-neemann »

paullee wrote: Wed Jul 20, 2022 4:38 pm ...
Any comments?
...
when mainly 2d cad systems were used, you had trouble with something like that.

2.png
2.png (87.03 KiB) Viewed 1487 times

it was a big effort.
now that 3d systems are often used, you have a lot of work with something like that

3.png
3.png (73.72 KiB) Viewed 1487 times
In my opinion, there is no solution for the first case. In the second case I would do it like this:

1.png
1.png (95.42 KiB) Viewed 1487 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Layers/sublayers/groups and draftview questions/suggestions

Post by paullee »

For reference purpose, the parameters to alter to change the scale of Dashed, Dashdot, Dotted, are under Drawing View Line Definitions :D

Make these figures bigger and it appears correct in Techdraw.


Screenshot from 2022-08-07 11-01-15.png
Screenshot from 2022-08-07 11-01-15.png (106.93 KiB) Viewed 1379 times
kpmartin
Posts: 10
Joined: Tue Feb 07, 2023 9:50 pm
Contact:

Re: Layers/sublayers/groups and draftview questions/suggestions

Post by kpmartin »

I also feel that the current system is a mess. You can place a group in a layer, and a layer in a group, and a group in a group, but not a layer (directly) in a layer. There is also the "Layers" collection at the document root level which contains newly-created layers but the layers can be moved out and other drawing objects move in, so this appears to be yet another collection that is neither a layer nor a group.

There is also the further strange behaviour that if you right-click on a group in the combo view and choose Utilities -> Add new named group, the new group contains a reference to the group you clicked on, but that group also still exists in its original place in the tree. This can be verified by adding an object to the group; it will appear in both instances.

If you apply "Add new named group" to (it seems) any other object (including a layer) the object gets moved into the new group and no longer exists in its original location.

So it appears that a group can have multiple references in the doc tree, but to do so you must first place the group in a new group, then move the reference to where you want it, then delete the just-created group.

As an aside, right-clicking on a container in the doc tree and creating a group could reasonably be interpreted as "create a group in the active container containing the selected objects", "create a group in the active container containing new references to the selected objects", or "create an empty group within the selected container" and indeed perhaps all should be available.

I don't know if this is just accidental or deliberate, but I think it should work entirely one way or the other: Either the doc tree is a true tree and each object can only exist in one location therein, or there should be proper support for objects being in several locations. This would include dragging in the tree being either move or make-new-reference depending perhaps on shift/ctrl/ALT state, and allowing non-group objects to have multiple references. The latter does have conceptual issues, though, in particular, how does the layer's "Override Line Color Children" work when an object is not a well-defined child of a particular container? (my preference would be for inheritance to be the choice of the child object, not the container, but that may be beyond the scope of this topic)
-Kevin Martin
the Papertrail Handmade Paper & Book Arts
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Layers/sublayers/groups and draftview questions/suggestions

Post by Roy_043 »

@kpmartin When making such reports you really need to provide your FreeCAD info.

kpmartin wrote: Fri Mar 24, 2023 3:16 pm Either the doc tree is a true tree...
Objects can have multiple occurrences in the tree, but there are certain restrictions. For example in the current version an object can only be part of a single Std_Group.

kpmartin wrote: Fri Mar 24, 2023 3:16 pm the current system is a mess. You can place a group in a layer...
The system is clear enough, and you seem to understand its intended use. But you are right that certain operations should be blocked.

kpmartin wrote: Fri Mar 24, 2023 3:16 pm There is also the further strange behaviour that if you right-click on a group in the combo view and choose Utilities -> Add new named group, the new group contains a reference to the group you clicked on, but that group also still exists in its original place in the tree. This can be verified by adding an object to the group; it will appear in both instances.
I can't reproduce this in the versions mentioned below.

kpmartin wrote: Fri Mar 24, 2023 3:16 pm indeed perhaps all should be available.
Seems over the top to me.

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.2.29177 +426 (Git)
Build type: Release
Branch: (HEAD detached from 0.20.2)
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/United States (en_US) [ OS: Dutch/Netherlands (nl_NL) ]
Installed mods:

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.21.0.32457 (Git)
Build type: Release
Branch: master
Hash: 85216bd12730bbc4c3cbf8f0bc50416ab1556cbb
Python 3.10.9, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US) [ OS: Dutch/Netherlands (nl_NL) ]
Installed mods:
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Layers/sublayers/groups and draftview questions/suggestions

Post by yorik »

Restricting layers to go anywhere else than in the layers container would seem like a good move to me...
Also: should we allow sublayers? That could be awesome, and not hard to code probably, but might loose compatibility with older autocad versions, so might not be that interesting
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Layers/sublayers/groups and draftview questions/suggestions

Post by bernd »

How about get rid of the prints for every layer creation. Msy be move to a log?
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Layers/sublayers/groups and draftview questions/suggestions

Post by yorik »

Yes that's something i'd like to do for all Draft commands. Some centuries ago we invented it would be cool to have the output window behave a bit like the autocad command window, and others took on that idea, but it turns out not being useful at all i think
Post Reply