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.

Custom hatch display scale

Started by Adrian 2.0, July 09, 2021, 07:41:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Adrian 2.0

I've been asked to use some specific custom hatch patterns for woodgrain on an ID project I'm working on.
The patterns were extracted from Autocad files.
The problem is that the scale of the preview thumbnail in the Info Box is so small that it takes forever to refresh and it makes editing the pattern scale and angle impossible.
I can't find a way to edit the thumbnail display scale of the pattern - I also can't find a way to view the content of the .sys file and maybe edit that.
The patterns don't appear in DcHatch.sys or DcHatchc.sys, even when the attached file is open.

Does anyone know how to fix this?


Rob S

#1
I see what you mean, and I do not have any insights on this right away.

Apparently it has something to do with Sys(32) - so if you have the source drawing to import, could try importing into blank drawing with different Sys(32) settings, because Autocad commonly uses 1unit = 1"  (Tried this with copy and paste to new drawing, found no immediate effect)

It looks like you have been a prime source of topics relating to hatches and gradients and etc, so you probably already know more than most.

I'll poke around a bit more and see if I can find anything.
User since forever

Rob S

This topic discusses what sets the scale of the hatch preview.

https://forum.designcad.com/index.php?topic=5874.msg41320#msg41320

QuoteHatch format:

Line 1: Name
Line 2: Number of hatch line definitions, scale for preview
Line 3: Angle, origin x, o

Now all you need to do is get it to appear in the DCHATCHC.sys, and edit.....
User since forever

Rob S

#3
Found out a few more things:

You can save and load the hatch pattern format by open the drawing, and under file menu save custom hatch pattern, this saves a DCH file which includes all your original hatches, plus the new ones in the same format as dchatch.sys.

Looking at this dch file, the line definition numbers used in  these custom hatches are much larger than designcad built-in hatches.   I tried editing the preview scale factor(S), but so far have not achieved the desired effect.   

Also, this file has 4 numbers on line 2  instead of two as noted above, so I don't yet know what that means

Also found this, in case you want to make your own - http://cadro.com.au/hatchkit/index.html
User since forever

Adrian 2.0

Hi Rob,
Thanks for the solution on how to get the pattern into DCHATCHC.
I've got the pattern pasted in now so it remains in my startup patterns, but I'm also struggling to change the scale to something that changes the function...
I'll keep working on it tomorrow - late over here in my neck-of-the-woods...

Rob S

#5
Found out how to change the preview scale visually

https://forum.designcad.com/index.php?topic=1517.msg7844#msg7844

Just shift click or ctrl-click in the hatch preview window, try it with an existing standard pattern.

Then apparently you can save over your existing DC_hatchc.sys using file, custom hatch, save to keep the setting.

I got this working with your sample drawing.   A hatch preview scale number of around 15000000 (15million) seems to work for these, the preview displays instantly.

I found the shift-click and crtl-click work in the info box as well.  What you do in one place, stick for the other.

Pretty slick when you think of it.
User since forever

Adrian 2.0

Thanks so much for your time to find that old thread.
The control/shift-click works well once the view is at a scale that doesn't take 5 minutes to regenerate, but painful until you get close.
I had (after following your previous advice) discovered that if I added 3 zeros to the second number in the data string it changed the preview to something OK to view & I fine-tuned it with control/shift-click.
I now have the modified file added to my DcHatchc and saved as a custom hatch file in my preferences.
(modifying the SYS file means I don't need to load it every time I need it)

Rob S

Well, I,m sure glad that worked out for you!

The forum strikes again!
User since forever