Strange things happening with blocks in file

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

Strange things happening with blocks in file

Post by garciadelcastillo » Thu Jun 06, 2019 7:31 pm

Hi there,

Problem: I am running into a strange problem with some block references in a reduced number of cad files being rendered in strange places.

Description: I have a routine that batch-rasterizes cad files. The script relies on "dwg2bmp" with the "-zoom-all" argument. However, I started noticing that for some files, the zoom all option zoom out too much to objects that didn't seem to be on the drawing.

For example, for the following file:
family_house_2_first.dwg
(220.19 KiB) Downloaded 525 times


I get a rasterized image like this:
family_house_2_first.dwg.png
family_house_2_first.dwg.png (6.95 KiB) Viewed 6861 times
If I open the file in a different software and "zoom all", I get everything in the right place:
JLX_2019-06-06_14-11-49_ADSKMAC.png
JLX_2019-06-06_14-11-49_ADSKMAC.png (62.43 KiB) Viewed 6861 times
However, when I open the same file with the QCAD GUI (no zoom all), I get this:
JLX_2019-06-06_14-11-02_ADSKMAC.png
JLX_2019-06-06_14-11-02_ADSKMAC.png (40.33 KiB) Viewed 6861 times
Notice that in the QCAD version, the chair and computer on the desk of the lower right corner of room 210 are missing. On zoom all, I get the same view bounding box as in the rasterization process:
JLX_2019-06-06_14-20-07_ADSKMAC.png
JLX_2019-06-06_14-20-07_ADSKMAC.png (4.97 KiB) Viewed 6861 times
Now, if I zoom on the brown dot at the bottom, the missing chair is there:
JLX_2019-06-06_14-20-19_ADSKMAC.png
JLX_2019-06-06_14-20-19_ADSKMAC.png (7.37 KiB) Viewed 6861 times
But if I try to select it and zoom out, the selection box is offset by +3000 units!
JLX_2019-06-06_14-20-37_ADSKMAC.png
JLX_2019-06-06_14-20-37_ADSKMAC.png (101.41 KiB) Viewed 6861 times
The missing laptop (part of the same block) is to be found on the top part of the drawing, but this one doesn't allow to be selected:
JLX_2019-06-06_14-21-15_ADSKMAC.png
JLX_2019-06-06_14-21-15_ADSKMAC.png (85.51 KiB) Viewed 6861 times
So, I guess my question is if you think this is a problem with the files or with the way QCAD renders these strange blocks. This problem doesn't seem to appear when opening the files with other software.

Here is a collection of other files that have similar issues:
badZoom.zip
(6.93 MiB) Downloaded 557 times
Thank you so much in advance! :)

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

Re: Strange things happening with blocks in file

Post by andrew » Thu Jun 06, 2019 8:47 pm

These blocks use block transforms (a transformation matrix for block references). This is currently not supported by QCAD as it seems to be a rather uncommon feature of the DXF/DWG formats.

I've added a feature request at:
https://qcad.org/bugtracker/index.php?d ... sk_id=1895

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

Re: Strange things happening with blocks in file

Post by garciadelcastillo » Thu Jun 06, 2019 9:08 pm

Thank you andrew!

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

Re: Strange things happening with blocks in file

Post by garciadelcastillo » Mon Jun 10, 2019 6:04 pm

Hi Andrew,

Is there any way to detect which blocks use block transforms from the ECMAScript API? While the FR goes through, I would like at least to be able to remove those blocks from the drawing prior to rasterizing them.

Thanks!

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

Re: Strange things happening with blocks in file

Post by andrew » Tue Jun 11, 2019 9:12 am

Unfortunately not. QCAD does not import such transformation matrices at all.

Post Reply

Return to “QCAD Troubleshooting and Problems”