problem with oddb2dpolyline::transformby (odgematrix3d&)
problem with oddb2dpolyline::transformby (odgematrix3d&)
transformby doesn´t work with appended vertices.
the same logic with simple lines works.
i´ve looked to the implementation of oddb2dpolyline::transformby (...) .
the function step over the vertices and calls
oddb2dverteximpl::getimpl(pvert)->transformby(trans, scale);
my own code :
oddb2dpolylineptr ppolyline = oddb2dpolyline::createobject();
for ( ... )
{
oddb2dvertexptr pvertex = oddb2dvertex::createobject();
...
ppolyline->appendvertex(pvertex);
}
odgematrix3d xform;
xform.settoscaling ( 0.001 );
odresult result = m_ppolyline ->transformby ( xform );
assert ( result == eok );
...
precord = m_activeblockrecordid.openobject (oddb::kforwrite);
objectid = precord->appendoddbentity ( ppolyline );
...
last edited by
uspiess@nemetschek.de; 7th may 2004 at 12:41 amfff">.
this bug is already fixed for upcoming 1.11 release.
possible work around is to add the polyline to database first and call transformby() after that.
the reason is that if an entity container is not database resident subentity iterator skips all subentities (it treats them as erased). passing openerased=true to the iterator can also heal the problem but it required transformby() body editing.
sergey slezkin