dxf->writeHatch, but how ?

Use this forum to ask questions about how to do things in dxflib.

Moderator: andrew

dxf->writeHatch, but how ?

Postby bonsalty » Wed Jun 10, 2009 10:12 am

I havent found how to write a hatch into dxf

We have:
void DL_Dxf::writeHatch1 ( DL_WriterA & dw,
const DL_HatchData & data,
const DL_Attributes & attrib
)
where DL_HatchData (int hNumLoops, bool hSolid, double hScale, double hAngle, const string &hPattern)

First question: what shoud hPattern be and whats this hNumLoops all about?
Second question:

If I call :
void DL_Dxf::writeHatchLoop1 ( DL_WriterA & dw,
const DL_HatchLoopData & data
)
should I call the writeHatchEdge functions after this or before the writeHatchLoop?

Third question,why must I call writeHatch2 and how to use it ????

An example would be nice,since its impossible to decode it from the ribbonsofts class reference. Thank you!
bonsalty
 
Posts: 9
Joined: Tue Jun 09, 2009 2:54 pm

Postby andrew » Wed Jun 10, 2009 2:11 pm

andrew
Site Admin
 
Posts: 1839
Joined: Fri Mar 30, 2007 6:07 am

works, but not everything...

Postby bonsalty » Wed Jun 10, 2009 7:27 pm

Thanks I managed to use it. I inserted a single loop with 3 edges(a triangle :) ) and succeded to make a triangle with hatch.

But pattern name is still a mistery.
I tried "EARTH", "ANSI31",... default pattern names,but nothing happens. However I can see that names in autocad when I click on my hatchobject, but it doesnt change the hatch style?!
I tried rotate and scale property too,they doesnt work either. Its always a 45 degree hatch.The solid property works fine.
bonsalty
 
Posts: 9
Joined: Tue Jun 09, 2009 2:54 pm


Return to dxflib 'How Do I' Questions

Who is online

Users browsing this forum: No registered users and 0 guests