0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presen...
authorkgv <kgv@opencascade.com>
Wed, 24 Apr 2019 16:53:17 +0000 (19:53 +0300)
committerbugmaster <bugmaster@opencascade.com>
Mon, 6 May 2019 12:57:56 +0000 (15:57 +0300)
Removed redundant proxy class Prs3d_Presentation - Graphic3d_Structure now should be used directly.
Removed auxiliary class PrsMgr_ModedPresentation holding Structure and Display Mode index (field has been moved to Structure itself),
so that PrsMgr_Presentations (AIS_InteractiveObject::Presentations()) now holds Structures directly.
PrsMgr_Prs proxy class has been removed, and PrsMgr_Presentation now inherits Graphic3d_Structure.

Graphic3d_Structure, maps declarations have been corrected to use class instead of void*, which allowed to avoid redundant casts.
Several methods have been also modified to avoid creating Handle from this pointer.
AIS package headers have been cleaned up from forward declaration of Prs3d_Presentation class.

Fixed dereference of destroyed presentations within connected and HLR computed objects:
- AIS_InteractiveContext::Disconnect() now erases connected presentation.
- Graphic3d_CView::Clear() now removes destructed structures from Computed list.

- fix inaccessibility of PrsMgr_Presentation methods

105 files changed:
dox/dev_guides/upgrade/upgrade.md
src/AIS/AIS.cxx
src/AIS/AIS.hxx
src/AIS/AIS_Chamf2dDimension.hxx
src/AIS/AIS_Chamf3dDimension.hxx
src/AIS/AIS_ConcentricRelation.hxx
src/AIS/AIS_ConnectedInteractive.cxx
src/AIS/AIS_EqualDistanceRelation.hxx
src/AIS/AIS_EqualRadiusRelation.hxx
src/AIS/AIS_FixRelation.hxx
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_InteractiveContext_2.cxx
src/AIS/AIS_InteractiveObject.cxx
src/AIS/AIS_InteractiveObject.hxx
src/AIS/AIS_LengthDimension.hxx
src/AIS/AIS_MaxRadiusDimension.hxx
src/AIS/AIS_MidPointRelation.hxx
src/AIS/AIS_MinRadiusDimension.hxx
src/AIS/AIS_MultipleConnectedInteractive.cxx
src/AIS/AIS_OffsetDimension.hxx
src/AIS/AIS_ParallelRelation.hxx
src/AIS/AIS_PerpendicularRelation.hxx
src/AIS/AIS_PointCloud.cxx
src/AIS/AIS_Relation.hxx
src/AIS/AIS_Shape.cxx
src/AIS/AIS_SymmetricRelation.hxx
src/AIS/AIS_TangentRelation.hxx
src/AIS/AIS_TexturedShape.cxx
src/AIS/AIS_Triangulation.cxx
src/AIS/AIS_Triangulation.hxx
src/DsgPrs/DsgPrs.cxx
src/DsgPrs/DsgPrs.hxx
src/DsgPrs/DsgPrs_AnglePresentation.hxx
src/DsgPrs/DsgPrs_Chamf2dPresentation.hxx
src/DsgPrs/DsgPrs_ConcentricPresentation.hxx
src/DsgPrs/DsgPrs_DiameterPresentation.hxx
src/DsgPrs/DsgPrs_EllipseRadiusPresentation.hxx
src/DsgPrs/DsgPrs_EqualDistancePresentation.hxx
src/DsgPrs/DsgPrs_EqualRadiusPresentation.hxx
src/DsgPrs/DsgPrs_FilletRadiusPresentation.hxx
src/DsgPrs/DsgPrs_FixPresentation.hxx
src/DsgPrs/DsgPrs_IdenticPresentation.hxx
src/DsgPrs/DsgPrs_LengthPresentation.hxx
src/DsgPrs/DsgPrs_MidPointPresentation.hxx
src/DsgPrs/DsgPrs_OffsetPresentation.hxx
src/DsgPrs/DsgPrs_ParalPresentation.hxx
src/DsgPrs/DsgPrs_PerpenPresentation.hxx
src/DsgPrs/DsgPrs_RadiusPresentation.hxx
src/DsgPrs/DsgPrs_ShadedPlanePresentation.hxx
src/DsgPrs/DsgPrs_ShapeDirPresentation.hxx
src/DsgPrs/DsgPrs_SymbPresentation.hxx
src/DsgPrs/DsgPrs_SymmetricPresentation.hxx
src/DsgPrs/DsgPrs_TangentPresentation.hxx
src/DsgPrs/DsgPrs_XYZAxisPresentation.hxx
src/DsgPrs/DsgPrs_XYZPlanePresentation.hxx
src/Graphic3d/FILES
src/Graphic3d/Graphic3d_CView.cxx
src/Graphic3d/Graphic3d_CView.hxx
src/Graphic3d/Graphic3d_IndexedMapOfAddress.hxx [deleted file]
src/Graphic3d/Graphic3d_Structure.cxx
src/Graphic3d/Graphic3d_Structure.hxx
src/Graphic3d/Graphic3d_StructureManager.cxx
src/Graphic3d/Graphic3d_StructureManager.hxx
src/MeshVS/MeshVS_ElementalColorPrsBuilder.hxx
src/MeshVS/MeshVS_Mesh.cxx
src/MeshVS/MeshVS_Mesh.hxx
src/MeshVS/MeshVS_MeshPrsBuilder.hxx
src/MeshVS/MeshVS_NodalColorPrsBuilder.hxx
src/MeshVS/MeshVS_PrsBuilder.hxx
src/MeshVS/MeshVS_TextPrsBuilder.hxx
src/MeshVS/MeshVS_VectorPrsBuilder.hxx
src/Prs3d/FILES
src/Prs3d/Prs3d.hxx
src/Prs3d/Prs3d_Presentation.cxx [deleted file]
src/Prs3d/Prs3d_Presentation.hxx
src/Prs3d/Prs3d_PresentationShadow.cxx
src/Prs3d/Prs3d_PresentationShadow.hxx
src/PrsMgr/FILES
src/PrsMgr/PrsMgr_ModedPresentation.cxx [deleted file]
src/PrsMgr/PrsMgr_ModedPresentation.hxx [deleted file]
src/PrsMgr/PrsMgr_PresentableObject.cxx
src/PrsMgr/PrsMgr_PresentableObject.hxx
src/PrsMgr/PrsMgr_Presentation.cxx
src/PrsMgr/PrsMgr_Presentation.hxx
src/PrsMgr/PrsMgr_PresentationManager.cxx
src/PrsMgr/PrsMgr_PresentationManager.hxx
src/PrsMgr/PrsMgr_Presentations.hxx
src/PrsMgr/PrsMgr_Prs.cxx [deleted file]
src/PrsMgr/PrsMgr_Prs.hxx [deleted file]
src/QABugs/QABugs_PresentableObject.hxx
src/SelectMgr/SelectMgr_SelectableObject.hxx
src/StdPrs/StdPrs_Curve.hxx
src/StdPrs/StdPrs_DeflectionCurve.hxx
src/StdPrs/StdPrs_HLRPolyShape.hxx
src/StdPrs/StdPrs_Plane.hxx
src/StdPrs/StdPrs_PoleCurve.hxx
src/StdPrs/StdPrs_ShadedShape.hxx
src/StdPrs/StdPrs_ShadedSurface.hxx
src/StdPrs/StdPrs_WFDeflectionRestrictedFace.hxx
src/StdPrs/StdPrs_WFDeflectionSurface.hxx
src/StdPrs/StdPrs_WFPoleSurface.hxx
src/StdPrs/StdPrs_WFSurface.hxx
src/StdSelect/StdSelect_Shape.hxx
src/ViewerTest/ViewerTest.cxx
src/XCAFPrs/XCAFPrs_AISObject.cxx

