高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】how to judge the flag of exist offset in block
how to judge the flag of exist offset in block
how to judge the flag of exist offset in block
i have a dwg file, the orginal corrdinate of a entity have a offset base on block, other entity isnot base on block, how to judge the flag? thanks.
eg:
<*d192>
|
|--<acdbblockbegin> 10 point3d (166.181, -139.008, 0) //orginal corrdinate of block
|
|--<acdbline> 10 point3d(-116.839, -55.2917, 0) // it is offset corrdinate
<eingang_typ_2_1 10_9>
|
|--<acdbblockbegin> 10 point3d(166.181, -139.008, 0) // orginal corrdinate of block
|
|--<acdbline> 10 point3d(166.881, -139.008, 0) //it is absoult corrdinate
the point stored in block begin is a base point. it does not affect entities inside a block. it is used only when the block is inserted.
perhaps you don't take into account transformation matrix, attached to a block reference.
(see oddbblockreference::blocktransform())
vladimir
might you isn't understand my hanlde way, i need hanlde a block for a macro, then every entity in the block handled for a element of the macro, so, i need know the coordinate of the entity in blcok is a offset or not.
moreover there aren't blcok reference in blcok of my dwg file. pls tell me how to handle the state? thanks!
eg:
<*d192>
|
|--<acdbblockbegin> 10 point3d (166.181, -139.008, 0) //orginal corrdinate of block
|
|--<acdbline> 10 point3d(-116.839, -55.2917, 0) // it is offset corrdinate
|
|--<acdbblockend>
coordinates inside a block are not "relative" or "absolute". they are kind of "local".
until the block is inserted they make no sense.
when the block is inserted, world coordinates are obtained by applying block transform matrix to these local coordinates.
vladimir
|