高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】hatch loop types
hatch loop types
hatch loop types
hello everybody.
i'm trying to import a dxf file. my problem is that i don't know how to know what are the different hatch loop types. i've checked the hatch types of my dxf file and i've gotten values like 7 or 15, and the different loop types are these:
enum hatchlooptype
{
kdefault = 0,
kexternal = 1,
kpolyline = 2,
kderived = 4,
ktextbox = 8,
koutermost = 0x10,
knotclosed = 0x20,
kselfintersecting = 0x40,
ktextisland = 0x80
}
someboyd knows how could i know when a loop is or not a polyline?
thank you in advance.
david.
enum contains bit flags so
7 = kexternal | kpolyline | kderived
sergey slezkin
thank you for your answer sergey.
i've understood the answer but i don't know how could i know what's exactly the loop type if this type is, for instance, 15 or 30 or whatever it be.
my question is, how could i know if this loop is a polyline or a circle or an arc or an ellipse, etc...?
thanks again.
david.
if kpolyline bit is set in 'looptype' than boundary is represented by polyline. else it consists of a number of edges. edges can be line, circ arc, ell arc, spline.
look into autocad's dxf help for example to learn about hatch boundary representation.
sergey slezkin
hello sergey.
i don't have the autocad. i'm developing an application to convert dxf files to my own format. do you know where could i obtain this autocad's dxf help that you have mentioned in your last post?
thanks.
david.
hatch loop can be represented by polyline or by array of 2d odge entities.
if kpolyline bit is set in loop type the loop is polyline.
different getloopat() functions should be used to get loop of 2 types. one of them returns odgepolyline and other - array of edges.
it's very problematic thing to write a converter without ability to create source files by "native" application.
dxf is open format and probably it's specification can be found at autodesk's site.
you also can download from autodesk's site objectarx for free. it's help would be of great use.
sergey slezkin
thanks for this very useful information
i don't know what the diffrent types of loops mean, too. your interface-documentation contains the same information then the autocad documentation.
so i lose a lot of time to figure out...
it's not nice to get such usefull answers.
|