index 1846d04..a01664d 100644 (file)
@@ -1738,6 +1738,12 @@ or updating presentation without recomputation (see *AIS_InteractiveObject::Sync
 * *Aspect_IS_HIDDENLINE* does not implicitly enables drawing mesh edges anymore.
   Specify Graphic3d_AspectFillArea3d::SetDrawEdges(true) with Graphic3d_AspectFillArea3d::SetInteriorStyle(Aspect_IS_HIDDENLINE) to get previous behavior of Aspect_IS_HIDDENLINE style.
 
+@subsection upgrade_740_modedprs PrsMgr_ModedPresentation removal
+
+Proxy classes *Prs3d_Presentation*, *PrsMgr_ModedPresentation* and *PrsMgr_Prs* have been removed.
+Code iterating through the list of low-level structures AIS_InteractiveObject::Presentations() should be updated to access PrsMgr_Presentation directly.
+Forward declarations of *Prs3d_Presentation* should be corrected, since it is now a typedef to *Graphic3d_Structure*.
+
 @subsection upgrade_740_geproj Custom defines within env.bat
 
 *env.bat* produced by Visual Studio project generator *genproj.bat* has been modified so that *%CSF_DEFINES%* variable is reset to initial state.
index 60b6067..fa84613 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <AIS.hxx>
 
 #include <Adaptor3d_HCurve.hxx>
 #include <Adaptor3d_HSurface.hxx>
-#include <AIS.hxx>
 #include <Bnd_Box.hxx>
 #include <BRep_Tool.hxx>
 #include <BRepAdaptor_Curve.hxx>
index 27559d4..70cc8ce 100644 (file)
 #ifndef _AIS_HeaderFile
 #define _AIS_HeaderFile
 
+#include <AIS_KindOfSurface.hxx>
+#include <Aspect_TypeOfLine.hxx>
+#include <Aspect_TypeOfMarker.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Pnt.hxx>
+#include <Quantity_NameOfColor.hxx>
+#include <Prs3d_Drawer.hxx>
+#include <Prs3d_Presentation.hxx>
 #include <Standard.hxx>
 #include <Standard_DefineAlloc.hxx>
 #include <Standard_Handle.hxx>
 
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Real.hxx>
-#include <AIS_KindOfSurface.hxx>
-#include <Prs3d_Drawer.hxx>
-#include <Quantity_NameOfColor.hxx>
-#include <Aspect_TypeOfLine.hxx>
-#include <Aspect_TypeOfMarker.hxx>
-class gp_Pnt;
-class TopoDS_Shape;
-class gp_Lin;
+class Bnd_Box;
 class Geom_Curve;
-class TopoDS_Edge;
 class Geom_Plane;
-class TopoDS_Vertex;
-class TopoDS_Face;
-class gp_Pln;
 class Geom_Surface;
-class gp_Dir;
-class Bnd_Box;
-class gp_Elips;
-class Prs3d_Presentation;
-class AIS_Triangulation;
-class AIS_InteractiveContext;
-class AIS_GraphicTool;
-class AIS_GlobalStatus;
-class AIS_InteractiveObject;
-class AIS_Point;
-class AIS_Axis;
-class AIS_Trihedron;
-class AIS_PlaneTrihedron;
-class AIS_Line;
-class AIS_Circle;
-class AIS_Plane;
-class AIS_Shape;
-class AIS_ConnectedInteractive;
-class AIS_MultipleConnectedInteractive;
-class AIS_DimensionOwner;
-class AIS_Relation;
-class AIS_EllipseRadiusDimension;
-class AIS_MaxRadiusDimension;
-class AIS_MinRadiusDimension;
-class AIS_Chamf2dDimension;
-class AIS_Chamf3dDimension;
-class AIS_OffsetDimension;
-class AIS_FixRelation;
-class AIS_PerpendicularRelation;
-class AIS_ParallelRelation;
-class AIS_TangentRelation;
-class AIS_ConcentricRelation;
-class AIS_IdenticRelation;
-class AIS_SymmetricRelation;
-class AIS_MidPointRelation;
-class AIS_EqualRadiusRelation;
-class AIS_EqualDistanceRelation;
-class AIS_TypeFilter;
-class AIS_SignatureFilter;
-class AIS_ExclusionFilter;
-class AIS_AttributeFilter;
-class AIS_C0RegularityFilter;
-class AIS_BadEdgeFilter;
-class AIS_Selection;
-
+class TopoDS_Edge;
+class TopoDS_Face;
+class TopoDS_Shape;
+class TopoDS_Vertex;
 
 //! Application Interactive Services provide the means to create links between an application GUI viewer and
 //! the packages which are used to manage selection and presentation.
index d7adc21..278e80c 100644 (file)
 #ifndef _AIS_Chamf2dDimension_HeaderFile
 #define _AIS_Chamf2dDimension_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
+#include <AIS_KindOfDimension.hxx>
 #include <AIS_Relation.hxx>
-#include <Standard_Real.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-#include <AIS_KindOfDimension.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class TCollection_ExtendedString;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
+#include <gp_Dir.hxx>
 
+class Geom_Plane;
 
-class AIS_Chamf2dDimension;
 DEFINE_STANDARD_HANDLE(AIS_Chamf2dDimension, AIS_Relation)
 
 //! A framework to define display of 2D chamfers.
@@ -48,10 +32,9 @@ DEFINE_STANDARD_HANDLE(AIS_Chamf2dDimension, AIS_Relation)
 //! chamfer, or the angle if it is not.
 class AIS_Chamf2dDimension : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_Chamf2dDimension, AIS_Relation)
 public:
 
