Version: 9.16.0
GEOMImpl_Fillet1d.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20// File : GEOMImpl_Fillet1d.hxx
21// Module : GEOMImpl
22
23#ifndef _GEOMImpl_Fillet1d_HeaderFile
24#define _GEOMImpl_Fillet1d_HeaderFile
25
26#include <TopoDS_Edge.hxx>
27
28#include <Geom_Plane.hxx>
29#include <Geom2d_Curve.hxx>
30
31#include <gp_Pnt.hxx>
32
33#include <TColStd_ListOfReal.hxx>
34#include <TColStd_SequenceOfReal.hxx>
35#include <TColStd_SequenceOfInteger.hxx>
36
38
44{
45public:
48 Standard_EXPORT GEOMImpl_Fillet1d(const TopoDS_Edge& theEdge1,
49 const TopoDS_Edge& theEdge2,
50 const gp_Pln& thePlane);
53 Standard_EXPORT Standard_Boolean Perform(const Standard_Real theRadius);
54
56 Standard_EXPORT TopoDS_Edge Result(const gp_Pnt& thePoint, TopoDS_Edge& theEdge1, TopoDS_Edge& theEdge2);
57
58private:
60 void performInterval(const Standard_Real theStart,
61 const Standard_Real theEnd,
62 const Standard_Integer theNBSteps);
64 void fillDiff(GEOMImpl_Fillet1dPoint*, Standard_Real, Standard_Boolean);
66 Standard_Boolean processPoint(GEOMImpl_Fillet1dPoint*, GEOMImpl_Fillet1dPoint*, Standard_Real);
67
68private:
70 TopoDS_Edge myEdge1, myEdge2;
71 Handle(Geom_Plane) myPlane;
72 Handle(Geom2d_Curve) myCurve1, myCurve2;
74 TColStd_ListOfReal myResultParams;
75 TColStd_SequenceOfInteger myResultOrientation;
76 Standard_Boolean myStartSide, myEdgesExchnged;
77 Standard_Integer myDegreeOfRecursion;
78};
79
80
87{
88public:
90
92 Standard_EXPORT GEOMImpl_Fillet1dPoint(Standard_Real theParam)
93 {myParam = theParam;}
94
97 Standard_EXPORT GEOMImpl_Fillet1dPoint* Copy(); // warning: this is not the full copy!
98
100 Standard_EXPORT inline void SetParam(Standard_Real theParam)
101 {myParam = theParam;}
102 Standard_EXPORT inline Standard_Real GetParam() const
103 {return myParam;}
104 Standard_EXPORT inline void SetParam2(const Standard_Real theParam2)
105 {myParam2 = theParam2;}
106 Standard_EXPORT inline Standard_Real GetParam2()
107 { return myParam2 ; }
108
110 Standard_EXPORT inline Standard_Boolean IsValid(int theIndex)
111 {return (Standard_Boolean)myValid.Value(theIndex);}
112
114 Standard_EXPORT inline Standard_Integer GetNBValues() {return myV.Length();}
115 Standard_EXPORT inline Standard_Real GetValue(Standard_Integer theIndex)
116 {return myV.Value(theIndex);}
117 Standard_EXPORT inline Standard_Real GetDiff(Standard_Integer theIndex)
118 {return myD.Value(theIndex);}
119 Standard_EXPORT inline Standard_Integer GetNear(Standard_Integer theIndex)
120 {return myNear.Value(theIndex);}
121
123 Standard_EXPORT inline void SetCenter(const gp_Pnt2d thePoint)
124 {myCenter = thePoint;}
125 Standard_EXPORT inline const gp_Pnt2d GetCenter()
126 {return myCenter;}
127
128 Standard_EXPORT void AddValue(Standard_Real theValue, Standard_Boolean theIsValid);
129
131 Standard_EXPORT Standard_Boolean ComputeDifference(GEOMImpl_Fillet1dPoint*);
132 Standard_EXPORT void FilterPoints(GEOMImpl_Fillet1dPoint*);
133
135 Standard_EXPORT Standard_Integer HasSolution(Standard_Real theRadius);
137 void RemoveSolution(Standard_Integer theIndex);
138
139private:
141 gp_Pnt2d myCenter;
142 Standard_Real myParam, myParam2;
143 TColStd_SequenceOfReal myV, myD;
144 TColStd_SequenceOfInteger myValid, myNear;
145};
146
147#endif
GEOMImpl_Fillet1dPoint is an internal class for 1D fillet algorithm to store and compare computed sol...
Definition: GEOMImpl_Fillet1d.hxx:87
TColStd_SequenceOfReal myV
Definition: GEOMImpl_Fillet1d.hxx:143
Standard_EXPORT const gp_Pnt2d GetCenter()
Definition: GEOMImpl_Fillet1d.hxx:125
Standard_EXPORT Standard_Integer GetNBValues()
Get values.
Definition: GEOMImpl_Fillet1d.hxx:114
gp_Pnt2d myCenter
Private fields.
Definition: GEOMImpl_Fillet1d.hxx:141
Standard_Real myParam2
Definition: GEOMImpl_Fillet1d.hxx:142
Standard_EXPORT Standard_Boolean IsValid(int theIndex)
Returns validity.
Definition: GEOMImpl_Fillet1d.hxx:110
TColStd_SequenceOfInteger myValid
Definition: GEOMImpl_Fillet1d.hxx:144
Standard_EXPORT void AddValue(Standard_Real theValue, Standard_Boolean theIsValid)
Definition: GEOMImpl_Fillet1d.cxx:694
Standard_EXPORT Standard_Integer HasSolution(Standard_Real theRadius)
Checks if point contains solution and returns the index of it if any.
Definition: GEOMImpl_Fillet1d.cxx:888
Standard_EXPORT Standard_Integer GetNear(Standard_Integer theIndex)
Definition: GEOMImpl_Fillet1d.hxx:119
Standard_EXPORT void FilterPoints(GEOMImpl_Fillet1dPoint *)
Definition: GEOMImpl_Fillet1d.cxx:760
Standard_EXPORT void SetParam2(const Standard_Real theParam2)
Definition: GEOMImpl_Fillet1d.hxx:104
void RemoveSolution(Standard_Integer theIndex)
Remove solution by index.
Definition: GEOMImpl_Fillet1d.cxx:903
TColStd_SequenceOfReal myD
Definition: GEOMImpl_Fillet1d.hxx:143
TColStd_SequenceOfInteger myNear
Definition: GEOMImpl_Fillet1d.hxx:144
Standard_EXPORT Standard_Real GetParam2()
Definition: GEOMImpl_Fillet1d.hxx:106
Standard_EXPORT Standard_Boolean ComputeDifference(GEOMImpl_Fillet1dPoint *)
compute difference between this and given point
Definition: GEOMImpl_Fillet1d.cxx:714
Standard_EXPORT GEOMImpl_Fillet1dPoint(Standard_Real theParam)
Puiblic methods.
Definition: GEOMImpl_Fillet1d.hxx:92
Standard_EXPORT GEOMImpl_Fillet1dPoint * Copy()
Make copy of point WARNING: Copies only field values: myParam, myV, myD, myValid.
Definition: GEOMImpl_Fillet1d.cxx:871
Standard_EXPORT Standard_Real GetValue(Standard_Integer theIndex)
Definition: GEOMImpl_Fillet1d.hxx:115
Standard_EXPORT void SetCenter(const gp_Pnt2d thePoint)
Set/Get center point.
Definition: GEOMImpl_Fillet1d.hxx:123
Standard_EXPORT void SetParam(Standard_Real theParam)
Set/Get parameter.
Definition: GEOMImpl_Fillet1d.hxx:100
Standard_Real myParam
Definition: GEOMImpl_Fillet1d.hxx:142
Standard_EXPORT Standard_Real GetParam() const
Definition: GEOMImpl_Fillet1d.hxx:102
Standard_EXPORT Standard_Real GetDiff(Standard_Integer theIndex)
Definition: GEOMImpl_Fillet1d.hxx:117
GEOMImpl_Fillet1d is 1D fillet algorithm on two planar edges with given radius.
Definition: GEOMImpl_Fillet1d.hxx:44
Handle(Geom2d_Curve) myCurve1
Standard_Boolean myStartSide
Definition: GEOMImpl_Fillet1d.hxx:76
Standard_Real myRadius
Definition: GEOMImpl_Fillet1d.hxx:73
Standard_Boolean processPoint(GEOMImpl_Fillet1dPoint *, GEOMImpl_Fillet1dPoint *, Standard_Real)
Definition: GEOMImpl_Fillet1d.cxx:427
Standard_Real myStart1
Definition: GEOMImpl_Fillet1d.hxx:73
TColStd_ListOfReal myResultParams
Definition: GEOMImpl_Fillet1d.hxx:74
TopoDS_Edge myEdge1
private fields
Definition: GEOMImpl_Fillet1d.hxx:70
Standard_EXPORT Standard_Boolean Perform(const Standard_Real theRadius)
Makes fillet with given radius.
Definition: GEOMImpl_Fillet1d.cxx:262
Standard_EXPORT GEOMImpl_Fillet1d(const TopoDS_Edge &theEdge1, const TopoDS_Edge &theEdge2, const gp_Pln &thePlane)
Constructor The fillet 1D algorithm is initialised by two edges and plane.
Definition: GEOMImpl_Fillet1d.cxx:101
Standard_EXPORT TopoDS_Edge Result(const gp_Pnt &thePoint, TopoDS_Edge &theEdge1, TopoDS_Edge &theEdge2)
Returns result fillet edge and modified edges as out parameters.
Definition: GEOMImpl_Fillet1d.cxx:570
Standard_Integer myDegreeOfRecursion
Definition: GEOMImpl_Fillet1d.hxx:77
Standard_Boolean myEdgesExchnged
Definition: GEOMImpl_Fillet1d.hxx:76
void performInterval(const Standard_Real theStart, const Standard_Real theEnd, const Standard_Integer theNBSteps)
private methods
Definition: GEOMImpl_Fillet1d.cxx:387
TopoDS_Edge myEdge2
Definition: GEOMImpl_Fillet1d.hxx:70
void fillPoint(GEOMImpl_Fillet1dPoint *)
Definition: GEOMImpl_Fillet1d.cxx:194
myCurve2
Definition: GEOMImpl_Fillet1d.hxx:72
Standard_Real myEnd1
Definition: GEOMImpl_Fillet1d.hxx:73
Standard_Real myEnd2
Definition: GEOMImpl_Fillet1d.hxx:73
Standard_Real myStart2
Definition: GEOMImpl_Fillet1d.hxx:73
Handle(Geom_Plane) myPlane
void performNewton(GEOMImpl_Fillet1dPoint *, GEOMImpl_Fillet1dPoint *)
Definition: GEOMImpl_Fillet1d.cxx:481
TColStd_SequenceOfInteger myResultOrientation
Definition: GEOMImpl_Fillet1d.hxx:75
void fillDiff(GEOMImpl_Fillet1dPoint *, Standard_Real, Standard_Boolean)
Definition: GEOMImpl_Fillet1d.cxx:244