Hierarchical layer list

Please use this forum to post feedback and suggestions related to QCAD.

Moderator: andrew

Post Reply
User avatar
J-J
Moderator
Posts: 502
Joined: Tue Mar 24, 2009 9:48 pm

Hierarchical layer list

Post by J-J » Wed Nov 13, 2013 9:40 pm

I just installed 3.4.3 and activated the hierarchical layer list. I really think it is a nice addition and the new presentation is quite neat and ergonomic: I like the way you moved the "eye" and the "lock" to the other side, now I won't click the lock accidentally...
Thanks for all that, keep-up the good work
JJ Win7 pro-64

User avatar
andrew
Site Admin
Posts: 9036
Joined: Fri Mar 30, 2007 6:07 am

Re: Hierarchical layer list

Post by andrew » Wed Nov 13, 2013 10:00 pm

Thanks for the encouragement!

I'm glad you like the new layer list. Please let me know if you experience any problems with it.
Otherwise, this will likely be the new default layer list for one of the next releases.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Hierarchical layer list

Post by Husky » Wed Nov 13, 2013 10:26 pm

I agree with J-J ... yes, really nice additions! :D :D :D

But please allow me a question :oops:

Right now the tool "Purge unused layers" will not work if we have an empty layer between used layers. Is it possible to get a "Purge unused layers" tool which will also work in that particular scenario?

User avatar
Clive
Moderator
Posts: 1329
Joined: Thu Aug 25, 2011 9:28 pm
Location: UK

Re: Hierarchical layer list

Post by Clive » Thu Nov 14, 2013 10:13 am

Husky wrote:Right now the tool "Purge unused layers" will not work if we have an empty layer between used layers. Is it possible to get a "Purge unused layers" tool which will also work in that particular scenario?
Hi Husky, On my simple test it works!

1. 1 Parent layer set up 'Draw' and sub-layers - Draw 1, Draw 2 and Draw 3. Rectangle drawn on each layer except layer 'Draw 1'.
Purge layers 1.png
Purge layers 1.png (12.07 KiB) Viewed 18135 times
2. Layer > Purge Unused layers (YP). Unused layer 'Draw 1' deleted 8) .
Purge layers 2.png
Purge layers 2.png (9.06 KiB) Viewed 18135 times
So it works for me. maybe your scenario is different, please explain or attach a test case here.

Regards...Clive
For the best support please state your operating system, QCAD version and add any supporting DXF/DWG files, screenshots etc...

User avatar
J-J
Moderator
Posts: 502
Joined: Tue Mar 24, 2009 9:48 pm

Re: Hierarchical layer list

Post by J-J » Thu Nov 14, 2013 10:35 am

Hi Guys,
I confirm Clive's results, only parent layer, even if empty is not deleted, which is normal.
JJ Win7 pro-64

User avatar
andrew
Site Admin
Posts: 9036
Joined: Fri Mar 30, 2007 6:07 am

Re: Hierarchical layer list

Post by andrew » Thu Nov 14, 2013 12:51 pm

J-J wrote:only parent layer, even if empty is not deleted, which is normal.
Yes, that is expected behavior indeed. In fact, parent layers are quite often empty.

Husky: if you meant that, consider this example layer structure (attached image).
Layer 'walls', 'interior' and 'exterior' are likely empty. All walls are likely constructed on layers 'walls ... interior ... 20cm', 'walls ... interior ... 12cm', etc.

However, the purge tool should never delete layers 'walls', 'interior' and 'exterior' as long as there are non-empty sub-layers.
One could also say that if a layer has sub-layers which are being used, the layer itself is also used (indirectly).
Attachments
hierarchical_layers2.png
hierarchical_layers2.png (16.33 KiB) Viewed 18546 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Hierarchical layer list

Post by Husky » Thu Nov 14, 2013 7:31 pm

andrew wrote:However, the purge tool should never delete layers 'walls', 'interior' and 'exterior' as long as there are non-empty sub-layers.
One could also say that if a layer has sub-layers which are being used, the layer itself is also used (indirectly).
Yep - considered from this angle - it makes sense! Thanks guys!

khad
Newbie Member
Posts: 9
Joined: Wed Nov 06, 2013 12:28 pm

Re: Hierarchical layer list

Post by khad » Wed Dec 04, 2013 4:56 pm

Just enabled hierarchical layers, and the feature looks really nice so far... I especially like the name-based approach. I wrote a small tool for ACADr12 ages ago, which followed the same path (see pic). Of course, the integration in qcad is much more elegant than my old lisp script was, but it had a feature that I would really love to see:
The hierarchy was not based on a fixed delimiter (is " ... " borrowed form somewhere?), but configurable to a certain extent (I used a choice of "|, _,-,$" ), to cope mainly with xrefs and naming schemes like AIA and the like.
Better still would be to allow the delimiter to be freely specified (e.g., bound xrefs would require somenthing like "$0$").
Any chance to see this?
Attachments
ddltool.png
ddltool.png (7.48 KiB) Viewed 18423 times

User avatar
andrew
Site Admin
Posts: 9036
Joined: Fri Mar 30, 2007 6:07 am

Re: Hierarchical layer list

Post by andrew » Wed Dec 04, 2013 6:01 pm

I had actually considered a configurable delimiter at one point.

"..." was chosen for two reasons:
- the visual appearance is acceptable in other contexts than the layer list (e.g. in combo boxes, as plain text, etc)
- it's unlikely to appear in existing drawings (much more unlikely than single characters such as '|' or '-')

A configurable delimiter has the disadvantage that a DXF file with hierarchical layers produced by user A will not show hierarchical layers for user B. By enforcing one approach for QCAD files, hierarchical layers are at least compatible among QCAD users. Users of other CAD systems will simply see a flat list of layers containing '...' as delimiters.

How about a conversion / import tool instead?
Something like 'make my layer list hierarchical, based on the assumption that I have used '|' (or any other sequence of characters) as delimiter'?

khad
Newbie Member
Posts: 9
Joined: Wed Nov 06, 2013 12:28 pm

Re: Hierarchical layer list

Post by khad » Wed Dec 04, 2013 10:45 pm

Well, I see...
If the purpose is to give QCAD a unique way to create a layer tree, with minimal risk of perturbation and with the inner workings mostly hidden from the users, this makes sense (" . " would probably have been enough, though - I did not encounter this in layer names in 25 years, and it would look nicer when opened in other programs).
My approach was rather to have a versatile sorting filter to deal with all kind of (mostly xref) drawings. One of the wilder ideas I didn't implement anymore was an option to revert the token order, so that e.g. A-WALL-PATT would then be sorted as PATT-WALL-A. Probably too nerdy, I know.

User avatar
andrew
Site Admin
Posts: 9036
Joined: Fri Mar 30, 2007 6:07 am

Re: Hierarchical layer list

Post by andrew » Thu Mar 10, 2016 1:32 pm

dfriasb: your new and not directly related question was split into a new topic at: viewtopic.php?f=33&t=4053

Post Reply

Return to “QCAD Suggestions and Feedback”