Jump to content

Herringbone hatches in general


eldon

Recommended Posts

I thought to post two herringbone hatches which show that herringbone patterns can be formed from any sized tile and do not have to be limited to simple proportioned dimensions. Tiles with grout spaces are more difficult and I have limited myself to single lines only.

 

The pictures were drawn with a rotation of 45° because it is easier to calculate herringbone hatches orthogonally. I have calculated these patterns manually, but I suppose there are other quicker methods available!

 

*Hb221x65, Herringbone with tile 221x65
0,0,0,1313,-13,286,-1924
90,65,0,1313,13,286,-1924
*eldon January 2023


*Hb221x71, Herringbone with tile 221x71
0,0,0,3977,-1,292,-31090
90,71,0,3977,1,292,-31090
*eldon January 2023

 

 

Herring bone patterns.PNG

  • Like 1
Link to comment
Share on other sites

Over at autodesk/forums Kent Cooper did a lisp I added a version also for horizontal tiles taht wrote the hatch pattern, so rather than me work it out if you explain what the numbers mean then you can make a lisp for a missing herringbone pattern. Just enter a couple of numbers.


https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/10-quot-x72-quot-1-3-offset-running-bond-pattern/m-p/11517234

Edited by BIGAL
Link to comment
Share on other sites

16 hours ago, BIGAL said:

Over at autodesk/forums Kent Cooper did a lisp I added a version also for horizontal tiles that wrote the hatch pattern, so rather than me work it out if you explain what the numbers mean then you can make a lisp for a missing herringbone pattern. Just enter a couple of numbers.


https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/10-quot-x72-quot-1-3-offset-running-bond-pattern/m-p/11517234

 

I was certainly inspired by the posting of some Herringbone definitions in that Forum. I could not see the Herringbone lisp in your link, but feel sure that someone has written one.

 

However, I was minded to find out the relationship between the numbers in the herringbone hatch pattern, and thought that by posting some more examples, other people would be able to figure out for themselves the logic (or post a request for help).

 

It is quite beyond me to make a lisp, but I could try and explain my thoughts for others to make a lisp.

Edited by eldon
added information
  • Like 1
Link to comment
Share on other sites

I tried hatchmaker.lsp and got this.  Eldon I started with a box of 2000x2000 using your pattern, I shrunk your pattern down to match the software request 1x1 box

 

*HB221x65,HERRINGB221X65
0,0.143,0,0,1,0.0325,-0.9675
0,0.0325,0,0,1,0.143,-0.857
90,0.0325,0.0325,0,1,0.143,-0.857
90,0,0.1105,0,1,0.0325,-0.9675

 

image.png.24a63b90a19219c56247206b05778f88.png

 

This is what the pattern is based on so if I can work out the numbers then should be able to do any Herringbone pattern length and width.

So 65/2000 = 0.0325

0.143*2000 = 286 = 65 + 221

 

So should be able to work out the other numbers now. look at replace pat numbers with A B C etc on paper. 

 

 

HatchMaker.lsp

Edited by BIGAL
Link to comment
Share on other sites

This is what I worked out from looking at the numbers.

 

1. Given a tile of length 'X' and width 'Y', I first of all factorize the numbers and then take the HCF (Highest Common Factor) and the LCM (Lowest common multiple) of X and Y.

 

2. Then using my trusty Hatch pattern diagram (see below), e  = HCF and f + g = 2 x LCM. Knowing that f = X + Y, then g = (2 x LCM) - f.

 

3. I started a reiterative process, using excel, where I had two columns   d and offset. The offset started at -e and the length at 0. I then tested if the offset was negative. If it was, I added X to d and Y to the offset. If the offset was positive, I added Y to d and subtracted Y from the offset. These steps went on until the offset was 0, which gave the required value of d.

 

4. Then the hatch pattern definition can be written (with appropriate headers):-
0,  0,  0,  d,  -e,  f,  -g
90, Y,  0,  d,  e,  f,  -g
*


