Not sure if I this is a bug or a feature. I used V3 RC5 for this.
A block created in a layer
- will keep the layercolor if copied or moved to an other layer even if property color is set to 'By Layer'
- will be subject to the invisible property of the layer its was created in and the layer it was copied to
Is such behavior features or bugs?
Steps to reproduce:
I created a layer 'Hilfekonstruktion' and set the layer color to yellow.
- designed in this layer a rectangle consisting of 4 lines.
- as I needed several copies of it I decided to join them in a block.
- the lines color was set to 'By Layer'
Created two more layers. 'Varainte 1' color green and 'Varainte 2' color light blue.
Copied the block (with reference) in layer 'Hilfskonstruktion' and pasted it in Layer 'Varainte 1'
- was astonished to see block in yellow
Cut the block (with reference) in layer 'Hilfskonstruktion' and pasted it in Layer 'Varainte 2'
- again did see it in yellow.
First I thought, the blocks had not been moved to 'Varainte 1' and 'Varainte 2'. But now I do have the following behavior. But if I hide the layers in 'Layer List' I get the following behavior:
- if I set 'Hilfskonstruktion' to invisible all blocks disappear. So I set 'Hilfskonstruktion' back to visible
- if I set 'Varainte 1' to invisible the blocks in just this layer disappear
- if I set 'Varainte 2' to invisible the blocks in just this layer disappear
Further:
I then saved the file. When I reopened it the blocks still showed the same behavior. And there was even an additional Layer named 'Defpoints'! I'm pretty sure I did not create it...
Moving a block between Layers - bug or feature?
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Moving a block between Layers - bug or feature?
- Attachments
-
- Plan 1.dxf
- (56.34 KiB) Downloaded 434 times
Re: Moving a block between Layers - bug or feature?
First some necessary definitions:
- A block is the definition of a block (= a named group)
- A block reference is constructed when inserting a block.
- Each entity (line, arc, etc.) is on exactly one layer. This is also true for entities that are part of a block definition.
- Each block reference is also an entity and as such is also on exactly one layer.
This is not only desired but essential for many applications (blocks and layers are different concepts - a block can be seen as a named group, a layer is NOT a group, it's an attribute of an entity).
If you want the color of an entity inside a block definition to be defined by the layer of the block reference, set the color of the entity to 'ByBlock' and the color of the block reference to 'ByLayer'.
- A block is the definition of a block (= a named group)
- A block reference is constructed when inserting a block.
This is a very common misunderstanding of the underlying CAD data structure.TerraD wrote:A block created in a layer
- will keep the layercolor if copied or moved to an other layer even if property color is set to 'By Layer'
- will be subject to the invisible property of the layer its was created in and the layer it was copied to
- Each entity (line, arc, etc.) is on exactly one layer. This is also true for entities that are part of a block definition.
- Each block reference is also an entity and as such is also on exactly one layer.
This is not only desired but essential for many applications (blocks and layers are different concepts - a block can be seen as a named group, a layer is NOT a group, it's an attribute of an entity).
If you want the color of an entity inside a block definition to be defined by the layer of the block reference, set the color of the entity to 'ByBlock' and the color of the block reference to 'ByLayer'.
Defpoints is required by the DXF/DWG format under some circumstances. Other CAD applications such as Autocad require that layer. You can simply ignore it. If you delete it, it will be back after saving / reopening.TerraD wrote:Further:
I then saved the file. When I reopened it the blocks still showed the same behavior. And there was even an additional Layer named 'Defpoints'! I'm pretty sure I did not create it...
Re: Moving a block between Layers - bug or feature?
Thank you. Got the idea!If you want the color of an entity inside a block definition to be defined by the layer of the block reference, set the color of the entity to 'ByBlock' and the color of the block reference to 'ByLayer'.
Hmmm, should have searched wit google... Defpoints is not part of help nor of the V2.2 manual... Thank you for your support!Defpoints is required by the DXF/DWG format under some circumstances. Other CAD applications such as ...