Page 1 of 1

[solved] 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Sun Nov 24, 2019 8:46 am
by MPN
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).

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Sun Nov 24, 2019 8:53 am
by MPN

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Sun Nov 24, 2019 9:04 am
by Husky
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?

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Sun Nov 24, 2019 9:11 am
by MPN
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).

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Sun Nov 24, 2019 9:17 am
by MPN
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.

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Sun Nov 24, 2019 9:26 am
by Husky
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

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Sun Nov 24, 2019 9:42 am
by MPN
I have attached the HatchTesting.dxf in my first post which shows the problem in a simple setup. Thanks

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Sun Nov 24, 2019 9:47 am
by MPN
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.

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Sun Nov 24, 2019 10:35 am
by Husky
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 10631 times

Husky-2019.11.24-02.png
Paper_Space - Scale 1:3
Husky-2019.11.24-02.png (28.31 KiB) Viewed 10631 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.

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Mon Nov 25, 2019 9:11 am
by MPN
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.

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Mon Nov 25, 2019 9:30 am
by Husky
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!

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Mon Nov 25, 2019 9:45 am
by MPN
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.

Re: 3.23.0: Hatch is offset incorrectly in Viewport

Posted: Thu Nov 28, 2019 9:13 am
by MPN
Andrew has fixed this hatch viewport issue in Snapshot 3.23.0.9.

Marking thread as solved.