10"x72" 1/3 offset running bond pattern

sbrasher
Enthusiast
Enthusiast

10"x72" 1/3 offset running bond pattern

sbrasher
Enthusiast
Enthusiast

I've been trying to write a .pat file to acheive a 10"x72" tile pattern with a 1/3 stepped offset for hours. I feel like an idiot, because I just can't figure it out. Can someone help me?

0 Likes
Reply
Accepted solutions (1)
2,188 Views
15 Replies
Replies (15)

Kent1Cooper
Consultant
Consultant
Accepted solution

*YourPatternName, 10x72 1/3-offset running bond
0, 0,0, 0,10
90, 0,0, 10,24, 10,-20

 

Remember that it either needs to be added into AutoCAD's pattern file or [preferable] have a file of its own, with the file name exactly matching the pattern name [not including the .pat filetype ending], and the file must end with a blank line, not the last line of the definition code.

 

If you post what you had gotten to, we could maybe point out what's off, which may help you understand better how they work for future use.

Kent Cooper, AIA
0 Likes

sbrasher
Enthusiast
Enthusiast

Thank you so much!!

 

The number that I had wrong was the last number of the second line: -20.

 

Can you please tell me what that number represents in the hatch?

0 Likes

Kent1Cooper
Consultant
Consultant

You can read about them >here<.  The last two [in this case -- can be more] numbers are the dash-and-gap pattern for the "infinite" vertical lines [fewer numbers in the first line of the definition, because that's for the continuous lines -- no dash-gap pattern].  The positive number is the "pen-down" distance, the negative number is the "pen-up" distance before it puts the pen down again.

Kent Cooper, AIA
0 Likes

sbrasher
Enthusiast
Enthusiast

I read the article... I'm still not clear about the number 20. How does that relate to the tile dimension of 10x72?

0 Likes

hugha
Collaborator
Collaborator
The draw/skip distances specified beyond each line's fifth element are inline with the line angle.

20 is the height of two bricks.
10,-20 instructs AutoCAD to draw one perpend then jump two courses before restarting the next inline.

hth,
Hugh Adamson
www.hatchkit.com.au
0 Likes

Kent1Cooper
Consultant
Consultant

Graphically, and color-coded:

Kent1Cooper_0-1667129348260.png

*YourPatternName, 10x72 1/3-offset running bond
0, 0,0, 0,10
90, 0,0, 10,24, 10,-20

Kent Cooper, AIA
0 Likes

sbrasher
Enthusiast
Enthusiast

That is super helpful, thank you. So the 72" distance between vertical lines is determined by the vertical distance that is skipped before the original vertical line is repeated? (I hope that makes sense 😜)

0 Likes

Sea-Haven
Mentor
Mentor

I was inspired by Kent with the other make hatch pattern so had a go at this one. Change the output directory and the default values to suit I am metric.

 

 

 

; make herringbone pattern offset running bond
; By Alan H Oct 2022

(defun c:HerringboneB ( / ans len ht rat patname hatname fname )

(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "Enter values " "Length " 5 4 "100" "Height " 5 4 "50" "Ratio 1 /  " 5 4 "2")))
(setq len (atof (car ans))
ht (atof (cadr ans))
rat (atof (caddr ans))
)

(setq patname (strcat "Herringbone-" (cadr ans) "-" (car ans) "-" (caddr ans)))
(setq hatname (strcat patname "," (cadr ans) "x" (car ans) " 1/" (caddr ans) "-offset running bond"))


(setq fo (open (setq fname (strcat "d:\\acadtemp\\" patname ".pat" )) "W")) ; change hard coded directory
(write-line (strcat "*" hatname) fo)
(write-line (strcat "0, 0,0, 0," (cadr ans)) fo)
(write-line (strcat "90, 0,0 " (cadr ans) "," (rtos (/ len  rat) 2 0) ", " (cadr ans) "," (rtos (* -2 ht) 2 0)) fo)
(close fo)
(princ)

)

 

SeaHaven_0-1667175867371.png

 

 

*Herringbone-10-72-3,10x72 1/3-offset running bond
0, 0,0, 0,10
90, 0,0 10,24, 10,-20

 

 

0 Likes

Kent1Cooper
Consultant
Consultant

Three comments:

 

It's not a herringbone pattern.

 

The pen-up portion of the second line-set code would be:

(rtos (* -2 ht) 2 0)

