Author Topic: regenerate a hatch?  (Read 2084 times)

0 Members and 1 Guest are viewing this topic.

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
regenerate a hatch?
« on: July 09, 2010, 09:08:46 PM »
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...
I am a bilingualist,Chinese and Chinglish.

qjchen

  • Bull Frog
  • Posts: 285
  • Best wishes to all
Re: regenerate a hatch?
« Reply #1 on: July 10, 2010, 08:47:31 AM »
Hi, Highflybird :)

I am not sure whether this post will be similar to yours~

http://www.theswamp.org/index.php?topic=20355.0
http://qjchen.mjtd.com
My blog http://chenqj.blogspot.com (Chinese, can be translate into English)

highflyingbird

  • Bull Frog
  • Posts: 415
  • Later equals never.
Re: regenerate a hatch?
« Reply #2 on: July 10, 2010, 12:09:25 PM »
Hi, Highflybird :)

I am not sure whether this post will be similar to yours~

http://www.theswamp.org/index.php?topic=20355.0

Fantastic,yuanqiu,thanks a lot.
it's the exactally what I am looking for.
I am a bilingualist,Chinese and Chinglish.