Warning, file /include/opencascade/PrsDim_Relation.hxx was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 
0016 
0017 #ifndef _PrsDim_Relation_HeaderFile
0018 #define _PrsDim_Relation_HeaderFile
0019 
0020 #include <AIS_InteractiveObject.hxx>
0021 #include <Aspect_TypeOfLine.hxx>
0022 #include <Aspect_TypeOfMarker.hxx>
0023 #include <Bnd_Box.hxx>
0024 #include <DsgPrs_ArrowSide.hxx>
0025 #include <gp_Pln.hxx>
0026 #include <gp_Pnt.hxx>
0027 #include <PrsDim_KindOfDimension.hxx>
0028 #include <PrsDim_KindOfSurface.hxx>
0029 #include <TCollection_ExtendedString.hxx>
0030 #include <TopoDS_Shape.hxx>
0031 
0032 class Geom_Curve;
0033 class Geom_Plane;
0034 class Geom_Surface;
0035 class TopoDS_Edge;
0036 class TopoDS_Vertex;
0037 
0038 
0039 
0040 
0041 
0042 
0043 
0044 
0045 
0046 
0047 class PrsDim_Relation : public AIS_InteractiveObject
0048 {
0049   DEFINE_STANDARD_RTTIEXT(PrsDim_Relation, AIS_InteractiveObject)
0050 public:
0051 
0052   
0053   
0054   Standard_EXPORT void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE;
0055 
0056   
0057   
0058   Standard_EXPORT void UnsetColor() Standard_OVERRIDE;
0059 
0060   virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Relation; }
0061 
0062   
0063   virtual PrsDim_KindOfDimension KindOfDimension() const { return PrsDim_KOD_NONE; }
0064 
0065   
0066   virtual Standard_Boolean IsMovable() const { return Standard_False; }
0067 
0068   const TopoDS_Shape& FirstShape() const { return myFShape; }
0069 
0070   virtual void SetFirstShape (const TopoDS_Shape& aFShape) { myFShape = aFShape; }
0071 
0072   
0073   const TopoDS_Shape& SecondShape() const { return mySShape; }
0074 
0075   
0076   
0077   virtual void SetSecondShape (const TopoDS_Shape& aSShape) { mySShape = aSShape; }
0078 
0079   void SetBndBox (const Standard_Real theXmin, const Standard_Real theYmin, const Standard_Real theZmin,
0080                   const Standard_Real theXmax, const Standard_Real theYmax, const Standard_Real theZmax)
0081   {
0082     myBndBox.Update (theXmin, theYmin, theZmin, theXmax, theYmax, theZmax);
0083     myIsSetBndBox = Standard_True;
0084   }
0085 
0086   void UnsetBndBox() { myIsSetBndBox = Standard_False; }
0087 
0088   
0089   const Handle(Geom_Plane)& Plane() const { return myPlane; }
0090 
0091   
0092   
0093   void SetPlane (const Handle(Geom_Plane)& thePlane) { myPlane = thePlane; }
0094 
0095   
0096   Standard_Real Value() const { return myVal; }
0097 
0098   
0099   void SetValue (const Standard_Real theVal) { myVal = theVal; }
0100 
0101   
0102   const gp_Pnt& Position() const { return myPosition; }
0103 
0104   
0105   
0106   void SetPosition (const gp_Pnt& thePosition)
0107   {
0108     myPosition = thePosition;
0109     myAutomaticPosition = Standard_False;
0110   }
0111 
0112   
0113   const TCollection_ExtendedString& Text() const { return myText; }
0114 
0115   
0116   void SetText (const TCollection_ExtendedString& theText) { myText = theText; }
0117 
0118   
0119   
0120   Standard_Real ArrowSize() const { return myArrowSize; }
0121 
0122   
0123   
0124   void SetArrowSize (const Standard_Real theArrowSize)
0125   {
0126     myArrowSize = theArrowSize;
0127     myArrowSizeIsDefined = Standard_True;
0128   }
0129 
0130   
0131   
0132   
0133   
0134   
0135   
0136   
0137   
0138   
0139   
0140   DsgPrs_ArrowSide SymbolPrs() const { return mySymbolPrs; }
0141 
0142   
0143   void SetSymbolPrs (const DsgPrs_ArrowSide theSymbolPrs) { mySymbolPrs = theSymbolPrs; }
0144 
0145   
0146   
0147   
0148   
0149   
0150   
0151   void SetExtShape (const Standard_Integer theIndex) { myExtShape = theIndex; }
0152 
0153   
0154   Standard_Integer ExtShape() const { return myExtShape; }
0155 
0156   
0157   
0158   
0159   
0160   
0161   
0162   
0163   
0164   
0165   
0166   
0167   
0168   
0169   
0170   virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE { return theMode == 0; }
0171 
0172   void SetAutomaticPosition (const Standard_Boolean theStatus) { myAutomaticPosition = theStatus; }
0173 
0174   Standard_Boolean AutomaticPosition() const { return myAutomaticPosition; }
0175 
0176 protected:
0177 
0178   Standard_EXPORT PrsDim_Relation (const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView);
0179 
0180   
0181   
0182   
0183   
0184   
0185   Standard_EXPORT void ComputeProjEdgePresentation (const Handle(Prs3d_Presentation)& aPres, const TopoDS_Edge& anEdge, const Handle(Geom_Curve)& ProjCurve, const gp_Pnt& FirstP, const gp_Pnt& LastP, const Quantity_NameOfColor aColor = Quantity_NOC_PURPLE, const Standard_Real aWidth = 2, const Aspect_TypeOfLine aProjTOL = Aspect_TOL_DASH, const Aspect_TypeOfLine aCallTOL = Aspect_TOL_DOT) const;
0186 
0187   
0188   
0189   
0190   
0191   Standard_EXPORT void ComputeProjVertexPresentation (const Handle(Prs3d_Presentation)& aPres, const TopoDS_Vertex& aVertex, const gp_Pnt& ProjPoint, const Quantity_NameOfColor aColor = Quantity_NOC_PURPLE, const Standard_Real aWidth = 2, const Aspect_TypeOfMarker aProjTOM = Aspect_TOM_PLUS, const Aspect_TypeOfLine aCallTOL = Aspect_TOL_DOT) const;
0192 
0193 protected:
0194 
0195   TopoDS_Shape myFShape;
0196   TopoDS_Shape mySShape;
0197   Handle(Geom_Plane) myPlane;
0198   Standard_Real myVal;
0199   gp_Pnt myPosition;
0200   TCollection_ExtendedString myText;
0201   Standard_Real myArrowSize;
0202   Standard_Boolean myAutomaticPosition;
0203   DsgPrs_ArrowSide mySymbolPrs;
0204   Standard_Integer myExtShape;
0205   gp_Pln myFirstPlane;
0206   gp_Pln mySecondPlane;
0207   Handle(Geom_Surface) myFirstBasisSurf;
0208   Handle(Geom_Surface) mySecondBasisSurf;
0209   PrsDim_KindOfSurface myFirstSurfType;
0210   PrsDim_KindOfSurface mySecondSurfType;
0211   Standard_Real myFirstOffset;
0212   Standard_Real mySecondOffset;
0213   Bnd_Box myBndBox;
0214   Standard_Boolean myIsSetBndBox;
0215   Standard_Boolean myArrowSizeIsDefined;
0216 
0217 };
0218 
0219 DEFINE_STANDARD_HANDLE(PrsDim_Relation, AIS_InteractiveObject)
0220 
0221 #endif