查看单个帖子
旧 2009-05-07, 04:25 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】strange Behaviour For Acisout In Binary

strange behaviour for acisout in binary
strange behaviour for acisout in binary
hi,
on the attached dwg (created with autocad 2008), i do an acisout binary call like this :
code:
acisout(psstreamout, kaftypebinary | kafverany);but in the generated stream, the transform entity is dumped in text mode.
i saw in the file acisbuilder\abtransform.cpp the following function :
code:
auxstreamout& transform::export( auxstreamout& stm ) const
{
...
if ( stm.isbinary() ) stm.entertextmode();
...
}is there any reason why we go in text mode if we are binary ?
i attached the sab file generated by the acisout call (remove the .txt extension). if you look at it you can see that the transform is in text in the middle of binary data.
attached files
some entities are stored as literal string intrusions in binary stream. perhaps it is the case.
why do you need binary sat at all? as i understand it was designed for internal use mostly.
vladimir
we have a parser that read acis binary format. but if we use the binary you produce, we get an error parsing transfos written in text mode.
what is the purpose of writing partial text information in binary?
as there is no test in your reading of transfos, you may be unable to reload the files you write...
quote:
we have a parser that read acis binary format.
what specification it is based upon? (and which sabs it reads correctly?)
quote:
what is the purpose of writing partial text information in binary?
otherwise acad would not read it.
quote:
as there is no test in your reading of transfos, you may be unable to reload the files you write...
?
vladimir
quote:
originally posted by wvk
what specification it is based upon? (and which sabs it reads correctly?)
our parser is based on the acis specification and has some specific code to read asm data.
quote:
otherwise acad would not read it.
what do you mean? acad is able to read the files it produce...
as far as i know, when you read the stream from dwg, transformation come as binary... so if acad write them in binary, it should be able to read them as binary too.
or am i wrong?
quote:
as far as i know, when you read the stream from dwg, transformation come as binary... so if acad write them in binary, it should be able to read them as binary too.
or am i wrong?
probably you are wrong.
this statement (entertextmode) was introduced in the early stages of the acisbuilder development (in 2004) and since then it has been extensively used, so, i doubt that there is a bug in this function.
this can be tested of course, and you may do the test yourself, as you have the sources. just comment the statement, rebuild dd, create a sat with transform, import it in odamfcapp, save as dwg r18, and open in acad 2004.
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)