News:

Please note new Forum URL: forum.designcad.com

Main Menu
DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Scrambled hatches

Started by adriank, March 26, 2010, 05:14:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Adrian 2.0

I have been working on some details on a job the last couple of weeks. As a habit when I change the drawing I save a new file & somehow between the first drawing & the latest update my hatch pattern for 'woodgrain' has been scrambled. I have no idea what I have added, or removed or done to make this happen.
I have seen this in the past on some hatch types - notably 'rocky earth' tends to fall apart the same way but it's never started OK then broken up in the same drawing before.

If I copy & paste the old hatch to the new drawing it scrambles & if I copy the new hatch to the old drawing it corrects itself.
Does anyone know what might cause it?

magic

Hi adrian,

Off hand, I think you've gotten two hatches on top of each other in the bottom one, but how you've gotten it that way, I don't know.
It's a kind of magic!




Rob S


Odd indeed.  Would this be happening using V20?  Seems we keep discovering new features  ;D

Has the new drawing been viewed in 3D by any chance or maybe had its working plane changed?

Are you able to post a section of the new drawing for us to take a look at?

User since forever

Adrian 2.0

Rob,
I can do better than that!
I took the file & started to delete everything, checking if it fixed the issue - I got down to just the hatch & it's still scrambled.
Started adding other hatch patterns & they are all the same.
I also noticed that they even display scrambled in the preview window (check the screenshot)

This is version 20, but I have seen it before - on 18 or 19 I think.

Other observations - some hatches preview scrambled, but actually hatch OK. If I delete everything & then hatch, it is still scrambled. If I copy any of the scrambled hatches to a new file via the clipboard they come out OK.

Magic, this is definately not overlaid hatches, not pretty either.
I know I can copy it all to a new file & rename all the layers but that doesn't help when I first noticed it while showing a client my printed drawings!

Adrian 2.0

Sorry Rob, didn't answer all the questions.
The file may have been toggled into 3D - I built a 3D off some of the components - but I have not worked it in 3D & I haven't changed the working plane.
I have exported a copy to DWG, could that have done something?

You can see on the screenshot that the top right corner min/max/close buttons are missing - we previously worked out that happens when unused blocks are in memory - so I purged and saved. That got my buttons back, but did not fix the bug.

Rob S

The solution is easy. I noticed you had very large co-ordinate figures. 

I just reset the origin (point menu,halfway down)  to a point closer to your drawing area, and everything displays normally

It seems your very large co-ordinates are confusing the hatch rendering mechanism, which I would consider to be a BUG.
User since forever

Adrian 2.0

Rob, you are a genius. I would like to know what threw the origin so far off - I just checked an early version of the same file & the origin was onscreen at fit to window, so don't know what moved it - not me anyway.

As you said, it has to be a bug - the preview is also affected. whatever would I do if i wanted to draw a map of USA & render it?

Rob S

User since forever

Dempsey

It rings a bell those large coordinates. Someone had a curve disappearing as a results of drawing a curve in a straight X or Y line; see http://forum.designcad.com/index.php?topic=2400.0

Adriank, does your drawing have a curve that is absolutely straight in either the X of Y direction?
Dempsey

Adrian 2.0

Dempsey,
I don't have any curves / splines in the drawing, but it is possible that I had at some point & they have been deleted. I tried drawing a straight X axis curve on the original file & saving it but it did not affect anything.
The origin had been moved 301,370 units in the X axis, 194,623 units in the Y axis, and I don't know why.

Occasionally I need to dimension setout plans for surveyors based on northings & eastings in UTM47 (Thailand's default) and to do that I set the origin at 0 and the project datum at it's surveyed coordinate - typically East 44X,XXX.XX and North 89X,XXX.XX in this area.
This bug would mean I cannot hatch that drawing?

It seems to me that Designcad assumes the origin should be onscreen somewhere, and it therefore thinks the hatch pattern is ridiculously small & gives up?

Dr PR

We had a problem in V20 beta testing where the drawing had two origins. It seems that there is the original origin that the program puts in a blank file, and a new user-defined origin set with the "Point/Origin" command. Some commands used the original origin and others used the new user-defined origin. It was as if the program always actually used the original drawing origin, and the user-defined origin was just used as an XYZ offset for coordinate display. Wonder if this has resurfaced?
DesignCAD user since 1987

Adrian 2.0

I have been playing with how far the origin has to move before it becomes a problem.
I drew a box 10 units square & hatched it (rocky earth).
Set the origin lower left corner, copied the hatch & vector converted the copy to preserve it.
I then outlined the box by 1,000 - 10,000 - 100,000 - 200,000 - 300,000 - 500,000 - 1,000,000 & 10,000,000 units.
I progressively moved the origin to the bottom left corner of each outlined box, copying & vectoring the hatch each time (changing the colour to identify it)
I then spread them out to study the differences. Two major points are apparent.

1. The origin of the hatch pattern is the drawing origin, so when yo move the origin the hatch pattern moves within the boundary of the hatch BUT the new position will not display until you save, close & re-open the file.

2. The degeneration of the hatch pattern gets progressively worse as you move the origin further away from origin - it is NOT correct up to a certain point & then changed to a new pattern. Even moving the origin from the lower left to the centre of the pattern makes a difference to it (there is a small tickmark between the 'rocks' that moves in relation to the adjoining rocks)

I made another startling discovery.
If I offset the origin 100,000,000 units the display will not fit to window properly, it jumps around to a new location every time I press fit to window shortcut key. If I move it further still away (500,000,000 units) the drawing disappears completely & will not display - a blank screen that does not even show selected points when I tried 'select all'. If I try to snap to an element the cursor disappears offscreen.
Because this problem will not display until you save & close a file you won't know about it until you re-open the drawing & it appears to be empty.
I have seen this on files before, and I know I've read about others with the same problem on the forum.
There is a fix - select 'point/origin' & right-click anywhere onscreen. The cursor will disappear but it has set the new origin on an entity of the drawing - you have to save the file, close it & re-open it before the drawing will display again, then you need to re set the origin where you want it.

Adrian 2.0

I meant to attach the screen capture, & posted the DCD file instead. I had saved that just after making my startling discovery, so you will need to 'fit to window' so see it after you open it.

Rob S

Interesting I'm finding that this problem of scrambling hatches too far from the origin already existed in V15, and to my knowledge no one has ever reported it before.

What I don't know is if whatever shifted your original origin is a new issue or not.

Most definitely, if the origin shifts too far, you can lose precision in a drawing, because most of the available digits are already used up, but this should not have a noticeable effect until much larger numbers.
User since forever

Dr PR

There would be a sharp threshold where the drawing dimensions exceeded the number of bits in the variable, if the variable was an integer. Up to the maximum number that could be stored in the variable no precision would be lost, then suddenly the dimensions would be come meaningless.

However, with floating point numbers the lower precision bits are lost as the number gets larger. There is still a limited number of bits, and only the upper N bits are retained when the number exceeds N bits (plus exponent). The hatch pattern was created in a relatively small resolution. As the overall dimensions get larger the lowest precision bits are lost, causing the pattern to become "fuzzy." Eventually it is impossible to display the pattern because the entire dimension of the pattern is smaller than the smallest possible resolution.

The solution is to rewrite the program with something like 48 bit integers. I think I recall a discussion where 48 bit precision allows the least significant bit to represent the smallest possible unit of measure (according to some physicists) and 48 bits allows the entire known universe (according to some cosmologists) to be modeled with this precision.
DesignCAD user since 1987