Hatches are incorrect when loading DWGs (not being saved?)

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 Operating system, QCAD version
Attach Drawing files, Screenshots
Post Reply
User avatar
lphilpot
Full Member
Posts: 74
Joined: Mon Oct 30, 2017 4:03 am
Location: Deep South USA

Hatches are incorrect when loading DWGs (not being saved?)

Post by lphilpot » Thu Jan 11, 2018 4:41 am

QCAD Pro 3.19.2, Xubuntu Linux 64-bit

I made up a simple little title block with the CE and saved it as a DXF. It includes the QCAD logo, where QCAD.org is constructed from hatched (solid fill) geometry rather than simple lines. I later added a projection symbol with QCAD Pro (that edit has nothing to do with this issue) and saved it as a 2018 DWG. It looks like this on the original DXF:

Image

When I load the DWG (2018 or 2013, same results), I get this:

Image

I can re-do the hatch, but upon re-loading, it's wrong again. Looking back through the command line history, there are several errors like this:

Code: Select all

Exception occurred. Entity NOT saved: 22e
...or another hex value, which is the handle of the hatch.

Any idea why it's not saving the hatch?

I've attached the DXF and DWG drawings.

Thanks.
Attachments
_title_block_US_ltr_P-1.dxf
(80.45 KiB) Downloaded 33 times
_title_block_US_ltr_P-1.dwg
(26.3 KiB) Downloaded 28 times
Len
----------------------------------------
QCAD Pro on Xubuntu Linux (usually)

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

Re: Hatches are incorrect when loading DWGs (not being saved?)

Post by Husky » Thu Jan 11, 2018 5:14 am

The outline for the hatch isn't clean - it has gaps. Yes, it will work in certain circumstances but has problems if you play around with it like modifications or different formats. This screenshot is your "working" dxf - I just scaled the logo and it already failt.
Husky-2018.01.10-03.png
Husky-2018.01.10-03.png (28.2 KiB) Viewed 1251 times
Please check and correct the contur for the hatch. I'm sure that is all what it takes.
Work smart, not hard: QCad Pro

User avatar
lphilpot
Full Member
Posts: 74
Joined: Mon Oct 30, 2017 4:03 am
Location: Deep South USA

Re: Hatches are incorrect when loading DWGs (not being saved?)

Post by lphilpot » Thu Jan 11, 2018 5:25 am

I'll take a look. What's strange is that when I created the logo, all the endpoints were snapped to each other. That's why I didn't suspect that as the cause (and also that it does hatch successfully, it just won't save).

Oh well...

Thanks.
Len
----------------------------------------
QCAD Pro on Xubuntu Linux (usually)

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

Re: Hatches are incorrect when loading DWGs (not being saved?)

Post by Husky » Thu Jan 11, 2018 5:40 am

Think about to use the "Round" tool to get a perfect closed outline. :wink:
Work smart, not hard: QCad Pro

User avatar
lphilpot
Full Member
Posts: 74
Joined: Mon Oct 30, 2017 4:03 am
Location: Deep South USA

Re: Hatches are incorrect when loading DWGs (not being saved?)

Post by lphilpot » Thu Jan 11, 2018 3:03 pm

I hear you, but logically if two endpoints snap together, "together" should imply the same exact coordinates regardless of scale, or anything else for that matter. I realize in a a programming context, 'exact' is rarely exact (floating point imprecision and all that), but... I don't know how Andrew is handling that (are unsigned longs large enough?), but the process of snapping seems to me that imply that the 'moving' endpoints coordinates are assigned the exact same value as the static endpoint, hence the 'snap'. So it's strange -- to me at least -- that two endpoints snapped together can later 'degrade' to where they're n longer at the same location, apparently. If it was exact enough for hatching to work initially, what caused it to later be too inexact? Limitations of the file format (surely not)?

At any rate, I'll take a (very) close look and see what happens. :wink:
Len
----------------------------------------
QCAD Pro on Xubuntu Linux (usually)

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

Re: Hatches are incorrect when loading DWGs (not being saved?)

Post by andrew » Thu Jan 11, 2018 3:10 pm

lphilpot wrote:So it's strange -- to me at least -- that two endpoints snapped together can later 'degrade' to where they're n longer at the same location, apparently.
Yes, if endpoints are properly snapped / trimmed that would be the case.
lphilpot wrote:If it was exact enough for hatching to work initially, what caused it to later be too inexact? Limitations of the file format (surely not)?
Yes, that's most likely exactly what the problem was: QCAD is apparently a bit more tolerant when bridging small gaps, whereas Teigha and the DXF/DWG format refuse to bridge those same gaps. However, if outlines are snapped / trimmed properly, both should be happy. One way to ensure that an outline always stays closed is to convert that outline into a closed polyline. Closed polylines form by definition a closed loop without gaps.

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

Re: Hatches are incorrect when loading DWGs (not being saved?)

Post by andrew » Thu Jan 11, 2018 3:16 pm

Quick fix:
- Delete all fills
- Select all outlines of the letters
- Draw > Polyline > Create from Selected Entities
- Create hatch from polyline outlines

User avatar
lphilpot
Full Member
Posts: 74
Joined: Mon Oct 30, 2017 4:03 am
Location: Deep South USA

Re: Hatches are incorrect when loading DWGs (not being saved?)

Post by lphilpot » Fri Jan 12, 2018 4:55 am

I was still getting one segment that was wrong and caused the hatch not to save. I exploded everything, created polylines one letter at time, rehatched and it saved/reloaded properly.

Thanks.
Len
----------------------------------------
QCAD Pro on Xubuntu Linux (usually)

Post Reply

Return to “QCAD Troubleshooting and Problems”