Jump to content

Recommended Posts

Posted (edited)

I am in the process of trying to develop a circle hatchpattern.

 

The numbers below work as expected by drawing 5 lines.

 

The problem that I am stuck and confused by is the last entry (-1365)

 

This works but the true value should be (-1365.2)

 

If I enter this value then the hatch doesn’t work. Why??

 

Hatch Pattern Code below

 

 

*Circle

 

 

 

 

 

0,475.4957149,251.2038183,0,1000,49.00857016,-950.9914298

 

 

 

 

 

0,475.4957149,748.7961817,0,1000,49.00857016,-950.9914298

 

 

 

 

 

90,251.2038183,475.4957149,0,1000,49.00857016,-950.9914298

 

 

 

 

 

90,748.7961817,475.4957149,0,1000,49.00857016,-950.9914298

 

 

 

 

 

45,305.8961586,659.4495491,707.1067812,707.1067812,49.00857016,-1365

 

Many thanks

 

Tony

Edited by tlawson
Posted

Are you missing a return at the end of the line?

Posted

I have already thought about this and NO I stiil have a return at the end. So this still put's me at a loss to what the problem is.

 

Tony

Posted

Your problem is indeed curious, because I get a hatch pattern with both -1365 and -1365.2

 

Are you getting any messages on the command line?

Posted

However, you may not need to be at a loss any longer. Here is a hatch file that I found, and using a hatch scale of 1000, it does what you are trying to do :D

 

*circle32,Circle with 1/2 unit diameter
0, .48,.25, 1,.5, .04,-.96
90, .25,.48, 1,.5, .04,-.96
45, .31,.66, .7071067812,.7071067812, .042426407,-1.371787155
45, .66,.31, .7071067812,.7071067812, .042426407,-1.371787155
135, .34,.31, .7071067812,.7071067812, .042426407,-1.371787155
135, .69,.66, .7071067812,.7071067812, .042426407,-1.371787155
36.86989765, .34,.69, 1.4,.2, .05,-4.95
36.86989765, .62,.28, 1.4,.2, .05,-4.95
53.13010235, .69,.34, -1.4,.2, .05,-4.95
53.13010235, .28,.62, -1.4,.2, .05,-4.95
126.86989765, .31,.34, 1.4,.2, .05,-4.95
126.86989765, .72,.62, 1.4,.2, .05,-4.95
143.13010235, .66,.69, 1.4,-.2, .05,-4.95
143.13010235, .38,.28, 1.4,-.2, .05,-4.95
11.30993247, .52,.25, .9805806755,-.1961161351, .050990195,-5.048029318
11.30993247, .43,.74, .9805806755,-.1961161351, .050990195,-5.048029318
78.69006753, .25,.52, .9805806755,.1961161351, .050990195,-5.048029318
78.69006753, .74,.43, .9805806755,.1961161351, .050990195,-5.048029318
101.30993247, .75,.52, -.9805806755,.1961161351, .050990195,-5.048029318
101.30993247, .26,.43, -.9805806755,.1961161351, .050990195,-5.048029318
168.69006753, .48,.25, .9805806755,.1961161351, .050990195,-5.048029318
168.69006753, .57,.74, .9805806755,.1961161351, .050990195,-5.048029318
21.80140948, .38,.72, 2.22834405757,.1856953382, .0538516481,-5.3313131581
21.80140948, .57,.26, 2.22834405757,.1856953382, .0538516481,-5.3313131581
68.19859052, .26,.57, -2.22834405757,.1856953382, .0538516481,-5.3313131581
68.19859052, .72,.38, -2.22834405757,.1856953382, .0538516481,-5.3313131581
111.80140948, .28,.38, 2.22834405757,.1856953382, .0538516481,-5.3313131581
111.80140948, .74,.57, 2.22834405757,.1856953382, .0538516481,-5.3313131581
158.19859052, .43,.26, 2.22834405757,-.1856953382, .0538516481,-5.3313131581
158.19859052, .62,.72, 2.22834405757,-.1856953382, .0538516481,-5.3313131581

Posted (edited)

Hi Eldon

 

The code you supplied is exactly the same code I have.

 

If you look at line 4 the last value is -1.371787155

 

As you said the scale is 1:1000

 

What I am doing is trying to create a pattern at a scale of 1:1, hence my value is close to the one in the code (1365)

 

The error on the command line is

Missing parameter on line 6

 

Perhaps I could send you the .pat file and you can see if it works on your machine?

 

I know you may say use the code that works but I have already created an Excel UserForm that has various brick and mesh hatches. This allows you to alter the size using a scale of 1:1.

 

The Excel program then creates the .pat file for you. I wish to do this with the circle hatch thus allowing me to alter dimensions such as the circle spacing and circle size.

 

Tony

Edited by tlawson
Posted
The error on the command line is “Missing parameter on line 6”

 

That was the message that I got before I put a return on line 6. When you are in a text editor, check to see whether the cursor will drop down to the line beneath the last data. If it won't then another return is needed.

 

I can understand that you want to produce a variable form for hatches, but circles are a bit different.

 

Basically with hatches, you have a family of lines which go off at an angle and now and again touch down to produce a line segment, and then lifts up until it is time for the next segment. Your aim, I believe, was to create a 32 segment circle, which has a regular 11¼° between segments. Some of those lines would have to go a long way before they found another segment to draw. That is why the posted file does not have regular angular intervals, but it works. So put those dimensions into your spreadsheet where you will be able to scale which bits you require. Usually with hatches, you should not be able to see the tiny irregularities.

I think that you would be able to scale the circle sizes, but would be surprised if you could alter the spacing unless you also altered some of the angles.

Posted

I did have a return line in the text file so that one is still a mystery.

 

As I have only just started working on the circle hatch program, I now realize from your last comment that it will not be possible to do due to the angular intervals.

 

I thank you for your help. It's looking like this is going to be an impossible one for me to include in my program

 

Regards

 

Tony

Posted

Having had another think, if you want to keep horizontal and vertical spacing equal, then it is a case of scaling the relevant data.

 

I was thinking that if vertical and horizontal spacing were to be different, it would be tricky.

 

Have you explored Superhatch yet?

Posted

I did have a look at Superhatch but decided not to use that route. My aim was to create a .pat file.

 

I think for now I may try and create one with a Hexagon, just so I can work out in my head all the problems I am going to encounter.

 

Thanks for all your help.

 

Tony

Posted

I have now found the solution so will post to help other people.

 

The problem was the way I was creating the .pat file. If you paste the values directly from Excel to a Notepad file then Tabs are inserted in between the Cells.

Delete the Tabs and all works okay.

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...