Blocks not rendering on layer with dwg2bmp

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
garciadelcastillo
Active Member
Posts: 28
Joined: Fri May 10, 2019 6:26 pm

Blocks not rendering on layer with dwg2bmp

Post by garciadelcastillo » Wed Jul 17, 2019 9:01 pm

Hi there!

I have the following file, with all the layers active:
2PLUMBING_ground.dwg
(59.88 KiB) Downloaded 456 times
If I render the whole thing (removing hatches and minimizing line weights), it looks like this:
2PLUMBING_ground.dwg.png
2PLUMBING_ground.dwg.png (93.1 KiB) Viewed 5788 times
But now, if I only render the "FURN" layer, I get this:
2PLUMBING_ground.dwg_LAYER_FURN.png
2PLUMBING_ground.dwg_LAYER_FURN.png (6.32 KiB) Viewed 5788 times
Where the furniture objects that are blocks disappear. Additionally, they are not to be found anywhere else on the drawing if I render each other layer individually as well.

My guess is, because the furniture objects belong to the layer "FURN", but because the entities in the block reference belong to the layer "0", the block doesn't render altogether if either of the layers is switched off? Is this the expected behavior, or just a bug? And if this is how it's meant to be, is there any work around it? I am writing batch rasterizing routines, and I notice I lose a lot of information because of this issue.

Thanks a lot, best!

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

Re: Blocks not rendering on layer with dwg2bmp

Post by andrew » Wed Jul 17, 2019 9:06 pm

Yes, it's expected behavior. If only layer "FURN" is rendered, layer "0" is invisible: the contents of the blocks is invisible.
If only layer "0" is rendered, the blocks (block references that are placed on layer "FURN") are invisible.

You can of course render layer "FURN" and layer "0" to work around the issue. However, that means that other entities on layer "0" will also be visible.


You could also try to experiment with the layer 0 compatibility setting. Traditionally, layer "0" behaves differently from other layers and QCAD can emulate this behavior which might be just what you need in this case:

Launch QCAD and change the preference Edit > Application Preferences > Layer > Compatibility > Layer 0 behaves differently
Alternatively, add these lines to QCAD3.ini:

Code: Select all

[LayerCompatibility]
Layer0=Compatibility

garciadelcastillo
Active Member
Posts: 28
Joined: Fri May 10, 2019 6:26 pm

Re: Blocks not rendering on layer with dwg2bmp

Post by garciadelcastillo » Wed Jul 17, 2019 10:53 pm

Wow, thank you for the quick response andrew, specially given your timezone.

This solution would work for the corner case when content is on layer "0", but we need a more general solution. I have tried exploding the blocks, but I often get entities displaced to 0,0 and messes up the zoom level on rendering...

Any ideas on how we could work around this problem?

Thank you so much!

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

Re: Blocks not rendering on layer with dwg2bmp

Post by andrew » Wed Jul 17, 2019 11:07 pm

Exploding all blocks might be a solution, yes.

Otherwise, you'd be looking at a more custom solution (script) to delete unwanted entities. I can't think of a standard way to hide entities based on that logic (i.e. only hide layer if entity is not in a block).

Post Reply

Return to “QCAD Troubleshooting and Problems”