几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】different results with dynamic and static lib (http://www.dimcax.com/hust/showthread.php?t=15694)

yang686526 2009-05-04 07:29 PM

【转帖】different results with dynamic and static lib
 
different results with dynamic and static lib ?
different results with dynamic and static lib ?
i explain the two procedures :
phase a)
i've add the code below in odwriteex project
program files\opendesignalliance\projectfiles\win32\msvc6\ examples\odwriteex\odwriteex.dsp
it works well
phase b)
i've add exactly the same code in my app the result is different except the call is done in a dll.
the only difference seems to be the lib
my opinion :
i think the method transformby for polyline2d was not updated in the dll concerned. the transformations seems to have no effect.
althoug the same transform works in a static version !
in phase a link is static :
//dd_vc6md_gi.lib dd_vc6md_modelergeometry.lib dd_vc6md_acisrenderer.lib dd_vc6md_acisbuilder.lib dd_vc6md_acis.lib dd_vc6md_db.lib dd_vc6md_ge.lib dd_vc6md_gs.lib dd_vc6md_root.lib
in phase b link is dynamic via dll:
//dd_gi_dll.lib dd_modelergeometry_dll.lib dd_acisrenderer_dll.lib dd_acisbuilder_dll.lib dd_acis_dll.lib dd_db_dll.lib dd_ge_dll.lib dd_gs_dll.lib dd_root_dll.lib
i've tried to change link settings in odwriteex.dsp project... but a lot of compiler errors arise at linkage
//dd_gi_dll.lib dd_modelergeometry_dll.lib dd_acisrenderer_dll.lib dd_acisbuilder_dll.lib dd_acis_dll.lib dd_db_dll.lib dd_ge_dll.lib dd_gs_dll.lib dd_root_dll.lib
i've also noticed that some
dd_acisbuilder_dll.lib
dd_vc6md_acisbuilder.lib doesn't
dd_vc6md_dwftoolkit.lib, dd_vc6md_ft.lib dd_vc6md_jpeg.lib dd_vc6md_svgexport.lib an other exist
dd_dwftoolkit_dll.lib, dd_ft_dll.lib dd_jpeg_dll.lib dd_svgexport_dll.lib don't
did i miss something else ?
void dbfiller::addmyentities(oddbdatabase* pdb,
const oddbobjectid& blockid) {
// open the block to which new entities will be added.
oddbblocktablerecordptr pblock = blockid.safeopenobject(oddb::kforwrite);
odgematrix3d agematrix3d;
oddb2dpolylineptr polyline1 = oddb2dpolyline::createobject();
// polyline must be added to the database before vertices can be added to it.
oddb2dvertexptr pdb2dvertexptr1 = oddb2dvertex::createobject();
oddb2dvertexptr pdb2dvertexptr2 = oddb2dvertex::createobject();
oddb2dvertexptr pdb2dvertexptr3 = oddb2dvertex::createobject();
oddb2dvertexptr pdb2dvertexptr4 = oddb2dvertex::createobject();
pdb2dvertexptr1->setposition(odgepoint3d(-800,0, 0));
pdb2dvertexptr2->setposition(odgepoint3d(-800,-1500, 0));
pdb2dvertexptr3->setposition(odgepoint3d(0,-1500, 0));
pdb2dvertexptr4->setposition(odgepoint3d(0,0, 0));
polyline1->appendvertex(pdb2dvertexptr1);
polyline1->appendvertex(pdb2dvertexptr2);
polyline1->appendvertex(pdb2dvertexptr3);
polyline1->appendvertex(pdb2dvertexptr4);
polyline1->makeclosed();
polyline1->setcolorindex(5, true);
polyline1->setnormal(odgevector3d(0,0,1));
polyline1->setthickness(-300);
agematrix3d.setcoordsystem( odgepoint3d(800, 1500.0, 300.0),
odgevector3d(1.0, 0.0, 0.0),
odgevector3d(0.0, 1.0, 0.0),
odgevector3d(0.0, 0.0, 1.0));
// agematrix3d.settranslation(odgevector3d(500,0,0));
if (polyline1->iskindof(oddb2dpolyline::desc())) {
odresult aresult = polyline1->transformby(agematrix3d);
}
pblock->appendoddbentity(polyline1);
}
subsidiary question : how is it possible to understand all the stuff about lib.
thanks for any help.
philippe


所有的时间均为北京时间。 现在的时间是 05:00 AM.