-  
   //! Constructs the display object for 2D chamfers.
   //! This object is defined by the face aFShape, the
   //! dimension aVal, the plane aPlane and the text aText.
@@ -79,18 +62,7 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_Chamf2dDimension,AIS_Relation)
-
-protected:
-
-
-
-
 private:
-
   
   Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
@@ -101,14 +73,8 @@ private:
   gp_Pnt myPntAttach;
   gp_Dir myDir;
 
-
 };
 
-
 #include <AIS_Chamf2dDimension.lxx>
 
-
-
-
-
 #endif // _AIS_Chamf2dDimension_HeaderFile
index 50d4ebf..1e8c6db 100644 (file)
 #ifndef _AIS_Chamf3dDimension_HeaderFile
 #define _AIS_Chamf3dDimension_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
+#include <AIS_KindOfDimension.hxx>
 #include <AIS_Relation.hxx>
-#include <Standard_Real.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-#include <AIS_KindOfDimension.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class TCollection_ExtendedString;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
+#include <gp_Dir.hxx>
 
-class AIS_Chamf3dDimension;
 DEFINE_STANDARD_HANDLE(AIS_Chamf3dDimension, AIS_Relation)
 
 //! A framework to define display of 3D chamfers.
@@ -47,10 +30,9 @@ DEFINE_STANDARD_HANDLE(AIS_Chamf3dDimension, AIS_Relation)
 //! chamfer, or the angle if it is not.
 class AIS_Chamf3dDimension : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_Chamf3dDimension, AIS_Relation)
 public:
 
-  
   //! Constructs a display object for 3D chamfers.
   //! This object is defined by the shape aFShape, the
   //! dimension aVal and the text aText.
@@ -78,19 +60,8 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_Chamf3dDimension,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
-  
   Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
@@ -100,14 +71,8 @@ private:
   gp_Pnt myPntAttach;
   gp_Dir myDir;
 
-
 };
 
-
 #include <AIS_Chamf3dDimension.lxx>
 
-
-
-
-
 #endif // _AIS_Chamf3dDimension_HeaderFile
index 620381a..af88f42 100644 (file)
 #ifndef _AIS_ConcentricRelation_HeaderFile
 #define _AIS_ConcentricRelation_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <Standard_Real.hxx>
-#include <gp_Dir.hxx>
 #include <AIS_Relation.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
+#include <gp_Dir.hxx>
 
+class Geom_Plane;
 
-class AIS_ConcentricRelation;
 DEFINE_STANDARD_HANDLE(AIS_ConcentricRelation, AIS_Relation)
 
 //! A framework to define a constraint by a relation of
@@ -44,10 +31,9 @@ DEFINE_STANDARD_HANDLE(AIS_ConcentricRelation, AIS_Relation)
 //! relation of concentricity can be extended.
 class AIS_ConcentricRelation : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_ConcentricRelation, AIS_Relation)
 public:
 
-  
   //! Constructs the display object for concentric relations
   //! between shapes.
   //! This object is defined by the two shapes, aFShape
@@ -65,19 +51,8 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_ConcentricRelation,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
-  
   Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
@@ -95,13 +70,6 @@ private:
   gp_Dir myDir;
   gp_Pnt myPnt;
 
-
 };
 
-
-
-
-
-
-
 #endif // _AIS_ConcentricRelation_HeaderFile
index 6a655f6..cd58808 100644 (file)
@@ -23,7 +23,6 @@
 #include <Precision.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_Projector.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
 #include <Select3D_SensitiveEntity.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_Selection.hxx>
@@ -92,12 +91,12 @@ void AIS_ConnectedInteractive::connect (const Handle(AIS_InteractiveObject)& the
 
 void AIS_ConnectedInteractive::Disconnect()
 {
-  for(Standard_Integer aPrsIter = 1; aPrsIter <= myPresentations.Length(); ++aPrsIter)
+  for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
   {
-    const Handle(PrsMgr_Presentation)& aPrs = myPresentations (aPrsIter).Presentation();
+    const Handle(PrsMgr_Presentation)& aPrs = aPrsIter.Value();
     if (!aPrs.IsNull())
     {
-      aPrs->Presentation()->DisconnectAll (Graphic3d_TOC_DESCENDANT);
+      aPrs->DisconnectAll (Graphic3d_TOC_DESCENDANT);
     }
   }
 }
@@ -112,7 +111,7 @@ void AIS_ConnectedInteractive::Compute (const Handle(PrsMgr_PresentationManager3
   if (HasConnection())
   {
     thePrs->Clear (Standard_False);
-    thePrs->RemoveAll();
+    thePrs->DisconnectAll (Graphic3d_TOC_DESCENDANT);
 
     if (!myReference->HasInteractiveContext())
     {
index ab21457..b119072 100644 (file)
 #ifndef _AIS_EqualDistanceRelation_HeaderFile
 #define _AIS_EqualDistanceRelation_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <gp_Pnt.hxx>
 #include <AIS_Relation.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-#include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-#include <DsgPrs_ArrowSide.hxx>
 #include <AIS_TypeOfDist.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-class TopoDS_Edge;
-class Bnd_Box;
-class gp_Pnt;
-class TopoDS_Vertex;
+#include <DsgPrs_ArrowSide.hxx>
 
+class Geom_Plane;
 
-class AIS_EqualDistanceRelation;
 DEFINE_STANDARD_HANDLE(AIS_EqualDistanceRelation, AIS_Relation)
 
 //! A framework to display equivalent distances between
@@ -52,10 +32,9 @@ DEFINE_STANDARD_HANDLE(AIS_EqualDistanceRelation, AIS_Relation)
 //! These distances are used to compare shapes by this vector alone.
 class AIS_EqualDistanceRelation : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_EqualDistanceRelation,AIS_Relation)
 public:
 
-  
   //! Constructs a framework to display equivalent
   //! distances between the shapes aShape1, aShape2,
   //! aShape3, aShape4 and the plane aPlane.
@@ -105,19 +84,8 @@ public:
   //! a line or a circle.
   Standard_EXPORT static void ComputeOneEdgeOneVertexLength (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Real ArrowSize, const TopoDS_Shape& FirstShape, const TopoDS_Shape& SecondShape, const Handle(Geom_Plane)& Plane, const Standard_Boolean AutomaticPos, const Standard_Boolean IsSetBndBox, const Bnd_Box& BndBox, gp_Pnt& Position, gp_Pnt& FirstAttach, gp_Pnt& SecondAttach, gp_Pnt& FirstExtreme, gp_Pnt& SecondExtreme, DsgPrs_ArrowSide& SymbolPrs);
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_EqualDistanceRelation,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
-  
   Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
@@ -135,14 +103,8 @@ private:
   gp_Pnt myPoint3;
   gp_Pnt myPoint4;
 
-
 };
 
-
 #include <AIS_EqualDistanceRelation.lxx>
 
-
-
-
-
 #endif // _AIS_EqualDistanceRelation_HeaderFile
index ae22ff8..0680585 100644 (file)
 #ifndef _AIS_EqualRadiusRelation_HeaderFile
 #define _AIS_EqualRadiusRelation_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
 #include <AIS_Relation.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Edge;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
 
+class Geom_Plane;
 
-class AIS_EqualRadiusRelation;
 DEFINE_STANDARD_HANDLE(AIS_EqualRadiusRelation, AIS_Relation)
 
-
 class AIS_EqualRadiusRelation : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_EqualRadiusRelation, AIS_Relation)
 public:
 
-  
   //! Creates equal relation of two arc's radiuses.
   //! If one of edges is not in the given plane,
   //! the presentation method projects it onto the plane.
@@ -56,19 +42,8 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_EqualRadiusRelation,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
-  
   Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
@@ -82,13 +57,6 @@ private:
   gp_Pnt myFirstPoint;
   gp_Pnt mySecondPoint;
 
-
 };
 
-
-
-
-
-
-
 #endif // _AIS_EqualRadiusRelation_HeaderFile
index 39e1183..4ee25eb 100644 (file)
 #ifndef _AIS_FixRelation_HeaderFile
 #define _AIS_FixRelation_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
 #include <TopoDS_Wire.hxx>
-#include <gp_Pnt.hxx>
 #include <AIS_Relation.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class TopoDS_Wire;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-class TopoDS_Vertex;
-class Geom_Curve;
-class TopoDS_Edge;
-class gp_Lin;
-class gp_Circ;
 
+class Geom_Plane;
 
-class AIS_FixRelation;
 DEFINE_STANDARD_HANDLE(AIS_FixRelation, AIS_Relation)
 
 //! Constructs and manages a constraint by a fixed
@@ -55,9 +34,8 @@ DEFINE_STANDARD_HANDLE(AIS_FixRelation, AIS_Relation)
 //! object.
 class AIS_FixRelation : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_FixRelation, AIS_Relation)
 public:
-
   
   //! initializes the vertex aShape, the
   //! plane aPlane and the wire aWire, which connects
@@ -98,16 +76,6 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_FixRelation,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
   
@@ -141,11 +109,6 @@ private:
 
 };
 
-
 #include <AIS_FixRelation.lxx>
 
-
-
-
-
 #endif // _AIS_FixRelation_HeaderFile
index 737d03b..5e65848 100644 (file)
@@ -37,7 +37,6 @@
 #include <Prs3d_PlaneAspect.hxx>
 #include <Prs3d_PointAspect.hxx>
 #include <Prs3d_ShadingAspect.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
 #include <PrsMgr_PresentableObject.hxx>
 #include <Quantity_Color.hxx>
 #include <SelectMgr_EntityOwner.hxx>
@@ -2447,6 +2446,13 @@ void AIS_InteractiveContext::Disconnect (const Handle(AIS_InteractiveObject)& th
   {
     Handle(AIS_MultipleConnectedInteractive) theObj (Handle(AIS_MultipleConnectedInteractive)::DownCast (theAssembly));
     theObj->Disconnect (theObjToDisconnect);
+    if (!myObjects.IsBound (theObjToDisconnect))
+    {
+      // connected presentation might contain displayed presentations
+      myMainPM->Erase (theObjToDisconnect, -1);
+      theObjToDisconnect->ErasePresentations (true);
+    }
+
     const Handle(SelectMgr_SelectableObject)& anObj = theObjToDisconnect; // to avoid ambiguity
     mgrSelector->Remove (anObj);
   }
index 1d2f2da..9ce6fa8 100644 (file)
@@ -419,7 +419,7 @@ Standard_Boolean AIS_InteractiveContext::ImmediateAdd (const Handle(AIS_Interact
     return Standard_False;
   }
 
-  myMainPM->AddToImmediateList (myMainPM->Presentation (theObj, theMode)->Presentation());
+  myMainPM->AddToImmediateList (myMainPM->Presentation (theObj, theMode));
   return Standard_True;
 }
 
index cb01b22..ccca749 100644 (file)
@@ -29,7 +29,6 @@
 #include <Prs3d_Presentation.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 #include <Prs3d_TextAspect.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
 #include <PrsMgr_PresentationManager.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(AIS_InteractiveObject,SelectMgr_SelectableObject)
@@ -106,9 +105,7 @@ Handle(Prs3d_Presentation) AIS_InteractiveObject::Presentation() const
   }
 
   Handle(PrsMgr_Presentation) aPrs = myCTXPtr->MainPrsMgr()->Presentation (this, myDrawer->DisplayMode(), false);
-  return !aPrs.IsNull()
-       ? aPrs->Presentation()
-       : Handle(Prs3d_Presentation)();
+  return aPrs;
 }
 
 //=======================================================================
index 5330fd6..4ca8061 100644 (file)
@@ -22,7 +22,6 @@
 
 class AIS_InteractiveContext;
 class Graphic3d_MaterialAspect;
-class Prs3d_Presentation;
 class Prs3d_BasicAspect;
 class Bnd_Box;
 
index 867fe72..90a8720 100755 (executable)
 #include <AIS_Dimension.hxx>
 #include <AIS_KindOfDimension.hxx>
 #include <Geom_Plane.hxx>
-#include <Geom_Transformation.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Dir.hxx>
 #include <Prs3d_DimensionAspect.hxx>
 #include <Prs3d_Drawer.hxx>
-#include <Prs3d_Presentation.hxx>
 #include <Prs3d_Projector.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <SelectMgr_Selection.hxx>
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Type.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Vertex.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-class TopoDS_Face;
-class TCollection_ExtendedString;
-class gp_Pnt;
-class TopoDS_Edge;
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-class SelectMgr_Selection;
-class Bnd_Box;
-class gp_Dir;
-class TopoDS_Vertex;
-class Standard_Transient;
-class AIS_LengthDimension;
 
 DEFINE_STANDARD_HANDLE (AIS_LengthDimension, AIS_Dimension)
 
index 435e58b..cdb5976 100644 (file)
 #ifndef _AIS_MaxRadiusDimension_HeaderFile
 #define _AIS_MaxRadiusDimension_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
 #include <AIS_EllipseRadiusDimension.hxx>