There must be a blank line at the end of the file, and I have found that an asterisk is tolerated by Autocad and serves as a visual marker.

 

 

Hatch definition diagram.PNG

Edited by eldon
Corrected factor
Link to comment
Share on other sites

Thanks I know I saved the diagram somewhere. The more I work on it the more I get confused. 😀

 

Found 1 pattern for answer

*bone12x4
0, 0,0, 4,4, 16,-8
90, 4,0, 4,-4, 16,-8

 

image.png.a0b54d74add619a64a879f64344be8cc.png

(defun c:herpat ( / ) 
(setq l (getreal "\nEnter length ") ht (getreal "\nEnter height "))
(setq fpat (strcat "d:\\BIGAL\\lisp\\HB" (rtos l 2 0) "x" (rtos ht 2 0) ".pat")) ;change path to suit
(setq fo (open fpat "w"))
(write-line (strcat "*HB" (rtos l 2 0) "x" (rtos ht 2 0) ",HB" (rtos l 2 0) "x" (rtos ht 2 0)) fo)
(write-line (strcat "0,0,0," (rtos ht 2 5) "," (rtos ht 2 5) "," (rtos (+ ht l) 2 5) ",-" (rtos (- (+ ht l) (* 2. ht)) 2 5)) fo)
(write-line (strcat "90," (rtos ht 2 5) ",0," (rtos ht 2 5) ",-" (rtos ht 2 5) "," (rtos (+ ht l) 2 5) ",-" (rtos (- (+ ht l) (* 2. ht)) 2 5) ) fo)
(Close fo)
(princ)
)

Now the problems at a certain height to length ratio it stops working. So needs a different algorithm will let some one else have a go.

Edited by BIGAL
Link to comment
Share on other sites

  • 1 month later...
On 1/25/2023 at 12:19 PM, eldon said:

This is what I worked out from looking at the numbers.

 

1. Given a tile of length 'X' and width 'Y', I first of all factorize the numbers and then take the HCF (Highest Common Factor) and the LCM (Lowest common multiple) of X and Y.

 

2. Then using my trusty Hatch pattern diagram (see below), e  = HCF and f + g = 2 x LCM. Knowing that f = X + Y, then g = (2 x LCM) - f.

 

3. I started a reiterative process, using excel, where I had two columns   d and offset. The offset started at -e and the length at 0. I then tested if the offset was negative. If it was, I added X to d and Y to the offset. If the offset was positive, I added Y to d and subtracted Y from the offset. These steps went on until the offset was 0, which gave the required value of d.

 

4. Then the hatch pattern definition can be written (with appropriate headers):-
0,  0,  0,  d,  -e,  f,  -g
90, Y,  0,  d,  e,  f,  -g
*


There must be a blank line at the end of the file, and I have found that an asterisk is tolerated by Autocad and serves as a visual marker.

 

 

Hatch definition diagram.PNG

