mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presentation
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
This commit is contained in:
@@ -12,9 +12,10 @@
|
||||
// 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>
|
||||
|
@@ -17,47 +17,14 @@
|
||||
#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
|
||||
|
@@ -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;
|
||||
|
@@ -23,11 +23,11 @@
|
||||
|
||||
#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
|
||||
{
|
||||
|
@@ -22,12 +22,11 @@
|
||||
#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
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -22,17 +22,14 @@
|
||||
#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:
|
||||
|
@@ -23,13 +23,13 @@
|
||||
|
||||
#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.
|
||||
|
@@ -22,11 +22,11 @@
|
||||
#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
|
||||
{
|
||||
|
@@ -22,16 +22,14 @@
|
||||
#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
|
||||
{
|
||||
|
@@ -22,12 +22,11 @@
|
||||
#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
|
||||
{
|
||||
|
@@ -22,14 +22,13 @@
|
||||
#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:
|
||||
|
@@ -23,14 +23,14 @@
|
||||
|
||||
#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,
|
||||
|
@@ -21,15 +21,13 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Prs3d_Presentation;
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class gp_Ax2;
|
||||
class gp_Pnt;
|
||||
class gp_Circ;
|
||||
class gp_Elips;
|
||||
|
||||
|
||||
|
||||
class DsgPrs_MidPointPresentation
|
||||
{
|
||||
public:
|
||||
|
@@ -22,12 +22,12 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
class Prs3d_Presentation;
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class TCollection_ExtendedString;
|
||||
class gp_Pnt;
|
||||
class gp_Dir;
|
||||
|
||||
|
||||
//! A framework to define display of offsets.
|
||||
class DsgPrs_OffsetPresentation
|
||||
{
|
||||
|
@@ -17,18 +17,14 @@
|
||||
#ifndef _DsgPrs_ParalPresentation_HeaderFile
|
||||
#define _DsgPrs_ParalPresentation_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <DsgPrs_ArrowSide.hxx>
|
||||
class Prs3d_Presentation;
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class TCollection_ExtendedString;
|
||||
class gp_Pnt;
|
||||
class gp_Dir;
|
||||
|
||||
|
||||
//! A framework to define display of relations of parallelism between shapes.
|
||||
class DsgPrs_ParalPresentation
|
||||
{
|
||||
|
@@ -22,10 +22,9 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Prs3d_Presentation;
|
||||
class gp_Pnt;
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class gp_Pnt;
|
||||
|
||||
//! A framework to define display of perpendicular
|
||||
//! constraints between shapes.
|
||||
|
@@ -22,10 +22,9 @@
|
||||
#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_Circ;
|
||||
|
@@ -22,9 +22,9 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
class Prs3d_Presentation;
|
||||
class gp_Pnt;
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class gp_Pnt;
|
||||
|
||||
//! A framework to define display of shaded planes.
|
||||
class DsgPrs_ShadedPlanePresentation
|
||||
|
@@ -22,10 +22,9 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Prs3d_Presentation;
|
||||
class TopoDS_Shape;
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class TopoDS_Shape;
|
||||
|
||||
//! A framework to define display of the normal to the
|
||||
//! surface of a shape.
|
||||
|
@@ -22,11 +22,11 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
class Prs3d_Presentation;
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class TCollection_ExtendedString;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
//! A framework to define display of symbols.
|
||||
class DsgPrs_SymbPresentation
|
||||
{
|
||||
|
@@ -22,13 +22,13 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
class Prs3d_Presentation;
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class gp_Pnt;
|
||||
class gp_Dir;
|
||||
class gp_Lin;
|
||||
class gp_Circ;
|
||||
|
||||
|
||||
//! A framework to define display of symmetry between shapes.
|
||||
class DsgPrs_SymmetricPresentation
|
||||
{
|
||||
|
@@ -22,12 +22,11 @@
|
||||
#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 tangents.
|
||||
class DsgPrs_TangentPresentation
|
||||
{
|
||||
|
@@ -21,16 +21,15 @@
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class Prs3d_Presentation;
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class Prs3d_LineAspect;
|
||||
class gp_Dir;
|
||||
class gp_Pnt;
|
||||
class Prs3d_ArrowAspect;
|
||||
class Prs3d_TextAspect;
|
||||
|
||||
|
||||
//! A framework for displaying the axes of an XYZ trihedron.
|
||||
class DsgPrs_XYZAxisPresentation
|
||||
{
|
||||
|
@@ -22,9 +22,9 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
class Prs3d_Presentation;
|
||||
class gp_Pnt;
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
|
||||
class gp_Pnt;
|
||||
|
||||
//! A framework for displaying the planes of an XYZ trihedron.
|
||||
class DsgPrs_XYZPlanePresentation
|
||||
|
Reference in New Issue
Block a user