I need to create a hatch pattern that can accurately hatch various large geometry with very small lines. For example, I may have a rectangle that is 4" x 3". The hatch pattern that I must create contains a few intersecting lines of length 0.010". These lines form an object and, of course, depending on the size of the hatched geometry, may require many objects to create the hatch pattern.
I have successfully wrote a hatch pattern program that will complete the task to a certain degree. As the geometry I attempt to hatch gets bigger, my intersecting lines stray further away from equilibrium. If the object is to big then I will have a hatch pattern that is not constant, meaning, at the origin of the hatch pattern my lines will intersect at a center point, whereas, at the edges of my geometry the inersecting lines will be crossing at different points then the center point.
I have attributed this to the .PAT files inability to have more than a specific amount of numbers per line of code. I have approximated that I need 0.00000000000000000000000000001 significant figures. Is there a way to create this ability in a custom hatch pattern? Is there another way to program a hatch pattern, i.e. visual basic (as a plug-in), that would let me program this code with greater accuracy?
AutoCAD restricts all lines in a .PAT file to 80 characters. You have 7 numbers to specify in that line. Three need not be specified very precisely, being origin-X, origin-Y and the down-stroke line length. The other four must be specified to the highest precision you can achieve.
80 char less 6 commas = 74, less 3x6 (say) for X,Y and L =56 allowing 56/4 = 14 character precision for each of the numbers that do need high precison.
So if you can't get there with 13 decimal precision you have a real problem.
(That's roughly how we do it in HatchKit for AutoCAD. For Revit the line length limit is much larger so these constraints don't apply.)
hth,
Hugh Adamson