高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】problems using odmodelergeometrycreator
problems using odmodelergeometrycreator
problems using odmodelergeometrycreator
hi,
i've problems using odmodelergeometrycreator:
problem 1
the function :: odrxgetmodelergeometrycreatorservice();
returns a null-ptr, so all modeller actions are invalid.
i use dd2.2.1, in an older dd2.1.x-version this code worked.
---------------------------------------------------------
problem 2
i have to read / write sab (not sat) files. in all dd-versions where i tested so far, dd seems not to be able to handle sab as i would expect it should work:
is the following code correct ?
odmemorystreamptr mem = odmemorystream::createnew();
odrxclassptr pservice = :: odrxgetmodelergeometrycreatorservice();
if (!pservice.isnull())
{
// this code is skipped in dd2.2.1 as (pservice==null) :-(
odmodelergeometrycreatorptr pcreator;
pcreator = pservice->create();
if (!pcreator.isnull())
{
odarray<odmodelergeometryptr> mgarray;
oddbentityptrarray entityarray;
oddb3dsolidptr pe = oddb3dsolid::createobject();
pe->createbox(10, 20, 30);
entityarray.append(pe);
odresult ressat = pcreator->createsat(entityarray, mem, kafver700 | kaftypebinary, true); // this returns eok in dd2.1.x
// here i usually would save mem to disk, and do what ever i like
// days later i would reload mem and continue :
odresult resin = pcreator->createmodeler(mgarray, mem, true);
// resin reports an error: egeneralmodelingfailure
}
}
thanks
dirk
problem 1: i think that "modelergeometry.drx" module missed in application.exe folder.
code:
toolkit_export odrxclassptr odrxgetmodelergeometrycreatorservice()
{
odrxclassptr pservice = odrxservicedictionary()->getat(dd_t("odmodelergeometrycreator"));
if (pservice.isnull())
{
odrxmoduleptr pmodule = odrxdynamiclinker()->loadapp(rx_modeler_geometry_appname);
if (pmodule.get())
{
pservice = odrxservicedictionary()->getat(dd_t("odmodelergeometrycreator"));
}
}
return pservice;
}
last edited by sslezkin; 2nd march 2007 at 04:54 amfff">.
problem 2: please, add
mem->rewind();
before
odresult resin = pcreator->createmodeler(mgarray, mem, true);
thanks, that worked.
now i have a second problem. i have a sab file from another software (using acis). this file is saved as acis 7.00 sab format. it can't be loaded with dd220.
i get an exception with the description "brep error 2".
i do not know if this file is corrupt or if dd has a problem.
the file is attached. it should contain a simple box.
thanks
d.demand
attached files (1.2 kb, 3 views)
hi,
what was a method of attachment creation ? spatial acis library based application or something else?
is it possible to attach sat and dwg file ? dwg is a better.
i found that sab has slightly different file format from autocad generated. one of color attribute stores vector data like set of 3 double, but autocad stores it like vectorid + 3 double.
last edited by sslezkin; 5th march 2007 at 03:37 amfff">.
yes its spatial acis based. its using version acis 14.
but the file is saved to version 7
i attached the dwg zip
attached files (3.5 kb, 3 views)
hi,
problem was with rgb_color-st-attrib, but there is no rgb_color-st-attrib in dwg so it cannot help.
i think that it is a bug in toolkit. so it will be fixed in the next release, also i can email to you changes, if you are founding member of oda.
please, test attachment with spatial acis. it is output of toolkit acisout as sab. is it readable with spatial acis?
attached files (1.3 kb, 1 views)
yes i can load the file. i could load the old file from oda too.
no we are no founding members, so the quick changes do not help me. :-(
if you need more info, search the web for "sat save file format".
you will find a pdf file.
sab files an the color attribute is described there too.
thanks for the quick answers.
d.demand
thanks.
i have sat\sab documentation.
our acisbuilder tested with autocad's sab\sat in general. 99% of tests we got from autocad dxf\dwg files and 1% from spatial acis. so here is potencial bugs due to differences between autocad & spatial acis.
|