-#include <Standard_Real.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class Standard_ConstructionError;
-class TopoDS_Shape;
-class TCollection_ExtendedString;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
 
-class AIS_MaxRadiusDimension;
 DEFINE_STANDARD_HANDLE(AIS_MaxRadiusDimension, AIS_EllipseRadiusDimension)
 
-
 //! Ellipse  Max  radius  dimension  of  a  Shape  which  can  be  Edge
 //! or  Face  (planar  or  cylindrical(surface  of  extrusion  or
 //! surface  of  offset))
 class AIS_MaxRadiusDimension : public AIS_EllipseRadiusDimension
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_MaxRadiusDimension, AIS_EllipseRadiusDimension)
 public:
 
-  
   //! Max  Ellipse  radius dimension
   //! Shape  can  be  edge  ,  planar  face  or  cylindrical  face
   Standard_EXPORT AIS_MaxRadiusDimension(const TopoDS_Shape& aShape, const Standard_Real aVal, const TCollection_ExtendedString& aText);
@@ -66,19 +47,8 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_MaxRadiusDimension,AIS_EllipseRadiusDimension)
-
-protected:
-
-
-
-
 private:
 
-  
   Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
@@ -93,13 +63,6 @@ private:
   gp_Pnt myApexN;
   gp_Pnt myEndOfArrow;
 
-
 };
 
-
-
-
-
-
-
 #endif // _AIS_MaxRadiusDimension_HeaderFile
index e2f814f..cbe4b99 100644 (file)
 #ifndef _AIS_MidPointRelation_HeaderFile
 #define _AIS_MidPointRelation_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <gp_Pnt.hxx>
 #include <AIS_Relation.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
+
 class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
 class gp_Lin;
 class gp_Pnt;
 class gp_Circ;
 class gp_Elips;
 
-
-class AIS_MidPointRelation;
 DEFINE_STANDARD_HANDLE(AIS_MidPointRelation, AIS_Relation)
 
 //! presentation of equal distance to point myMidPoint
 class AIS_MidPointRelation : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_MidPointRelation, AIS_Relation)
 public:
 
-  
   Standard_EXPORT AIS_MidPointRelation(const TopoDS_Shape& aSymmTool, const TopoDS_Shape& FirstShape, const TopoDS_Shape& SecondShape, const Handle(Geom_Plane)& aPlane);
   
     virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
@@ -64,19 +49,8 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_MidPointRelation,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
-  
   Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
@@ -118,14 +92,8 @@ private:
   gp_Pnt mySecondPnt1;
   gp_Pnt mySecondPnt2;
 
-
 };
 
-
 #include <AIS_MidPointRelation.lxx>
 
-
-
-
-
 #endif // _AIS_MidPointRelation_HeaderFile
index dafc902..edfb4bf 100644 (file)
 #ifndef _AIS_MinRadiusDimension_HeaderFile
 #define _AIS_MinRadiusDimension_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
 #include <AIS_EllipseRadiusDimension.hxx>
-#include <Standard_Real.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class Standard_ConstructionError;
-class TopoDS_Shape;
-class TCollection_ExtendedString;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
 
-class AIS_MinRadiusDimension;
 DEFINE_STANDARD_HANDLE(AIS_MinRadiusDimension, AIS_EllipseRadiusDimension)
 
 //! --  Ellipse  Min  radius  dimension  of  a  Shape  which
@@ -44,10 +27,9 @@ DEFINE_STANDARD_HANDLE(AIS_MinRadiusDimension, AIS_EllipseRadiusDimension)
 //! extrusion  or  surface  of  offset))
 class AIS_MinRadiusDimension : public AIS_EllipseRadiusDimension
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_MinRadiusDimension, AIS_EllipseRadiusDimension)
 public:
 
-  
   //! Max  Ellipse  radius dimension
   //! Shape  can  be  edge  ,  planar  face  or  cylindrical  face
   Standard_EXPORT AIS_MinRadiusDimension(const TopoDS_Shape& aShape, const Standard_Real aVal, const TCollection_ExtendedString& aText);
@@ -65,18 +47,7 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_MinRadiusDimension,AIS_EllipseRadiusDimension)
-
-protected:
-
-
-
-
 private:
-
   
   Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
@@ -92,13 +63,6 @@ private:
   gp_Pnt myApexN;
   gp_Pnt myEndOfArrow;
 
-
 };
 
-
-
-
-
-
-
 #endif // _AIS_MinRadiusDimension_HeaderFile
index bd749ce..0776e7d 100644 (file)
@@ -20,7 +20,6 @@
 #include <AIS_InteractiveContext.hxx>
 #include <AIS_InteractiveObject.hxx>
 #include <Prs3d_Projector.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
 #include <Select3D_SensitiveEntity.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <Standard_NotImplemented.hxx>
index 5230255..5c769ec 100644 (file)
 #ifndef _AIS_OffsetDimension_HeaderFile
 #define _AIS_OffsetDimension_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Trsf.hxx>
 #include <AIS_Relation.hxx>
-#include <Standard_Real.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
 #include <AIS_KindOfDimension.hxx>
-#include <Standard_Boolean.hxx>
-class TopoDS_Shape;
-class TCollection_ExtendedString;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-class gp_Trsf;
-
 
-class AIS_OffsetDimension;
 DEFINE_STANDARD_HANDLE(AIS_OffsetDimension, AIS_Relation)
 
 //! A framework to display dimensions of offsets.
@@ -48,10 +29,9 @@ DEFINE_STANDARD_HANDLE(AIS_OffsetDimension, AIS_Relation)
 //! and the basis shape.
 class AIS_OffsetDimension : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_OffsetDimension, AIS_Relation)
 public:
 
-  
   //! Constructs the offset display object defined by the
   //! first shape aFShape, the second shape aSShape, the
   //! dimension aVal, and the text aText.
@@ -77,19 +57,8 @@ public:
   //! selection to a relative position.
     void SetRelativePos (const gp_Trsf& aTrsf);
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_OffsetDimension,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
-  
   Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
@@ -108,14 +77,8 @@ private:
   gp_Dir myDirAttach2;
   gp_Trsf myRelativePos;
 
-
 };
 
-
 #include <AIS_OffsetDimension.lxx>
 
-
-
-
-
 #endif // _AIS_OffsetDimension_HeaderFile
index 0f821bb..2dcc2d1 100644 (file)
 #ifndef _AIS_ParallelRelation_HeaderFile
 #define _AIS_ParallelRelation_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
 #include <AIS_Relation.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
 
