0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / BRep / BRep_PolygonOnClosedSurface.cxx
CommitLineData
b311480e 1// Created on: 1995-03-15
2// Created by: Laurent PAINNOT
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
42cf5bc1 17
18#include <BRep_CurveRepresentation.hxx>
19#include <BRep_PolygonOnClosedSurface.hxx>
20#include <Geom_Surface.hxx>
21#include <Poly_Polygon2D.hxx>
22#include <Standard_Type.hxx>
23#include <TopLoc_Location.hxx>
7fd59977 24
92efcf78 25IMPLEMENT_STANDARD_RTTIEXT(BRep_PolygonOnClosedSurface,BRep_PolygonOnSurface)
26
7fd59977 27//=======================================================================
28//function : BRep_PolygonOnClosedSurface
29//purpose :
30//=======================================================================
7fd59977 31BRep_PolygonOnClosedSurface::BRep_PolygonOnClosedSurface(const Handle(Poly_Polygon2D)& P1,
32 const Handle(Poly_Polygon2D)& P2,
33 const Handle(Geom_Surface)& S,
34 const TopLoc_Location& L):
35 BRep_PolygonOnSurface(P1, S, L),
36 myPolygon2(P2)
37{
38}
39
40//=======================================================================
41//function : IsPolygonOnClosedSurface
42//purpose :
43//=======================================================================
44
45Standard_Boolean BRep_PolygonOnClosedSurface::IsPolygonOnClosedSurface() const
46{
47 return Standard_True;
48}
49
50//=======================================================================
51//function : Polygon2
52//purpose :
53//=======================================================================
54
55const Handle(Poly_Polygon2D)& BRep_PolygonOnClosedSurface::Polygon2() const
56{
57 return myPolygon2;
58}
59
60//=======================================================================
61//function : Polygon2
62//purpose :
63//=======================================================================
64
65void BRep_PolygonOnClosedSurface::Polygon2(const Handle(Poly_Polygon2D)& P)
66{
67 myPolygon2 = P;
68}
69
70//=======================================================================
71//function : Copy
72//purpose :
73//=======================================================================
74
75Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedSurface::Copy() const
76{
77 Handle(BRep_PolygonOnClosedSurface) P =
78 new BRep_PolygonOnClosedSurface(Polygon(), myPolygon2, Surface(), Location());
79 return P;
80}
81
bc73b006 82//=======================================================================
83//function : DumpJson
84//purpose :
85//=======================================================================
86void BRep_PolygonOnClosedSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
87{
88 OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
89
90 OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnSurface)
91
92 OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get())
93}
94