Exploded Block will switch to original Layer

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

Moderator: andrew

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

Exploded Block will switch to original Layer

Post by Husky » Sun Oct 14, 2018 9:33 pm

Hi,

right now I'm a bit confused and not sure what would be the correct behavior for an exploded block. In my opinion it should be different than that what I experience ...

Case: Blocks created on Layer "0" to be able to adopt the Layer attributes where it is put to. So, my QCAD settings says that if I place a Block (drawn on Layer 0) on a Layer "Hidden" it will take over the Attributes from Layer "Hidden". Works nicely!

But if I explode this Block which is now on Layer "Hidden" it will lose the information from Layer "Hidden" and then switch back to the original Block Layer Attributes which is "0".

I think after an exploding it should stay on the actual layer and loose the Layer "0" Attributes. I'm wrong? Is that intended behavior?
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: Exploded Block will switch to original Layer

Post by andrew » Mon Oct 15, 2018 11:08 am

I'm assuming your file contains a block which contains entities on layer "0". These entities have their attributes set to "By Block".
Your drawing then contains a block reference on layer "Hidden" with attributes "By Layer".

If that's not correct, please attach your file.

When your block reference is rendered and an entity is found with attributes "By Block", the attributes of the block reference are used ("By Layer"). The layer attributes are then used, that's the attributes of layer "Hidden".

As soon as you explode the block reference, that link entity -> block reference -> layer is no longer there. The entity is simply placed on layer "0" (the layer is was always on) with all the consequences that has for attributes, etc.

TSG
Premier Member
Posts: 337
Joined: Thu Oct 08, 2015 9:39 am
Location: Germany

Re: Exploded Block will switch to original Layer

Post by TSG » Mon Oct 15, 2018 1:13 pm

The attached drawing contains 2 layers.
Layer 0 and layer 1.
The inserted block was created on layer 0 with the attributes:
Color: By Layer
Lineweight: By Layer
Linetype: By Layer

and inserted via the library browser on layer 1.
After exploding the block all entities are on layer 0.
That is IMHO not logical.

PS: it doesn't matter how the layer compatibilty in the application preferences is set.
Only when inserting the block it is important how the layer compatibility is set.

Thomas
Attachments
Ventil.dxf
(103.38 KiB) Downloaded 532 times
Ich will nicht streiten. Ich will nur deutlich machen, dass ich Recht habe und DU NICHT.

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

Re: Exploded Block will switch to original Layer

Post by andrew » Mon Oct 15, 2018 1:33 pm

For the explode tool the layer the block reference was inserted to is irrelevant ("layer 1" in your example).

The crucial thing to realize is that every entity (even one residing inside a block) is on a layer (see also Layers, Blocks and Colors). In your example, all lines of block "Magnetventil schliessend" are on layer "0".

After exploding, an entity that was on layer "A" when inside the block is still on layer "A". In other words, the entity it still the same, only its context has changed.

Imagine if after exploding, all entities from the block would end up being on the layer the block reference happened to be on. The block would have been "flattened" to a single layer and all layer information contained in the block would be gone. That is very likely not what a user would expect. However, if you do want that behaviour, you can simply explode and then change the layer of the selection in the property editor.

TSG
Premier Member
Posts: 337
Joined: Thu Oct 08, 2015 9:39 am
Location: Germany

Re: Exploded Block will switch to original Layer

Post by TSG » Mon Oct 15, 2018 2:50 pm

... That is very likely not what a user would expect. However, if you do want that behaviour, you can simply explode and then change the layer of the selection in the property editor.
That’s right. Nothing else to add.

Thomas
Ich will nicht streiten. Ich will nur deutlich machen, dass ich Recht habe und DU NICHT.

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

Re: Exploded Block will switch to original Layer

Post by Husky » Mon Oct 15, 2018 8:06 pm

andrew wrote:
Mon Oct 15, 2018 11:08 am
I'm assuming your file contains a block which contains entities on layer "0". These entities have their attributes set to "By Block".
Your drawing then contains a block reference on layer "Hidden" with attributes "By Layer".

If that's not correct, please attach your file.
No, exactly like TSG's example file. Block drawn on Layer 0, all Attributes controlled by Layer.
TSG wrote:
Mon Oct 15, 2018 1:13 pm
That is IMHO not logical.
Glad to see that I'm not the only one who is confused ... :wink:
andrew wrote:
Mon Oct 15, 2018 1:33 pm
Imagine if after exploding, all entities from the block would end up being on the layer the block reference happened to be on. The block would have been "flattened" to a single layer and all layer information contained in the block would be gone. That is very likely not what a user would expect.
Something doesn't adds up here!
With the setting "Layer 0 behaves differently" I expect that the layer 0 has to adopt the attributes from the layer which is used to put the block on. I use the Layer 0 on purpose to receive this functionality.
If I explode a block which is built with different layer exploding leads NOT to a flattened effect. Every entity will stay on the original layer except layer 0.
If I explode a block which is built only on Layer 0 every entity will be set back to 0 despite the current used layer. So, my design decision to put it e.g. on a hidden layer is overwritten by QCAD. I don't expect something like that!
andrew wrote:
Mon Oct 15, 2018 1:33 pm
However, if you do want that behaviour, you can simply explode and then change the layer of the selection in the property editor.
That isn't that simple! Just imagine you used the Block on e.g. 15 different layer, Select them all together and explode them for what ever reason - that will takes a lot of time to bring each one back on the desired layer ...

My logic in a case like this is that there was a reason why I created a block which is able to adopt the Layer attributes on which one it was placed. I need the information that it is e.g. hidden or not etc. I don't care in that moment what it is: A Block, a polyline, a single entity etc etc. Important is that it is a hidden element and that my decision to place it on that layer will not change.
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

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

Re: Exploded Block will switch to original Layer

Post by andrew » Mon Oct 15, 2018 9:02 pm

I think I understand your point, thanks. This is getting very complex really fast ;)

Post Reply

Return to “QCAD Suggestions and Feedback”