42cf5bc1 |
1 | // Created on: 1994-10-03 |
2 | // Created by: Arnaud BOUZY |
3 | // Copyright (c) 1994-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _DsgPrs_HeaderFile |
18 | #define _DsgPrs_HeaderFile |
19 | |
42cf5bc1 |
20 | #include <DsgPrs_ArrowSide.hxx> |
7dd7c146 |
21 | #include <gp_Dir.hxx> |
22 | #include <gp_Pnt.hxx> |
23 | #include <Prs3d_Presentation.hxx> |
42cf5bc1 |
24 | |
7dd7c146 |
25 | class Geom_Curve; |
26 | class Geom_Surface; |
27 | class Prs3d_DimensionAspect; |
42cf5bc1 |
28 | |
29 | //! Describes Standard Presentations for DsgIHM objects |
30 | class DsgPrs |
31 | { |
32 | public: |
33 | |
34 | DEFINE_STANDARD_ALLOC |
35 | |
42cf5bc1 |
36 | //! draws symbols ((one or two) arrows,(one or two)points |
37 | //! at thebeginning and at the end of the dimension |
38 | 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); |
39 | |
40 | Standard_EXPORT static void ComputePlanarFacesLengthPresentation (const Standard_Real FirstArrowLength, const Standard_Real SecondArrowLength, const gp_Pnt& AttachmentPoint1, const gp_Pnt& AttachmentPoint2, const gp_Dir& DirAttach, const gp_Pnt& OffsetPoint, const gp_Pln& PlaneOfFaces, gp_Pnt& EndOfArrow1, gp_Pnt& EndOfArrow2, gp_Dir& DirOfArrow1); |
41 | |
42 | Standard_EXPORT static void ComputeCurvilinearFacesLengthPresentation (const Standard_Real FirstArrowLength, const Standard_Real SecondArrowLength, const Handle(Geom_Surface)& SecondSurf, const gp_Pnt& AttachmentPoint1, const gp_Pnt& AttachmentPoint2, const gp_Dir& DirAttach, gp_Pnt& EndOfArrow2, gp_Dir& DirOfArrow1, Handle(Geom_Curve)& VCurve, Handle(Geom_Curve)& UCurve, Standard_Real& FirstU, Standard_Real& deltaU, Standard_Real& FirstV, Standard_Real& deltaV); |
43 | |
44 | Standard_EXPORT static void ComputeFacesAnglePresentation (const Standard_Real ArrowLength, const Standard_Real Value, const gp_Pnt& CenterPoint, const gp_Pnt& AttachmentPoint1, const gp_Pnt& AttachmentPoint2, const gp_Dir& dir1, const gp_Dir& dir2, const gp_Dir& axisdir, const Standard_Boolean isPlane, const gp_Ax1& AxisOfSurf, const gp_Pnt& OffsetPoint, gp_Circ& AngleCirc, Standard_Real& FirstParAngleCirc, Standard_Real& LastParAngleCirc, gp_Pnt& EndOfArrow1, gp_Pnt& EndOfArrow2, gp_Dir& DirOfArrow1, gp_Dir& DirOfArrow2, gp_Pnt& ProjAttachPoint2, gp_Circ& AttachCirc, Standard_Real& FirstParAttachCirc, Standard_Real& LastParAttachCirc); |
45 | |
46 | Standard_EXPORT static void ComputeRadiusLine (const gp_Pnt& aCenter, const gp_Pnt& anEndOfArrow, const gp_Pnt& aPosition, const Standard_Boolean drawFromCenter, gp_Pnt& aRadLineOrign, gp_Pnt& aRadLineEnd); |
47 | |
48 | //! computes Geometry for fillet radius presentation; |
49 | //! special case flag SpecCase equal Standard_True if |
50 | //! radius of fillet circle = 0 or if anngle between |
51 | //! Vec1(Center, FirstPoint) and Vec2(Center,SecondPoint) equal 0 or PI |
52 | Standard_EXPORT static void ComputeFilletRadiusPresentation (const Standard_Real ArrowLength, const Standard_Real Value, const gp_Pnt& Position, const gp_Dir& NormalDir, const gp_Pnt& FirstPoint, const gp_Pnt& SecondPoint, const gp_Pnt& Center, const gp_Pnt& BasePnt, const Standard_Boolean drawRevers, Standard_Boolean& SpecCase, gp_Circ& FilletCirc, Standard_Real& FirstParCirc, Standard_Real& LastParCirc, gp_Pnt& EndOfArrow, gp_Dir& DirOfArrow, gp_Pnt& DrawPosition); |
53 | |
54 | //! computes length of ellipse arc in parametric units |
55 | Standard_EXPORT static Standard_Real DistanceFromApex (const gp_Elips& elips, const gp_Pnt& Apex, const Standard_Real par); |
56 | |
42cf5bc1 |
57 | }; |
58 | |
42cf5bc1 |
59 | #endif // _DsgPrs_HeaderFile |