0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_FindContigousEdges.cxx
CommitLineData
b311480e 1// Created on: 1995-05-05
2// Created by: Jing Cheng MEI
3// Copyright (c) 1995-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
17#include <BRepOffsetAPI_FindContigousEdges.ixx>
18
19
20//=======================================================================
21//function : Constructor
22//purpose :
23//=======================================================================
24
25BRepOffsetAPI_FindContigousEdges::BRepOffsetAPI_FindContigousEdges(const Standard_Real tolerance,
26 const Standard_Boolean option)
27{
28 mySewing = new BRepBuilderAPI_Sewing;
29 Init(tolerance, option);
30}
31
32//=======================================================================
33//function : Init
34//purpose :
35//=======================================================================
36
37void BRepOffsetAPI_FindContigousEdges::Init(const Standard_Real tolerance,
38 const Standard_Boolean option)
39{
40 mySewing->Init(tolerance, option, Standard_False,Standard_True);
41}
42
43//=======================================================================
44//function : Add
45//purpose :
46//=======================================================================
47
48void BRepOffsetAPI_FindContigousEdges::Add(const TopoDS_Shape& aShape)
49{
50 mySewing->Add(aShape);
51}
52
53//=======================================================================
54//function : Perform
55//purpose :
56//=======================================================================
57
58void BRepOffsetAPI_FindContigousEdges::Perform()
59{
60 mySewing->Perform();
61}
62
63
64//=======================================================================
65//function : NbContigousEdges
66//purpose :
67//=======================================================================
68
69Standard_Integer BRepOffsetAPI_FindContigousEdges::NbContigousEdges() const
70{
71 return mySewing->NbContigousEdges();
72}
73
74//=======================================================================
75//function : ContigousEdge
76//purpose :
77//=======================================================================
78
79const TopoDS_Edge& BRepOffsetAPI_FindContigousEdges::ContigousEdge(const Standard_Integer index) const
80{
81 Standard_OutOfRange_Raise_if(index < 0 || index > NbContigousEdges(), "BRepOffsetAPI_FindContigousEdges::ContigousEdge");
82 return mySewing->ContigousEdge(index);
83}
84//=======================================================================
85//function : ContigousEdgeCouple
86//purpose :
87//=======================================================================
88
89const TopTools_ListOfShape& BRepOffsetAPI_FindContigousEdges::ContigousEdgeCouple(const Standard_Integer index) const
90{
91 Standard_OutOfRange_Raise_if(index < 0 || index > NbContigousEdges(), "BRepOffsetAPI_FindContigousEdges::ContigousEdgeCouple");
92 return mySewing->ContigousEdgeCouple(index);
93}
94
95//=======================================================================
96//function : SectionToBoundary
97//purpose :
98//=======================================================================
99
100const TopoDS_Edge& BRepOffsetAPI_FindContigousEdges::SectionToBoundary(const TopoDS_Edge& section) const
101{
102 Standard_NoSuchObject_Raise_if(!mySewing->IsSectionBound(section), "BRepOffsetAPI_FindContigousEdges::SectionToBoundary");
103 return mySewing->SectionToBoundary(section);
104}
105
106//=======================================================================
107//function : NbDegeneratedShapes
108//purpose :
109//=======================================================================
110
111Standard_Integer BRepOffsetAPI_FindContigousEdges::NbDegeneratedShapes() const
112{
113 return mySewing->NbDegeneratedShapes();
114}
115
116//=======================================================================
117//function : DegeneratedShape
118//purpose :
119//=======================================================================
120
121const TopoDS_Shape& BRepOffsetAPI_FindContigousEdges::DegeneratedShape(const Standard_Integer index) const
122{
123 Standard_OutOfRange_Raise_if(index < 0 || index > NbDegeneratedShapes(), "BRepOffsetAPI_FindContigousEdges::DegereratedShape");
124 return mySewing->DegeneratedShape(index);
125}
126
127//=======================================================================
128//function : IsDegenerated
129//purpose :
130//=======================================================================
131
132Standard_Boolean BRepOffsetAPI_FindContigousEdges::IsDegenerated(const TopoDS_Shape& aShape) const
133{
134 return mySewing->IsDegenerated(aShape);
135}
136
137//=======================================================================
138//function : IsModified
139//purpose :
140//=======================================================================
141
142Standard_Boolean BRepOffsetAPI_FindContigousEdges::IsModified(const TopoDS_Shape& aShape) const
143{
144 return mySewing->IsModified(aShape);
145}
146
147//=======================================================================
148//function : Modified
149//purpose :
150//=======================================================================
151
152const TopoDS_Shape& BRepOffsetAPI_FindContigousEdges::Modified(const TopoDS_Shape& aShape) const
153{
154 Standard_NoSuchObject_Raise_if(!IsModified(aShape),"BRepOffsetAPI_FindContigousEdges::Modified");
155 return mySewing->Modified(aShape);
156}
157
158
159
160//=======================================================================
161//function : Dump
162//purpose :
163//=======================================================================
164
165void BRepOffsetAPI_FindContigousEdges::Dump() const
166{
167 mySewing->Dump();
168}
169