+ 0000478: Segfault on insert part into 2D drawing (workaround)

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5144 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
wmayer
2011-11-17 10:31:04 +00:00
parent a512879ba1
commit e35a042c2d
4 changed files with 54 additions and 34 deletions

View File

@@ -119,11 +119,19 @@ void ProjectionAlgos::execute(void)
Handle( HLRBRep_Algo ) brep_hlr = new HLRBRep_Algo;
brep_hlr->Add(Input);
gp_Ax2 transform(gp_Pnt(0,0,0),gp_Dir(Direction.x,Direction.y,Direction.z));
HLRAlgo_Projector projector( transform );
brep_hlr->Projector(projector);
brep_hlr->Update();
brep_hlr->Hide();
try {
#if defined(__GNUC__) && defined (FC_OS_LINUX)
Base::SignalException se;
#endif
gp_Ax2 transform(gp_Pnt(0,0,0),gp_Dir(Direction.x,Direction.y,Direction.z));
HLRAlgo_Projector projector( transform );
brep_hlr->Projector(projector);
brep_hlr->Update();
brep_hlr->Hide();
}
catch (...) {
Standard_Failure::Raise("Fatal error occurred while projecting shape");
}
// extracting the result sets:
HLRBRep_HLRToShape shapes( brep_hlr );