createPreview();
}
-TopoDS_Shape HYDROGUI_TranslateObstacleOp::getTranslatedShape() const
-{
- TopoDS_Shape aTranslatedShape;
-
- HYDROGUI_TranslateObstacleDlg* aPanel = (HYDROGUI_TranslateObstacleDlg*)inputPanel();
- if ( aPanel && !myEditedObject.IsNull() ) {
- double aDx = aPanel->getDx();
- double aDy = aPanel->getDy();
- double aDz = aPanel->getDz();
-
- TopoDS_Shape aShape = myEditedObject->GetShape3D();
- gp_Trsf aTrsf;
- gp_Vec aVec( aDx, aDy, aDz );
- aTrsf.SetTranslation(aVec);
- TopLoc_Location aLocOrig = aShape.Location();
- gp_Trsf aTrsfOrig = aLocOrig.Transformation();
- TopLoc_Location aLocRes( aTrsf * aTrsfOrig );
- aTranslatedShape = aShape.Located( aLocRes );
- }
-
- return aTranslatedShape;
-}
\ No newline at end of file