Sometimes we received other people's files.but these files contained some undefinited hatch .
it means, when we want to edit these hatch,we need to regenerate the hatch again. but their .pat files are diffirent,we don't know,we havn't.
so if we want to keep the old pattern of hatch(not to replace them by our pattern), How do we regenerate the hatch?
when I listed the dxf code of a hatch,I got an idea,maybe we can read them then add some pattern to creat a new .pat files.
so I tested a hatch, for example, I filled a rectangle with the pattern named "HONEY", then the data will be:
....
(53 . 0.0) (43 . 0.0) (44 . 0.0) (45 . 4.7625) (46 . 2.74963) (79 . 2) (49 . 3.175) (49 . -6.35)
(53 . 2.0944) (43 . 0.0) (44 . 0.0) (45 . -4.7625) (46 . 2.74963) (79 . 2) (49 . 3.175) (49 . -6.35)
(53 . 1.0472) (43 . 0.0) (44 . 0.0) (45 . 5.68992e-007) (46 . 5.49926) (79 . 2) (49 . -6.35) (49 . 3.175)
...
translate it to .pat format:
0, 0, 0, 4.7625, 2.74963, 3.175, -6.35
120, 0, 0, -4.7625, 2.74963, 3.175, -6.35
60, 0, 0, 0, 5.49926, -6.35, 3.175
but actually it is,
*HONEY,蜂巢图案
0, 0, 0, 4.7625, 2.74963, 3.175, -6.35
120, 0, 0, 4.7625, 2.74963, 3.175, -6.35
60, 0, 0, 4.7625, 2.74963, -6.35, 3.175
so the question is why? how?
after a few hours ,I will come back...