-class AIS_ParallelRelation;
 DEFINE_STANDARD_HANDLE(AIS_ParallelRelation, AIS_Relation)
 
 //! A framework to display constraints of parallelism
@@ -45,7 +27,7 @@ DEFINE_STANDARD_HANDLE(AIS_ParallelRelation, AIS_Relation)
 //! entities can be faces or edges.
 class AIS_ParallelRelation : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_ParallelRelation, AIS_Relation)
 public:
 
   
@@ -73,19 +55,8 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_ParallelRelation,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
-  
   Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
@@ -100,14 +71,8 @@ private:
   gp_Pnt mySAttach;
   gp_Dir myDirAttach;
 
-
 };
 
-
 #include <AIS_ParallelRelation.lxx>
 
-
-
-
-
 #endif // _AIS_ParallelRelation_HeaderFile
index 83de38c..5740918 100644 (file)
 #ifndef _AIS_PerpendicularRelation_HeaderFile
 #define _AIS_PerpendicularRelation_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
 #include <AIS_Relation.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
 
-class AIS_PerpendicularRelation;
 DEFINE_STANDARD_HANDLE(AIS_PerpendicularRelation, AIS_Relation)
 
 //! A framework to display constraints of perpendicularity
@@ -40,10 +26,9 @@ DEFINE_STANDARD_HANDLE(AIS_PerpendicularRelation, AIS_Relation)
 //! datums can be edges or faces.
 class AIS_PerpendicularRelation : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_PerpendicularRelation, AIS_Relation)
 public:
 
-  
   //! Constructs an object to display constraints of
   //! perpendicularity on shapes.
   //! This object is defined by a first shape aFShape, a
@@ -68,16 +53,6 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_PerpendicularRelation,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
   
@@ -94,13 +69,6 @@ private:
   gp_Pnt myFAttach;
   gp_Pnt mySAttach;
 
-
 };
 
-
-
-
-
-
-
 #endif // _AIS_PerpendicularRelation_HeaderFile
index ffce06c..a395b0d 100644 (file)
@@ -24,7 +24,6 @@
 #include <Prs3d_Presentation.hxx>
 #include <Prs3d_Root.hxx>
 #include <Prs3d_ShadingAspect.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
 #include <PrsMgr_Presentations.hxx>
 #include <Select3D_SensitiveBox.hxx>
 #include <Select3D_SensitivePrimitiveArray.hxx>
index 2ccd6db..4246abf 100644 (file)
@@ -27,7 +27,6 @@
 #include <DsgPrs_ArrowSide.hxx>
 #include <gp_Pln.hxx>
 #include <gp_Pnt.hxx>
-#include <PrsMgr_TypeOfPresentation3d.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include <TopoDS_Shape.hxx>
 
index e6f75cb..35202da 100644 (file)
@@ -48,7 +48,6 @@
 #include <Prs3d_ShadingAspect.hxx>
 #include <StdPrs_BndBox.hxx>
 #include <StdPrs_ToolTriangulatedShape.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
 #include <Quantity_Color.hxx>
 #include <Select3D_SensitiveBox.hxx>
 #include <Select3D_SensitiveEntity.hxx>
index e0487ba..dcbc2cd 100644 (file)
 #ifndef _AIS_SymmetricRelation_HeaderFile
 #define _AIS_SymmetricRelation_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
 #include <TopoDS_Shape.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Dir.hxx>
 #include <AIS_Relation.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
 
-class AIS_SymmetricRelation;
 DEFINE_STANDARD_HANDLE(AIS_SymmetricRelation, AIS_Relation)
 
 //! A framework to display constraints of symmetricity
@@ -44,10 +30,9 @@ DEFINE_STANDARD_HANDLE(AIS_SymmetricRelation, AIS_Relation)
 //! shapes of which the datums are parts.
 class AIS_SymmetricRelation : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_SymmetricRelation, AIS_Relation)
 public:
 
-  
   //! Constructs an object to display constraints of symmetricity.
   //! This object is defined by a tool aSymmTool, a first
   //! shape FirstShape, a second shape SecondShape, and a plane aPlane.
@@ -79,19 +64,8 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_SymmetricRelation,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
-  
   Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
@@ -110,14 +84,8 @@ private:
   gp_Dir myFDirAttach;
   gp_Dir myAxisDirAttach;
 
-
 };
 
-
 #include <AIS_SymmetricRelation.lxx>
 
-
-
-
-
 #endif // _AIS_SymmetricRelation_HeaderFile
index 032d5ed..e197035 100644 (file)
 #ifndef _AIS_TangentRelation_HeaderFile
 #define _AIS_TangentRelation_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Integer.hxx>
 #include <AIS_Relation.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
 
-class AIS_TangentRelation;
 DEFINE_STANDARD_HANDLE(AIS_TangentRelation, AIS_Relation)
 
 //! A framework to display tangency constraints between
@@ -42,10 +26,9 @@ DEFINE_STANDARD_HANDLE(AIS_TangentRelation, AIS_Relation)
 //! The datums are normally faces or edges.
 class AIS_TangentRelation : public AIS_Relation
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_TangentRelation, AIS_Relation)
 public:
 
-  
   //! TwoFacesTangent or TwoEdgesTangent relation
   //! Constructs an object to display tangency constraints.
   //! This object is defined by the first shape aFShape, the
@@ -79,19 +62,8 @@ public:
   //! to the object to display before computation  !!!
   Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
 
-
-
-
-  DEFINE_STANDARD_RTTIEXT(AIS_TangentRelation,AIS_Relation)
-
-protected:
-
-
-
-
 private:
 
-  
   Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
@@ -107,13 +79,6 @@ private:
   Standard_Real myLength;
   Standard_Integer myExternRef;
 
-
 };
 
-
-
-
-
-
-
 #endif // _AIS_TangentRelation_HeaderFile
index 1baa841..00b1c22 100644 (file)
@@ -28,7 +28,6 @@
 #include <Precision.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
 #include <Prs3d_Root.hxx>
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_ShadingAspect.hxx>
@@ -199,14 +198,12 @@ void AIS_TexturedShape::SetColor (const Quantity_Color& theColor)
 {
   AIS_Shape::SetColor (theColor);
 
-  for (Standard_Integer aPrsIt = 1; aPrsIt <= Presentations().Length(); ++aPrsIt)
+  for (PrsMgr_Presentations::Iterator aPrsIter (Presentations()); aPrsIter.More(); aPrsIter.Next())
   {
-    const PrsMgr_ModedPresentation& aPrsModed = Presentations().Value (aPrsIt);
-
-    if (aPrsModed.Mode() != 3)
-      continue;
-
-    updateAttributes (aPrsModed.Presentation()->Presentation());
+    if (aPrsIter.Value()->Mode() == 3)
+    {
+      updateAttributes (aPrsIter.Value());
+    }
   }
 }
 