only when the offset ratio is 1/3, but the dialog box is allowing for different denominators.  Shouldn't that be multiplying 'ht' by the negative of one less than the denominator number, not always by -2 ?

 

Doesn't it need to write a blank line "" at the end for the file to work properly?

Kent Cooper, AIA
0 Likes

Kent1Cooper
Consultant
Consultant

@sbrasher wrote:

.... So the 72" distance between vertical lines is determined by the vertical distance that is skipped before the original vertical line is repeated? (I hope that makes sense 😜)


I would describe it as determined by the fact that 72 is 3 times the "delta-y" value of 24 [the 24 is your 1/3 stagger], combined with not so much the distance that is skipped per se, but the fact that the pen-down portion is drawn into every third row [the pen-down + pen-up total is 3 times the row height].

Kent Cooper, AIA
0 Likes

Sea-Haven
Mentor
Mentor

Will fix and change name,  when are Autodesk going to allow you to edit a prior post.

 

As the height is fixed 72x10 the ratio comes into effect, only changing the ratio of length to next tile so the -20 is correct. 2 is mid, 3 is 1/3, 4 is 1/4 and so on.

SeaHaven_0-1667186120130.png

Change to a more correct name

(defun c:Tilepat ( / ans len ht rat patname hatname fname )

(setq patname (strcat "Tile-" (cadr ans) "-" (car ans) "-" (caddr ans)))

 

 

 

0 Likes

Kent1Cooper
Consultant
Consultant

@Sea-Haven wrote:

.... when are Autodesk going to allow you to edit a prior post.

As the height is fixed 72x10 the ratio comes into effect, only changing the ratio of length to next tile so the -20 is correct. 2 is mid, 3 is 1/3, 4 is 1/4 and so on.

....


[You can edit your post.  They've removed the former 30-minute limit on that.  Pick the three-dots thing at upper right, and choose Edit Reply at the top.]

 

Your tiles clearly do not fit that "fixed 72x10" part:

Kent1Cooper_0-1667320669629.png

Kent Cooper, AIA
0 Likes

Kent1Cooper
Consultant
Consultant

@Kent1Cooper wrote:

....  Shouldn't that be multiplying 'ht' by the negative of one less than the denominator number, not always by -2 ?

Doesn't it need to write a blank line "" at the end for the file to work properly?


On the first one, it needs to be that way if the element (tile, brick, board, etc.) size is to remain the same.  On the second, it doesn't -- the (write-line) function includes "Enter" at the end of the line it writes, so the empty blank line at the end of the file is there just from the last line of code it adds.

 

Attached is RunningBondStaggerPAT.lsp to generate pattern definitions like this, where the User specifies the dimensions of the elements and the fraction of length to stagger them by.  You can determine the direction of the stagger by the sign of the stagger-fraction denominator.  So far, it only works where the stagger fraction is 1 over an integer.  It can even accept a denominator of 1, which produces stack bond, i.e. a "stagger" of a whole element length.  It may be possible to allow for other fractions of stagger, such as 2/5, 3/10, etc., but I haven't yet thought much about how to work out the pen-down-pen-up cycling for that.

 

BEFORE YOU LOAD IT, heed the EDIT instruction about the filepath location for the .pat file.

 

EDIT:  I decided there wasn't any reason the "Length" [horizontal dimension of elements when used at 0 rotation] needs to be greater than the "Width" [vertical] -- it can make patterns like this:

Kent1Cooper_0-1667912301623.png

So I changed the prompts a little, and replaced the file.

Kent Cooper, AIA
0 Likes

Kent1Cooper
Consultant
Consultant

@Kent1Cooper wrote:

.... So far, it only works where the stagger fraction is 1 over an integer.  ....  It may be possible to allow for other fractions of stagger, such as 2/5, 3/10, etc., ....

....


I worked that out.  Here's RunningBondHPG.lsp with its RBHPG command [the HPG stands for Hatch Pattern Generator] that allows for such fractions, and "cleans up" some other things [for instance, if your choices result in stack bond, it uses "Stack" instead of "Running" as part of the pattern and file names, or if they result in a "stagger" of half the elements' horizontal dimension, that's just standard for running bond so it doesn't spell out the stagger fraction in the names].  See the comments at the top of the file for more detail.

 

This from before still applies:

BEFORE YOU LOAD IT, heed the EDIT instruction about the filepath location for the .pat file.

Kent Cooper, AIA
0 Likes

herbine
Explorer
Explorer

Kent,

I want to thank you for your input and this .lsp routine. It works great!

0 Likes