Hi Eldon, I am going crazy trying to find a herringbone generator. I've found one from Aussie BIM Guru but it doesn't work. So I was trying to build my own Xcel file, filling the variables (X,Y, d, el, f, g) and the LCM and HCV values but I got stuck with the "d" value. I cannot understand how you calculate the "d" value so I cannot complete the formula to get the code =  pattern definition. Will you be so kind to explain it to me? I have uploaded my Xcel file here (https://www.dropbox.com/scl/fi/nny2zrhmea9rdvd5kvmc2/ELDON-Herring-pattern-generator.xlsx?dl=0&rlkey=tjvx3p6is0ajfc1o2z3egclhq ) created from your posts. For LCM and HCV values I use online calculators (I'm bad at math :) ). Or, if you have an Xcel file -since you mention it in your post - I would appreciate it if you can share it. Thank you for your time. I know it's an old post and you may not reply but, so far, you are the only one that explains how to define a herringbone pattern well. Thanks again

Link to comment
Share on other sites

This has some real good how to do it 
https://forums.autodesk.com/t5/autocad-forum/create-custom-herringbone-hatch-pattern/td-p/2084322

 

There is some make pat lisp out there.

;;; CADALYST 03/08  www.cadalyst.com/code 
;;; Tip 2276: BRICKS.lsp    Brick Hatch Generator  (c) 2008 Raymond Rizkallah 

 

Hatch Maker is another. I have like 3 more.

 

Maybe helpful see attached pretty sure there is a lisp just enter a couple of values.

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

(defun c:Tilepat ( / 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 "Tile-" (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:\\alan\\lisp\\" patname ".pat" )) "W"))
(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)
)

 

HB100x55.pat HB100x50.pat HB100x40.pat HB300x50.pat HB200x50.pat

Edited by BIGAL
Link to comment
Share on other sites

On 3/22/2023 at 2:07 AM, Ataru said:

Hi Eldon, I am going crazy trying to find a herringbone generator. I've found one from Aussie BIM Guru but it doesn't work. So I was trying to build my own Xcel file, filling the variables (X,Y, d, el, f, g) and the LCM and HCV values but I got stuck with the "d" value. I cannot understand how you calculate the "d" value so I cannot complete the formula to get the code =  pattern definition. Will you be so kind to explain it to me? I have uploaded my Xcel file here (https://www.dropbox.com/scl/fi/nny2zrhmea9rdvd5kvmc2/ELDON-Herring-pattern-generator.xlsx?dl=0&rlkey=tjvx3p6is0ajfc1o2z3egclhq ) created from your posts. For LCM and HCV values I use online calculators (I'm bad at math :) ). Or, if you have an Xcel file -since you mention it in your post - I would appreciate it if you can share it. Thank you for your time. I know it's an old post and you may not reply but, so far, you are the only one that explains how to define a herringbone pattern well. Thanks again

 

Attached is my excel file.

 

A few explanations are necessary to help you.

I use integers only.

 

The excel used was v2003, and so the condition functions (greater than or equals)and (less than or equals) are written as a combination of functions rather than a single function.

Newer excels have the function LCM, but I factorise the tile lengths manually to give me the HCF and LCM. If both width and length are prime numbers or have no common factors, remember there is always  1.

I fill in the length in cell B2 and the width in cell C2, the HCF in cell F2 and the LCM in cell G2. Then cell C8 fills in automatically, and the whole spreadsheet calculates automatically whilst cells are being filled with new data..

 

(Then I highlight cells B9,C9, D9 and E9 and pull down the equations right down to cell 1020. I have to go so far because some of the tiles I have been dealing with need that space.) I only had to do this the first time and also to extend the range of cells.

 

Then I go back to the top and examine column E. When the required offset  is 0 (you could also scan down the C column), then the word 'bingo' appears in column E, and it is the first occurrence of the word 'bingo' that shows the distance in the B column (d).

It is all a bit amateur, but I am self taught in programming.

 

Some of these automatic programmes available on the web do seem to have gaps and don't work far from the origin!

 

Good luck and if you are having difficulty with your herringbone pattern, just post the dimensions and I will have a go.

 

 

all herring - A.xls

Edited by eldon
edited
Link to comment
Share on other sites

Previously, I had posted some herringbone patterns where the length and width were a simple proportion. So I thought to try out my general method of calculating.

 

I got different hatch pattern numbers, but they plot the same (different angles but tile size the same)

 

*Hb6, Herringbone with width to length ratio 1 to 6
45,0,0,1,1,7,-5
135,0,0,-1,1,6,-5,1
*eldon May 2022

 

*aatest, testing tile 6 x 1
0,0,0,11,-1,7,-5
90,1,0,11,1,7,-5
*eldon March 2023

 

Two-Hb.thumb.PNG.19ffac298f9ba522a919700ffe7006b2.PNG

 

Edited by eldon
better picture
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...