[solved] 3.23.0: Hatch is offset incorrectly in Viewport

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
MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

[solved] 3.23.0: Hatch is offset incorrectly in Viewport

Post by MPN » Sun Nov 24, 2019 8:46 am

Hi,
When a hatch have been offset in the Model then it appears incorrectly when rendered in a Viewport. It seems that in Viewports the hatch Origin value is not taken into consideration. This means that when adjusting a hatch in the Model to look correct (align along a line for example). This alignment is off in the Viewport. See the following screenshots of a simple test setup.

Model: Notice the lower left corner where the cursor is. I have aligned the hatch to start at that corner:
Image

Layout with Viewport: Notice the lower left corner that the hatch is not aligned correct.
Image

The hatch properties looks like this:
Image

I have set the Origin to (7,6). But when rendering hatches in the Viewport is seems that the hatch is always rendered starting at (0,0).
Attachments
HatchTesting.dxf
(101.26 KiB) Downloaded 532 times
Last edited by MPN on Thu Nov 28, 2019 9:13 am, edited 1 time in total.

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by MPN » Sun Nov 24, 2019 8:53 am


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

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by Husky » Sun Nov 24, 2019 9:04 am

MPN wrote:
Sun Nov 24, 2019 8:46 am
But when rendering hatches in the Viewport is seems that the hatch is always rendered starting at (0,0).
Correct.
MPN wrote:
Sun Nov 24, 2019 8:46 am
I have aligned the hatch to start at that corner:
How you did that? :wink:

Whats about to do it on the same way in Paper_Space?

Or .... a maybe more common approach: What's about to explode the hatch?
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..."

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by MPN » Sun Nov 24, 2019 9:11 am

Viewports are a 'view' of the Model so I would expect to have the same appearance as in the Model. As with all other elements (lines, dimensions etc).

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by MPN » Sun Nov 24, 2019 9:17 am

Maybe the issue is more clear when showing it with a real world project (and not a simplified example for a bug report):

Model:
Image

Layout:
Image

I would not expect to have to explode hatches to make this work.

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

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by Husky » Sun Nov 24, 2019 9:26 am

MPN wrote:
Sun Nov 24, 2019 9:11 am
Viewports are a 'view' of the Model so I would expect to have the same appearance as in the Model. As with all other elements (lines, dimensions etc).
I understand your point! On the other hand a hatch is normally not used as a precision part of a drawing - it is more or less only an area information.
MPN wrote:
Sun Nov 24, 2019 9:17 am
Maybe the issue is more clear when showing it with a real world project (and not a simplified example for a bug report):
I would not expect to have to explode hatches to make this work.
I see - could you attache an example dxf/dwg. Thanks
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..."

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by MPN » Sun Nov 24, 2019 9:42 am

I have attached the HatchTesting.dxf in my first post which shows the problem in a simple setup. Thanks

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by MPN » Sun Nov 24, 2019 9:47 am

The reason I bring this issue up is that clipping the hatch pattern works correctly in the Viewport, it seems to be a translation of the hatch pattern that is missing.

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

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by Husky » Sun Nov 24, 2019 10:35 am

MPN wrote:
Sun Nov 24, 2019 9:47 am
... it seems to be a translation of the hatch pattern that is missing.
I assume the issue is based in the hatch origin (0,0)

If I place the content of a Viewport on the identical coordinates like what is used in Model_Space, then it looks like this ...

Husky-2019.11.24-01.png
Model_Space - Scale 1:1
Husky-2019.11.24-01.png (42.86 KiB) Viewed 10628 times

Husky-2019.11.24-02.png
Paper_Space - Scale 1:3
Husky-2019.11.24-02.png (28.31 KiB) Viewed 10628 times
... what is perfect but not easy to do. :(

Right now I see only two practical workarounds:
1. explode the hatch,
2. print directly out of Model_Space.
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..."

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by MPN » Mon Nov 25, 2019 9:11 am

After looking more into this issue is seems it is the Viewport’s position that is ignored when transforming the pattern into Viewport space. Note that the Viewport scale is correctly taken into consideration when transforming the hatch pattern from model space to viewport space. See the following gif of the translation issue:

https://i.imgur.com/vD8cOuC.gif

It can be seen that that pattern is always rendered in ‘worldspace’ since the pattern is static (the pattern is not moved when the viewport is moved around). Maybe this info can help pinpoint where the issue is.

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

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by Husky » Mon Nov 25, 2019 9:30 am

MPN wrote:
Mon Nov 25, 2019 9:11 am
Maybe this info can help pinpoint where the issue is.
Sorry, I can't see an issue.
This approach as you want to use the hatching does not make sense to me at all. Maybe somebody else is more helpful to you.

Good luck!
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..."

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by MPN » Mon Nov 25, 2019 9:45 am

Husky wrote:
Mon Nov 25, 2019 9:30 am
Maybe somebody else is more helpful to you.
I will use your workaround of exploding the hatch until this gets fixed. Thank you for your input.

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Post by MPN » Thu Nov 28, 2019 9:13 am

Andrew has fixed this hatch viewport issue in Snapshot 3.23.0.9.

Marking thread as solved.

Post Reply

Return to “QCAD Troubleshooting and Problems”