1 // Created on: 1993-11-29
2 // Created by: Isabelle GRIGNON
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _ChFiDS_CommonPoint_HeaderFile
18 #define _ChFiDS_CommonPoint_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopoDS_Edge.hxx>
25 #include <TopoDS_Vertex.hxx>
28 #include <Standard_Real.hxx>
29 #include <Standard_Boolean.hxx>
30 #include <TopAbs_Orientation.hxx>
31 class Standard_DomainError;
32 class Standard_TypeMismatch;
39 //! point start/end of fillet common to 2 adjacent filets
40 //! and to an edge on one of 2 faces participating
41 //! in the construction of the fillet
42 class ChFiDS_CommonPoint
49 //! Empty constructor.
50 Standard_EXPORT ChFiDS_CommonPoint();
52 //! default value for all fields
53 Standard_EXPORT void Reset();
55 //! Sets the values of a point which is a vertex on
56 //! the initial facet of restriction of one
58 void SetVertex (const TopoDS_Vertex& V);
60 //! Sets the values of a point which is on the arc
61 //! A, at parameter Param.
62 Standard_EXPORT void SetArc (const Standard_Real Tol, const TopoDS_Edge& A, const Standard_Real Param, const TopAbs_Orientation TArc);
64 //! Sets the value of the parameter on the spine
65 Standard_EXPORT void SetParameter (const Standard_Real Param);
67 //! Set the 3d point for a commonpoint that is not
68 //! a vertex or on an arc.
69 void SetPoint (const gp_Pnt& Point);
71 //! Set the output 3d vector
72 void SetVector (const gp_Vec& Vector);
74 //! This method set the fuzziness on the point.
75 void SetTolerance (const Standard_Real Tol);
77 //! This method returns the fuzziness on the point.
78 Standard_Real Tolerance() const;
80 //! Returns TRUE if the point is a vertex on the initial
81 //! restriction facet of the surface.
82 Standard_Boolean IsVertex() const;
84 //! Returns the information about the point when it is
85 //! on the domain of the first patch, i-e when the function
86 //! IsVertex returns True.
87 //! Otherwise, an exception is raised.
88 const TopoDS_Vertex& Vertex() const;
90 //! Returns TRUE if the point is a on an edge of the initial
91 //! restriction facet of the surface.
92 Standard_Boolean IsOnArc() const;
94 //! Returns the arc of restriction containing the
96 Standard_EXPORT const TopoDS_Edge& Arc() const;
98 //! Returns the transition of the point on the arc
99 //! returned by Arc().
100 Standard_EXPORT TopAbs_Orientation TransitionOnArc() const;
102 //! Returns the parameter of the point on the
103 //! arc returned by the method Arc().
104 Standard_EXPORT Standard_Real ParameterOnArc() const;
106 //! Returns the parameter the paramter on the spine
107 Standard_EXPORT Standard_Real Parameter() const;
109 //! Returns the 3d point
110 const gp_Pnt& Point() const;
112 //! Returns TRUE if the output vector is stored.
113 Standard_Boolean HasVector() const;
115 //! Returns the output 3d vector
116 const gp_Vec& Vector() const;
136 Standard_Real prmarc;
138 Standard_Boolean isonarc;
139 TopAbs_Orientation traarc;
140 Standard_Boolean isvtx;
141 Standard_Boolean hasvector;
147 #include <ChFiDS_CommonPoint.lxx>
153 #endif // _ChFiDS_CommonPoint_HeaderFile