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

Registered forum members do not see this ad.
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
Last edited by tlawson; 22nd Oct 2012 at 07:18 pm.




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

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




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?




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
Code:*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

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 isMissing 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
Last edited by tlawson; 22nd Oct 2012 at 07:19 pm.
tlawson,
Please read the CODE POSTING GUIDELINES and edit your first post to include CODE TAGS.
Thread has been moved to The CUI, Hatches, Linetypes, Scripts & Macros forum.
And welcome to CADTutor!
“A narrow mind and a fat head invariably come on the same person” Zig Zigler
![]()

Apologies for my oversight.
Tony




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.

Registered forum members do not see this ad.
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
Bookmarks