Catched exceptions are now passed by reference and error message is printed.
Added Standard_FALLTHROUGH to IVtkOCC_ShapePickerAlgo::SetSelectionMode().
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#include <IVtkOCC_SelectableObject.hxx>
+
#include <AIS_Shape.hxx>
#include <BRepBndLib.hxx>
-#include <IVtkOCC_SelectableObject.hxx>
+#include <Message.hxx>
#include <Select3D_SensitiveBox.hxx>
#include <SelectMgr_Selection.hxx>
#include <Standard_ErrorHandler.hxx>
myOCCTDrawer->DeviationAngle(),
isAutoTriangulation);
}
- catch (Standard_Failure)
+ catch (const Standard_Failure& anException)
{
+ Message::SendFail (TCollection_AsciiString("Error: IVtkOCC_SelectableObject::ComputeSelection(") + theMode + ") has failed ("
+ + anException.GetMessageString() + ")");
if (theMode == 0)
{
Bnd_Box aBndBox = BoundingBox();
Handle(StdSelect_BRepOwner) aOwner = new StdSelect_BRepOwner (anOcctShape, this);
- Handle(Select3D_SensitiveBox) aSensitiveBox =
- new Select3D_SensitiveBox (aOwner, aBndBox);
+ Handle(Select3D_SensitiveBox) aSensitiveBox = new Select3D_SensitiveBox (aOwner, aBndBox);
theSelection->Add (aSensitiveBox);
}
}
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#include <IVtkOCC_ShapeMesher.hxx>
+
#include <Adaptor3d_IsoCurve.hxx>
#include <Bnd_Box.hxx>
#include <BRep_Tool.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Pnt2d.hxx>
-#include <IVtkOCC_ShapeMesher.hxx>
+#include <Message.hxx>
#include <NCollection_Array1.hxx>
#include <Poly_Polygon3D.hxx>
#include <Poly_PolygonOnTriangulation.hxx>
anAlgo->Perform();
}
}
- catch (Standard_Failure)
- { }
+ catch (const Standard_Failure& anException)
+ {
+ Message::SendFail (TCollection_AsciiString("Error: IVtkOCC_ShapeMesher::meshShape() triangulation builder has failed (")
+ + anException.GetMessageString() + ")");
+ }
}
//================================================================
addWFFace (anOcctFace,
GetShapeObj()->GetSubShapeId (anOcctFace));
}
- catch (Standard_Failure)
- { }
+ catch (const Standard_Failure& anException)
+ {
+ Message::SendFail (TCollection_AsciiString("Error: addWireFrameFaces() wireframe presentation builder has failed (")
+ + anException.GetMessageString() + ")");
+ }
}
}
// Update the selection for the given mode according to its status.
const Handle(SelectMgr_Selection)& aSel = aSelObj->Selection (theMode);
-
switch (aSel->UpdateStatus())
{
case SelectMgr_TOU_Full:
+ {
// Recompute the sensitive primitives which correspond to the mode.
myViewerSelector->RemoveSelectionOfObject (aSelObj, aSelObj->Selection (theMode));
aSelObj->RecomputePrimitives (theMode);
myViewerSelector->AddSelectionToObject (aSelObj, aSelObj->Selection (theMode));
myViewerSelector->RebuildObjectsTree();
myViewerSelector->RebuildSensitivesTree (aSelObj);
+ }
+ Standard_FALLTHROUGH
case SelectMgr_TOU_Partial:
+ {
+ if (aSelObj->HasTransformation())
{
- if (aSelObj->HasTransformation())
- {
- myViewerSelector->RebuildObjectsTree();
- }
- break;
+ myViewerSelector->RebuildObjectsTree();
}
+ break;
+ }
default:
break;
}