Custom angular or circular Hatch pattern

Custom angular or circular Hatch pattern

fkp7057
Advocate Advocate
6,003 Views
11 Replies
Message 1 of 12

Custom angular or circular Hatch pattern

fkp7057
Advocate
Advocate

Hello,

 

I want to create Custom hatch pattern for angular fill or circular fill, (Not solid fill, refer attached snap)

can any one tell me how to create this type of hatch, or is it possible to do in Autocad ? or can we create it  through some Auto lisp routine .

any help much appreciated.

 

Regards,

FKP

0 Likes
Accepted solutions (1)
6,004 Views
11 Replies
Replies (11)
Message 2 of 12

marko_ribar
Advisor
Advisor

You can do it from series of dots, but they are slow and not practical... Better to do it with ordinary entities like LINES or CIRCLES through LISP...

Marko Ribar, d.i.a. (graduated engineer of architecture)
Message 3 of 12

Kent1Cooper
Consultant
Consultant

@marko_ribar, your pattern definitions can go from 0- through 179-degree directions, and stop there -- the 0-degree direction covers the 180-degree direction, too, and 1 covers 181, etc.

 

@fkp7057, your right image can be as simple as this:

*RADIAL15, Radial lines at 15-degree increments
0, 0,0, 0,1
15, 0,0, 0,1
30, 0,0, 0,1
45, 0,0, 0,1
60, 0,0, 0,1
75, 0,0, 0,1
90, 0,0, 0,1
105, 0,0, 0,1
120, 0,0, 0,1
135, 0,0, 0,1
150, 0,0, 0,1
165, 0,0, 0,1

 

Set the pattern origin to the center of your Circle [in the image, or otherwise wherever you want the radiating to radiate from] and set the Scale factor to whatever it takes to get the "other stuff" [the parallel repeats of the defined linesets] outside the Hatched area.

 

Your left image can't be done with a Hatch pattern if you're intending it to have actual curvature -- Hatch patterns can only be made of straight-line segments [or dots, which are zero-length straight-line segments, as in some of marko's suggestions].  But it could be done with an AutoLisp routine easily enough, if that's of interest.

Kent Cooper, AIA
Message 4 of 12

dbroad
Mentor
Mentor

Actually, neither hatch can really be done well with the hatch features.   The hatch pattern coded in the last post will only work to fill a square and that only if the hatch pattern scale equals the size of the square.  Might as well create both with a block, insert, scale, and clip, which is what I do.  LISP can work as well but is probably overkill.

 

Look into superhatch if you want to experiment with quirky hatches that the hatch command can't handle.  It can work with circles, blocks, images, etc.

 

Just for fun, here is what occurs if the radial hatch coded is put at a scale of 1 inside a 24"x24" square with the basepoint in the center of the square.

Radial HatchRadial Hatch

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 5 of 12

Kent1Cooper
Consultant
Consultant

@dbroad wrote:

....   The hatch pattern coded in the last post will only work to fill a square and that only if the hatch pattern scale equals the size of the square.  ....


NOT TRUE!  I don't know where that notion is coming from....  It will fill any shape at all, and the scale factor can be anything at all that's large enough to drive the extras outboard of the Hatched area, or larger to any degree you like.  The desired portion around the origin will look exactly the same whether the scale factor is just barely big enough to do that, or set to a million, or a googol.

Kent Cooper, AIA
0 Likes
Message 6 of 12

hugha
Collaborator
Collaborator

Kent is correct in stating that if you adjust the scales of his radial pattern it can serve in all cases however prescaling by a large factor may cover all of your requirements without having to consider that slight overhead. Picking a location for the hatch origin should have all repetitions falling outside of the hatched area..

 

*RADIAL15x107, Scaled up radial lines at 15-degree increments

0, 0,0, 0,10000000
15, 0,0, 0,10000000
30, 0,0, 0,10000000
45, 0,0, 0,10000000
60, 0,0, 0,10000000
75, 0,0, 0,10000000
90, 0,0, 0,10000000
105, 0,0, 0,10000000
120, 0,0, 0,10000000
135, 0,0, 0,10000000
150, 0,0, 0,10000000
165, 0,0, 0,10000000

 

The circular hatch can be handled by creating a hatch pattern containing concentric circles covering a template patch large enough to cover all foreseen  applications .  A pattern generated from concentric circles of desired radii will always cover a square of size (sqrt 2) * the largest circle radius no matter where you place the pattern origin within the drawing. The only barrier would be a tradeoff between pattern size and circle fidelity.

 

hth,

Hugh Adamson

Cadro Pty Ltd.

 

 

 

 

 

 

 

 

 

 

 

Message 7 of 12

fkp7057
Advocate
Advocate

@hugha

thanks for all your help but i am not able to use that above code for hatch can you plz provide pat file so i can check it in my system.

 

@marko_ribar

Thanks for Reply

while using your hatch file it will stuck for ever auto cad not responding, dont know why. 

0 Likes
Message 8 of 12

hugha
Collaborator
Collaborator

Ok, but it's not that hard to do:

 

1. cut the text

2. open a text editor

3. paste text

4. add a blank line

5. save as RADIAL15x107.PAT somewhere on your Support File Search Path.

 

Bother. What is hard is getting a .pat file to load as an attachment.  What am I missing?

 

 

 

0 Likes
Message 9 of 12

fkp7057
Advocate
Advocate

@hugha i tried the same may be i missed that blank line .

but still get this error

error.jpg

 

Regards,

FKP

0 Likes
Message 10 of 12

Kent1Cooper
Consultant
Consultant

Take the extraneous .pat off the end of the file name.

Kent Cooper, AIA
Message 11 of 12

hugha
Collaborator
Collaborator
Accepted solution

Thanks, Kent!

 

 Of course now any downloaders will have to change the filename back to RADIAL15X107.PAT before attempting to use it in AutoCAD.

 

 

 

 

Message 12 of 12

fkp7057
Advocate
Advocate

Thanks a ton this one work perfectly

0 Likes