@@ -228,15 +225,12 @@ void AIS_TexturedShape::UnsetColor()
 void AIS_TexturedShape::SetMaterial (const Graphic3d_MaterialAspect& theMat)
 {
   AIS_Shape::SetMaterial (theMat);
-
-  for (Standard_Integer aPrsIt = 1; aPrsIt <= Presentations().Length(); ++aPrsIt)
+  for (PrsMgr_Presentations::Iterator aPrsIter (Presentations()); aPrsIter.More(); aPrsIter.Next())
   {
-    const PrsMgr_ModedPresentation& aPrsModed = Presentations().Value (aPrsIt);
-    
-    if (aPrsModed.Mode() != 3)
-      continue;
-    
-    updateAttributes (aPrsModed.Presentation()->Presentation());
+    if (aPrsIter.Value()->Mode() == 3)
+    {
+      updateAttributes (aPrsIter.Value());
+    }
   }
 }
 
@@ -247,15 +241,12 @@ void AIS_TexturedShape::SetMaterial (const Graphic3d_MaterialAspect& theMat)
 void AIS_TexturedShape::UnsetMaterial()
 {
   AIS_Shape::UnsetMaterial();
-
-  for (Standard_Integer aPrsIt = 1; aPrsIt <= Presentations().Length(); ++aPrsIt)
+  for (PrsMgr_Presentations::Iterator aPrsIter (Presentations()); aPrsIter.More(); aPrsIter.Next())
   {
-    const PrsMgr_ModedPresentation& aPrsModed = Presentations().Value (aPrsIt);
-
-    if (aPrsModed.Mode() != 3)
-      continue;
-
-    updateAttributes (aPrsModed.Presentation()->Presentation());
+    if (aPrsIter.Value()->Mode() == 3)
+    {
+      updateAttributes (aPrsIter.Value());
+    }
   }
 }
 
index 0ff986f..20e3947 100644 (file)
@@ -95,16 +95,14 @@ void AIS_Triangulation::updatePresentation()
     // modify shading presentation without re-computation
     const PrsMgr_Presentations&        aPrsList  = Presentations();
     Handle(Graphic3d_AspectFillArea3d) anAreaAsp = myDrawer->ShadingAspect()->Aspect();
-    for (Standard_Integer aPrsIt = 1; aPrsIt <= aPrsList.Length(); ++aPrsIt)
+    for (PrsMgr_Presentations::Iterator aPrsIter (aPrsList); aPrsIter.More(); aPrsIter.Next())
     {
-      const PrsMgr_ModedPresentation& aPrsModed = aPrsList.Value (aPrsIt);
-      if (aPrsModed.Mode() != AIS_WireFrame)
+      if (aPrsIter.Value()->Mode() != AIS_WireFrame)
       {
         continue;
       }
 
-      const Handle(Prs3d_Presentation)& aPrs = aPrsModed.Presentation()->Presentation();
-
+      const Handle(Prs3d_Presentation)& aPrs = aPrsIter.Value();
       for (Graphic3d_SequenceOfGroup::Iterator aGroupIt (aPrs->Groups()); aGroupIt.More(); aGroupIt.Next())
       {
         const Handle(Graphic3d_Group)& aGroup = aGroupIt.Value();
index d602e92..9961a21 100644 (file)
 #ifndef _AIS_Triangulation_HeaderFile
 #define _AIS_Triangulation_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
 #include <TColStd_HArray1OfInteger.hxx>
-#include <Standard_Integer.hxx>
 #include <AIS_InteractiveObject.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <SelectMgr_Selection.hxx>
-#include <Standard_Real.hxx>
-class Poly_Triangulation;
-class Prs3d_Presentation;
 
+class Poly_Triangulation;
 
-class AIS_Triangulation;
 DEFINE_STANDARD_HANDLE(AIS_Triangulation, AIS_InteractiveObject)
 
 //! Interactive object that draws data from  Poly_Triangulation, optionally with colors associated
@@ -38,10 +29,9 @@ DEFINE_STANDARD_HANDLE(AIS_Triangulation, AIS_InteractiveObject)
 //! Interactive selection of triangles and vertices is not yet implemented.
 class AIS_Triangulation : public AIS_InteractiveObject
 {
-
+  DEFINE_STANDARD_RTTIEXT(AIS_Triangulation, AIS_InteractiveObject)
 public:
 
-  
   //! Constructs the Triangulation display object
   Standard_EXPORT AIS_Triangulation(const Handle(Poly_Triangulation)& aTriangulation);
   
@@ -73,8 +63,6 @@ public:
   //! Removes the setting for transparency in the reconstructed compound shape.
   Standard_EXPORT virtual void UnsetTransparency() Standard_OVERRIDE;
 
-  DEFINE_STANDARD_RTTIEXT(AIS_Triangulation,AIS_InteractiveObject)
-
 protected:
 
   Standard_EXPORT void updatePresentation();
@@ -101,13 +89,6 @@ private:
   Standard_Integer myNbNodes;
   Standard_Integer myNbTriangles;
 
-
 };
 
-
-
-
-
-
-
 #endif // _AIS_Triangulation_HeaderFile
index 5fd2844..38aece8 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <DsgPrs.hxx>
+
 #include <Aspect_TypeOfLine.hxx>
 #include <Aspect_TypeOfMarker.hxx>
-#include <DsgPrs.hxx>
 #include <ElCLib.hxx>
 #include <gce_MakeLin.hxx>
 #include <Geom_Circle.hxx>
index 94cd890..06cc1f2 100644 (file)
 #ifndef _DsgPrs_HeaderFile
 #define _DsgPrs_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
 #include <DsgPrs_ArrowSide.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Real.hxx>
-class Prs3d_Presentation;
-class Prs3d_DimensionAspect;
-class gp_Pnt;
-class gp_Dir;
-class gp_Pln;
-class Geom_Surface;
-class Geom_Curve;
-class gp_Ax1;
-class gp_Circ;
-class gp_Elips;
-class DsgPrs_EllipseRadiusPresentation;
-class DsgPrs_LengthPresentation;
-class DsgPrs_RadiusPresentation;
-class DsgPrs_DiameterPresentation;
-class DsgPrs_FilletRadiusPresentation;
-class DsgPrs_AnglePresentation;
-class DsgPrs_Chamf2dPresentation;
-class DsgPrs_ParalPresentation;
-class DsgPrs_PerpenPresentation;
-class DsgPrs_SymmetricPresentation;
-class DsgPrs_MidPointPresentation;
-class DsgPrs_TangentPresentation;
-class DsgPrs_ConcentricPresentation;
-class DsgPrs_FixPresentation;
-class DsgPrs_IdenticPresentation;
-class DsgPrs_EqualRadiusPresentation;
-class DsgPrs_EqualDistancePresentation;
-class DsgPrs_SymbPresentation;
-class DsgPrs_ShapeDirPresentation;
-class DsgPrs_OffsetPresentation;
-class DsgPrs_XYZAxisPresentation;
-class DsgPrs_XYZPlanePresentation;
-class DsgPrs_ShadedPlanePresentation;
+#include <gp_Dir.hxx>
+#include <gp_Pnt.hxx>
+#include <Prs3d_Presentation.hxx>
 
+class Geom_Curve;
+class Geom_Surface;
+class Prs3d_DimensionAspect;
 
 //! Describes Standard Presentations for DsgIHM objects
 class DsgPrs 
@@ -66,7 +33,6 @@ public:
 
   DEFINE_STANDARD_ALLOC
 
-  
   //! draws symbols ((one or two) arrows,(one or two)points
   //! at thebeginning and at the end of the dimension
   Standard_EXPORT static void ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_DimensionAspect)& anAspect, const gp_Pnt& pt1, const gp_Pnt& pt2, const gp_Dir& dir1, const gp_Dir& dir2, const DsgPrs_ArrowSide ArrowSide, const Standard_Boolean drawFromCenter = Standard_True);
