1 // Created on: 1993-07-06
2 // Created by: Remi LEQUETTE
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.
18 #include <BRep_CurveRepresentation.hxx>
19 #include <Geom2d_Curve.hxx>
20 #include <Geom_Curve.hxx>
21 #include <Geom_Surface.hxx>
22 #include <Poly_Polygon2D.hxx>
23 #include <Poly_Polygon3D.hxx>
24 #include <Poly_PolygonOnTriangulation.hxx>
25 #include <Poly_Triangulation.hxx>
26 #include <Standard_DomainError.hxx>
27 #include <Standard_Type.hxx>
28 #include <TColStd_HArray1OfInteger.hxx>
29 #include <TopLoc_Location.hxx>
31 IMPLEMENT_STANDARD_RTTIEXT(BRep_CurveRepresentation,Standard_Transient)
33 //=======================================================================
34 //function : BRep_CurveRepresentation
36 //=======================================================================
37 BRep_CurveRepresentation::BRep_CurveRepresentation(const TopLoc_Location& L):
43 //=======================================================================
44 //function : IsCurve3D
46 //=======================================================================
48 Standard_Boolean BRep_CurveRepresentation::IsCurve3D()const
50 return Standard_False;
54 //=======================================================================
55 //function : IsCurveOnSurface
57 //=======================================================================
59 Standard_Boolean BRep_CurveRepresentation::IsCurveOnSurface()const
61 return Standard_False;
65 //=======================================================================
66 //function : IsCurveOnClosedSurface
68 //=======================================================================
70 Standard_Boolean BRep_CurveRepresentation::IsCurveOnClosedSurface()const
72 return Standard_False;
76 //=======================================================================
77 //function : IsRegularity
79 //=======================================================================
81 Standard_Boolean BRep_CurveRepresentation::IsRegularity()const
83 return Standard_False;
86 //=======================================================================
87 //function : IsCurveOnSurface
89 //=======================================================================
91 Standard_Boolean BRep_CurveRepresentation::IsCurveOnSurface
92 (const Handle(Geom_Surface)& , const TopLoc_Location& )const
94 return Standard_False;
98 //=======================================================================
99 //function : IsRegularity
101 //=======================================================================
103 Standard_Boolean BRep_CurveRepresentation::IsRegularity
104 (const Handle(Geom_Surface)& ,
105 const Handle(Geom_Surface)& ,
106 const TopLoc_Location& ,
107 const TopLoc_Location& )const
109 return Standard_False;
112 //=======================================================================
113 //function : IsPolygon3D
115 //=======================================================================
117 Standard_Boolean BRep_CurveRepresentation::IsPolygon3D() const
119 return Standard_False;
122 //=======================================================================
123 //function : IsPolygonOnTriangulation
125 //=======================================================================
127 Standard_Boolean BRep_CurveRepresentation::IsPolygonOnTriangulation() const
129 return Standard_False;
133 //=======================================================================
134 //function : IsPolygonOnTriangulation
136 //=======================================================================
138 Standard_Boolean BRep_CurveRepresentation::IsPolygonOnTriangulation
139 (const Handle(Poly_Triangulation)&, const TopLoc_Location&) const
141 return Standard_False;
145 //=======================================================================
146 //function : IsPolygonOnClosedTriangulation
148 //=======================================================================
150 Standard_Boolean BRep_CurveRepresentation::IsPolygonOnClosedTriangulation() const
152 return Standard_False;
156 //=======================================================================
157 //function : IsPolygonOnClosedSurface
159 //=======================================================================
161 Standard_Boolean BRep_CurveRepresentation::IsPolygonOnClosedSurface() const
163 return Standard_False;
166 //=======================================================================
167 //function : IsPolygonOnSurface
169 //=======================================================================
171 Standard_Boolean BRep_CurveRepresentation::IsPolygonOnSurface() const
173 return Standard_False;
176 //=======================================================================
177 //function : IsPolygonOnSurface
179 //=======================================================================
181 Standard_Boolean BRep_CurveRepresentation::IsPolygonOnSurface
182 (const Handle(Geom_Surface)&,
183 const TopLoc_Location&) const
185 return Standard_False;
189 //=======================================================================
192 //=======================================================================
194 const Handle(Geom_Curve)& BRep_CurveRepresentation::Curve3D()const
196 throw Standard_DomainError("BRep_CurveRepresentation");
199 //=======================================================================
202 //=======================================================================
204 void BRep_CurveRepresentation::Curve3D(const Handle(Geom_Curve)&)
206 throw Standard_DomainError("BRep_CurveRepresentation");
213 //=======================================================================
216 //=======================================================================
218 const Handle(Geom_Surface)& BRep_CurveRepresentation::Surface()const
220 throw Standard_DomainError("BRep_CurveRepresentation");
224 //=======================================================================
227 //=======================================================================
229 const Handle(Geom2d_Curve)& BRep_CurveRepresentation::PCurve()const
231 throw Standard_DomainError("BRep_CurveRepresentation");
234 //=======================================================================
237 //=======================================================================
239 const Handle(Geom2d_Curve)& BRep_CurveRepresentation::PCurve2()const
241 throw Standard_DomainError("BRep_CurveRepresentation");
244 //=======================================================================
247 //=======================================================================
249 void BRep_CurveRepresentation::PCurve(const Handle(Geom2d_Curve)&)
251 throw Standard_DomainError("BRep_CurveRepresentation");
254 //=======================================================================
257 //=======================================================================
259 void BRep_CurveRepresentation::PCurve2(const Handle(Geom2d_Curve)&)
261 throw Standard_DomainError("BRep_CurveRepresentation");
265 //=======================================================================
266 //function : Continuity
268 //=======================================================================
270 const GeomAbs_Shape& BRep_CurveRepresentation::Continuity()const
272 throw Standard_DomainError("BRep_CurveRepresentation");
275 //=======================================================================
276 //function : Continuity
278 //=======================================================================
280 void BRep_CurveRepresentation::Continuity(const GeomAbs_Shape )
282 throw Standard_DomainError("BRep_CurveRepresentation");
286 //=======================================================================
287 //function : Surface2
289 //=======================================================================
291 const Handle(Geom_Surface)& BRep_CurveRepresentation::Surface2()const
293 throw Standard_DomainError("BRep_CurveRepresentation");
297 //=======================================================================
298 //function : Location2
300 //=======================================================================
302 const TopLoc_Location& BRep_CurveRepresentation::Location2()const
304 throw Standard_DomainError("BRep_CurveRepresentation");
309 //=======================================================================
310 //function : Polygon3D
312 //=======================================================================
314 const Handle(Poly_Polygon3D)& BRep_CurveRepresentation::Polygon3D()const
316 throw Standard_DomainError("BRep_CurveRepresentation");
319 //=======================================================================
320 //function : Polygon3D
322 //=======================================================================
324 void BRep_CurveRepresentation::Polygon3D(const Handle(Poly_Polygon3D)&)
326 throw Standard_DomainError("BRep_CurveRepresentation");
330 //=======================================================================
333 //=======================================================================
335 const Handle(Poly_Polygon2D)& BRep_CurveRepresentation::Polygon()const
337 throw Standard_DomainError("BRep_CurveRepresentation");
341 //=======================================================================
344 //=======================================================================
346 void BRep_CurveRepresentation::Polygon(const Handle(Poly_Polygon2D)&)
348 throw Standard_DomainError("BRep_CurveRepresentation");
351 //=======================================================================
352 //function : PolygonOnTriangulation2
354 //=======================================================================
356 const Handle(Poly_PolygonOnTriangulation)& BRep_CurveRepresentation::PolygonOnTriangulation2() const
358 throw Standard_DomainError("BRep_CurveRepresentation");
361 //=======================================================================
362 //function : PolygonOnTriangulation2
364 //=======================================================================
366 void BRep_CurveRepresentation::PolygonOnTriangulation2
367 (const Handle(Poly_PolygonOnTriangulation)&)
369 throw Standard_DomainError("BRep_CurveRepresentation");
373 //=======================================================================
374 //function : PolygonOnTriangulation
376 //=======================================================================
378 void BRep_CurveRepresentation::PolygonOnTriangulation
379 (const Handle(Poly_PolygonOnTriangulation)&)
381 throw Standard_DomainError("BRep_CurveRepresentation");
385 //=======================================================================
386 //function : PolygonOnTriangulation
388 //=======================================================================
390 const Handle(Poly_PolygonOnTriangulation)& BRep_CurveRepresentation::PolygonOnTriangulation()
393 throw Standard_DomainError("BRep_CurveRepresentation");
395 //=======================================================================
396 //function : Triangulation
398 //=======================================================================
400 const Handle(Poly_Triangulation)& BRep_CurveRepresentation::Triangulation()
403 throw Standard_DomainError("BRep_CurveRepresentation");
408 //=======================================================================
409 //function : Polygon2
411 //=======================================================================
413 const Handle(Poly_Polygon2D)& BRep_CurveRepresentation::Polygon2()const
415 throw Standard_DomainError("BRep_CurveRepresentation");
419 //=======================================================================
420 //function : Polygon2
422 //=======================================================================
424 void BRep_CurveRepresentation::Polygon2(const Handle(Poly_Polygon2D)&)
426 throw Standard_DomainError("BRep_CurveRepresentation");
429 //=======================================================================
430 //function : DumpJson
432 //=======================================================================
433 void BRep_CurveRepresentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
435 OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
437 OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)