File indexing completed on 2026-09-22 08:59:09
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
0027
0028
0029
0030
0031
0032
0033
0034 class PrsDim_FixRelation : public PrsDim_Relation
0035 {
0036 DEFINE_STANDARD_RTTIEXT(PrsDim_FixRelation, PrsDim_Relation)
0037 public:
0038
0039
0040
0041 Standard_EXPORT PrsDim_FixRelation(const TopoDS_Shape& aShape,
0042 const occ::handle<Geom_Plane>& aPlane,
0043 const TopoDS_Wire& aWire);
0044
0045
0046
0047
0048
0049 Standard_EXPORT PrsDim_FixRelation(const TopoDS_Shape& aShape,
0050 const occ::handle<Geom_Plane>& aPlane,
0051 const TopoDS_Wire& aWire,
0052 const gp_Pnt& aPosition,
0053 const double anArrowSize = 0.01);
0054
0055
0056 Standard_EXPORT PrsDim_FixRelation(const TopoDS_Shape& aShape,
0057 const occ::handle<Geom_Plane>& aPlane);
0058
0059
0060
0061
0062 Standard_EXPORT PrsDim_FixRelation(const TopoDS_Shape& aShape,
0063 const occ::handle<Geom_Plane>& aPlane,
0064 const gp_Pnt& aPosition,
0065 const double anArrowSize = 0.01);
0066
0067
0068 const TopoDS_Wire& Wire() { return myWire; }
0069
0070
0071
0072 void SetWire(const TopoDS_Wire& aWire) { myWire = aWire; }
0073
0074
0075
0076 bool IsMovable() const override { return true; }
0077
0078 private:
0079 Standard_EXPORT void Compute(const occ::handle<PrsMgr_PresentationManager>& thePrsMgr,
0080 const occ::handle<Prs3d_Presentation>& thePrs,
0081 const int theMode) override;
0082
0083 Standard_EXPORT void ComputeSelection(const occ::handle<SelectMgr_Selection>& theSel,
0084 const int theMode) override;
0085
0086
0087 Standard_EXPORT void ComputeVertex(const TopoDS_Vertex& FixVertex, gp_Pnt& curpos);
0088
0089 Standard_EXPORT gp_Pnt ComputePosition(const occ::handle<Geom_Curve>& curv1,
0090 const occ::handle<Geom_Curve>& curv2,
0091 const gp_Pnt& firstp1,
0092 const gp_Pnt& lastp1,
0093 const gp_Pnt& firstp2,
0094 const gp_Pnt& lastp2) const;
0095
0096 Standard_EXPORT gp_Pnt ComputePosition(const occ::handle<Geom_Curve>& curv,
0097 const gp_Pnt& firstp,
0098 const gp_Pnt& lastp) const;
0099
0100
0101
0102 Standard_EXPORT void ComputeEdge(const TopoDS_Edge& FixEdge, gp_Pnt& curpos);
0103
0104 Standard_EXPORT void ComputeLinePosition(const gp_Lin& glin,
0105 gp_Pnt& pos,
0106 double& pfirst,
0107 double& plast);
0108
0109 Standard_EXPORT void ComputeCirclePosition(const gp_Circ& gcirc,
0110 gp_Pnt& pos,
0111 double& pfirst,
0112 double& plast);
0113
0114 Standard_EXPORT static bool ConnectedEdges(const TopoDS_Wire& aWire,
0115 const TopoDS_Vertex& aVertex,
0116 TopoDS_Edge& Edge1,
0117 TopoDS_Edge& Edge2);
0118
0119 private:
0120 TopoDS_Wire myWire;
0121 gp_Pnt myPntAttach;
0122 };
0123
0124 #endif