@@ -88,50 +54,6 @@ public:
   //! computes  length  of  ellipse  arc  in  parametric  units
   Standard_EXPORT static Standard_Real DistanceFromApex (const gp_Elips& elips, const gp_Pnt& Apex, const Standard_Real par);
 
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
-friend class DsgPrs_EllipseRadiusPresentation;
-friend class DsgPrs_LengthPresentation;
-friend class DsgPrs_RadiusPresentation;
-friend class DsgPrs_DiameterPresentation;
-friend class DsgPrs_FilletRadiusPresentation;
-friend class DsgPrs_AnglePresentation;
-friend class DsgPrs_Chamf2dPresentation;
-friend class DsgPrs_ParalPresentation;
-friend class DsgPrs_PerpenPresentation;
-friend class DsgPrs_SymmetricPresentation;
-friend class DsgPrs_MidPointPresentation;
-friend class DsgPrs_TangentPresentation;
-friend class DsgPrs_ConcentricPresentation;
-friend class DsgPrs_FixPresentation;
-friend class DsgPrs_IdenticPresentation;
-friend class DsgPrs_EqualRadiusPresentation;
-friend class DsgPrs_EqualDistancePresentation;
-friend class DsgPrs_SymbPresentation;
-friend class DsgPrs_ShapeDirPresentation;
-friend class DsgPrs_OffsetPresentation;
-friend class DsgPrs_XYZAxisPresentation;
-friend class DsgPrs_XYZPlanePresentation;
-friend class DsgPrs_ShadedPlanePresentation;
-
 };
 
-
-
-
-
-
-
 #endif // _DsgPrs_HeaderFile
index 4f4f6b7..aeb4d2c 100644 (file)
@@ -25,7 +25,8 @@
 #include <Standard_Real.hxx>
 #include <DsgPrs_ArrowSide.hxx>
 #include <Standard_Boolean.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class TCollection_ExtendedString;
 class gp_Circ;
 class gp_Pnt;
index 0b8e3ef..2f43829 100644 (file)
 
 #include <Prs3d_Drawer.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class gp_Pnt;
 class TCollection_ExtendedString;
 
-
 //! Framework for display of 2D chamfers.
 class DsgPrs_Chamf2dPresentation 
 {
index 99b411a..893a568 100644 (file)
 #include <Standard_Handle.hxx>
 
 #include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class gp_Pnt;
 class gp_Dir;
 
-
 //! A framework to define display of relations of concentricity.
 class DsgPrs_ConcentricPresentation 
 {
index f957b6b..5cd24f3 100644 (file)
@@ -23,9 +23,8 @@
 
 #include <Prs3d_Drawer.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Real.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class TCollection_ExtendedString;
 class gp_Pnt;
 class gp_Circ;
index 29682dc..bcd3cb1 100644 (file)
 #include <Standard_Handle.hxx>
 
 #include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class TCollection_ExtendedString;
 class gp_Pnt;
 class gp_Elips;
 class Geom_OffsetCurve;
 
-
-
 class DsgPrs_EllipseRadiusPresentation 
 {
 public:
index 0195630..42108c8 100644 (file)
 
 #include <Prs3d_Drawer.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class gp_Pnt;
 class Geom_Plane;
 class gp_Dir;
 class gp_Circ;
 
-
 //! A framework to display equal distances between shapes and a given plane.
 //! The distance is the length of a projection from the shape to the plane.
 //! These distances are used to compare two shapes by this vector alone.
index dfcc646..802409b 100644 (file)
 #include <Standard_Handle.hxx>
 
 #include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class gp_Pnt;
 class Geom_Plane;
 
-
 //! A framework to define display of equality in radii.
 class DsgPrs_EqualRadiusPresentation 
 {
index 674e6ad..e7ed0b6 100644 (file)
 #include <Standard_Handle.hxx>
 
 #include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-#include <Standard_Boolean.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class TCollection_ExtendedString;
 class gp_Pnt;
 class gp_Dir;
 class Geom_TrimmedCurve;
 
-
 //! A framework for displaying radii of fillets.
 class DsgPrs_FilletRadiusPresentation 
 {
index e9feff8..840a966 100644 (file)
 #include <Standard_Handle.hxx>
 
 #include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class gp_Pnt;
 class gp_Dir;
 
-
 //! class which draws the presentation of Fixed objects
 class DsgPrs_FixPresentation 
 {
index 436353b..b407744 100644 (file)
 #include <Standard_Handle.hxx>
 
 #include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class TCollection_ExtendedString;
 class gp_Pnt;
 class gp_Ax2;
 class gp_Elips;
 
-
-
 class DsgPrs_IdenticPresentation 
 {
 public:
index e7f797d..0af13a3 100644 (file)
 
 #include <Prs3d_Drawer.hxx>
 #include <DsgPrs_ArrowSide.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
 class TCollection_ExtendedString;
 class gp_Pnt;
 class gp_Dir;
 class gp_Pln;
 class Geom_Surface;
 
-
 //! Framework for displaying lengths.
 //! The length displayed is indicated by line segments
 //! and text alone or by a combination of line segment,