Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics

Remove all TopLoc_Location after IGES/STEP import

Remove all TopLoc_Location after IGES/STEP import
viallet 2012/03/22 09:35
Hi everybody,
I have a problem after importing IGES/STEP file. I want to remove all TopLoc_Location associated to each TopoDS_Shape in order to have real objects (Geom_Surface, Geom_Curve) inside the real coordinate system.
I want to do this because we transform after that the geom objects into our own object and we cannot manage TopLoc_Location.
Is there is simple way to do this? Because i try to apply TopLoc_Location on each geom obj but some TopoDS_Shape share same TopLoc_Location....and i don't understand correclty the mechanism.

Thanks a lot by advance.
Francesco 2012/03/22 11:28
you can try with ShapeUpgrade_RemoveLocations.
if you have a TopoDS_Solid mySol:
ShapeUpgrade_RemoveLocations sh_rem;
Standard_Boolean ret = sh_rem.Remove (mySol);
// then check ret :-)
TopoDS_Solid retSol = TopoDS::Solid(sh_rem.GetResult ()) ;

Then for every old face you can also get the new one
const TopoDS_Shape & newF = sh_rem.ModifiedShape(oldF);
viallet 2012/03/26 16:30
Thanks for your reply,
I try this function but i think this method just remove location of TopoDS_Shape, but doesn't modify the real Geom_Surface and Geom_Curve.
For example, if there is a transformation location inside a TopoDS_Face, the geom_surface is not translated.
I may made a mistake.....

Thanks for your help.
Francesco 2012/04/18 16:31
in my code it works...     
Latest news
  • Open CASCADE JT Assistant Sources
  • JT Assistant Linux and CAD Assistant
  • Open CASCADE JT Assistant

  • © OPEN CASCADE 2000 - 2015  |  Search  |  Contacts   |  Site map