File indexing completed on 2025-01-18 10:04:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _PrsDim_FixRelation_HeaderFile
0018 #define _PrsDim_FixRelation_HeaderFile
0019
0020 #include <gp_Circ.hxx>
0021 #include <TopoDS_Wire.hxx>
0022 #include <PrsDim_Relation.hxx>
0023
0024 class Geom_Plane;
0025
0026 DEFINE_STANDARD_HANDLE(PrsDim_FixRelation, PrsDim_Relation)
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 class PrsDim_FixRelation : public PrsDim_Relation
0037 {
0038 DEFINE_STANDARD_RTTIEXT(PrsDim_FixRelation, PrsDim_Relation)
0039 public:
0040
0041
0042
0043
0044 Standard_EXPORT PrsDim_FixRelation(const TopoDS_Shape& aShape, const Handle(Geom_Plane)& aPlane, const TopoDS_Wire& aWire);
0045
0046
0047
0048
0049
0050 Standard_EXPORT PrsDim_FixRelation(const TopoDS_Shape& aShape, const Handle(Geom_Plane)& aPlane, const TopoDS_Wire& aWire, const gp_Pnt& aPosition, const Standard_Real anArrowSize = 0.01);
0051
0052
0053 Standard_EXPORT PrsDim_FixRelation(const TopoDS_Shape& aShape, const Handle(Geom_Plane)& aPlane);
0054
0055
0056
0057
0058 Standard_EXPORT PrsDim_FixRelation(const TopoDS_Shape& aShape, const Handle(Geom_Plane)& aPlane, const gp_Pnt& aPosition, const Standard_Real anArrowSize = 0.01);
0059
0060
0061 const TopoDS_Wire& Wire() { return myWire; }
0062
0063
0064
0065 void SetWire (const TopoDS_Wire& aWire) { myWire = aWire; }
0066
0067
0068
0069 virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; }
0070
0071 private:
0072
0073 Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0074 const Handle(Prs3d_Presentation)& thePrs,
0075 const Standard_Integer theMode) Standard_OVERRIDE;
0076
0077 Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
0078 const Standard_Integer theMode) Standard_OVERRIDE;
0079
0080
0081 Standard_EXPORT void ComputeVertex (const TopoDS_Vertex& FixVertex, gp_Pnt& curpos);
0082
0083 Standard_EXPORT gp_Pnt ComputePosition (const Handle(Geom_Curve)& curv1, const Handle(Geom_Curve)& curv2, const gp_Pnt& firstp1, const gp_Pnt& lastp1, const gp_Pnt& firstp2, const gp_Pnt& lastp2) const;
0084
0085 Standard_EXPORT gp_Pnt ComputePosition (const Handle(Geom_Curve)& curv, const gp_Pnt& firstp, const gp_Pnt& lastp) const;
0086
0087
0088
0089 Standard_EXPORT void ComputeEdge (const TopoDS_Edge& FixEdge, gp_Pnt& curpos);
0090
0091 Standard_EXPORT void ComputeLinePosition (const gp_Lin& glin, gp_Pnt& pos, Standard_Real& pfirst, Standard_Real& plast);
0092
0093 Standard_EXPORT void ComputeCirclePosition (const gp_Circ& gcirc, gp_Pnt& pos, Standard_Real& pfirst, Standard_Real& plast);
0094
0095 Standard_EXPORT static Standard_Boolean ConnectedEdges (const TopoDS_Wire& aWire, const TopoDS_Vertex& aVertex, TopoDS_Edge& Edge1, TopoDS_Edge& Edge2);
0096
0097 private:
0098
0099 TopoDS_Wire myWire;
0100 gp_Pnt myPntAttach;
0101
0102 };
0103
0104 #endif