0030686: Visualization, SelectMgr_ViewerSelector - sorting issues of transformation...
[occt.git] / src / StepGeom / StepGeom_BezierSurfaceAndRationalBSplineSurface.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
7fd59977 14
42cf5bc1 15#include <Standard_Type.hxx>
7fd59977 16#include <StepGeom_BezierSurface.hxx>
42cf5bc1 17#include <StepGeom_BezierSurfaceAndRationalBSplineSurface.hxx>
7fd59977 18#include <StepGeom_RationalBSplineSurface.hxx>
42cf5bc1 19#include <TCollection_HAsciiString.hxx>
7fd59977 20
92efcf78 21IMPLEMENT_STANDARD_RTTIEXT(StepGeom_BezierSurfaceAndRationalBSplineSurface,StepGeom_BSplineSurface)
22
7fd59977 23StepGeom_BezierSurfaceAndRationalBSplineSurface::StepGeom_BezierSurfaceAndRationalBSplineSurface () {}
24
25void StepGeom_BezierSurfaceAndRationalBSplineSurface::Init(
26 const Handle(TCollection_HAsciiString)& aName,
27 const Standard_Integer aUDegree,
28 const Standard_Integer aVDegree,
29 const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList,
30 const StepGeom_BSplineSurfaceForm aSurfaceForm,
31 const StepData_Logical aUClosed,
32 const StepData_Logical aVClosed,
7fd59977 33 const StepData_Logical aSelfIntersect,
34 const Handle(StepGeom_BezierSurface)& aBezierSurface,
35 const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface)
36{
37 // --- classe own fields ---
38 bezierSurface = aBezierSurface;
39 rationalBSplineSurface = aRationalBSplineSurface;
40 // --- classe inherited fields ---
41 StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
42}
43
44
45void StepGeom_BezierSurfaceAndRationalBSplineSurface::Init(
46 const Handle(TCollection_HAsciiString)& aName,
47 const Standard_Integer aUDegree,
48 const Standard_Integer aVDegree,
49 const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList,
50 const StepGeom_BSplineSurfaceForm aSurfaceForm,
51 const StepData_Logical aUClosed,
52 const StepData_Logical aVClosed,
53 const StepData_Logical aSelfIntersect,
54 const Handle(TColStd_HArray2OfReal)& aWeightsData)
55{
56 // --- classe inherited fields ---
57
58 StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
59
60 // --- ANDOR componant fields ---
61
62 bezierSurface = new StepGeom_BezierSurface();
63 bezierSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
64
65 // --- ANDOR componant fields ---
66
67 rationalBSplineSurface = new StepGeom_RationalBSplineSurface();
68 rationalBSplineSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect, aWeightsData);
69}
70
71
72void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetBezierSurface(const Handle(StepGeom_BezierSurface)& aBezierSurface)
73{
74 bezierSurface = aBezierSurface;
75}
76
77Handle(StepGeom_BezierSurface) StepGeom_BezierSurfaceAndRationalBSplineSurface::BezierSurface() const
78{
79 return bezierSurface;
80}
81
82void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetRationalBSplineSurface(const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface)
83{
84 rationalBSplineSurface = aRationalBSplineSurface;
85}
86
87Handle(StepGeom_RationalBSplineSurface) StepGeom_BezierSurfaceAndRationalBSplineSurface::RationalBSplineSurface() const
88{
89 return rationalBSplineSurface;
90}
91
92 //--- Specific Methods for AND classe field access ---
93
94
95 //--- Specific Methods for AND classe field access ---
96
97
98void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetWeightsData(const Handle(TColStd_HArray2OfReal)& aWeightsData)
99{
100 rationalBSplineSurface->SetWeightsData(aWeightsData);
101}
102
103Handle(TColStd_HArray2OfReal) StepGeom_BezierSurfaceAndRationalBSplineSurface::WeightsData() const
104{
105 return rationalBSplineSurface->WeightsData();
106}
107
108Standard_Real StepGeom_BezierSurfaceAndRationalBSplineSurface::WeightsDataValue(const Standard_Integer num1,const Standard_Integer num2) const
109{
110 return rationalBSplineSurface->WeightsDataValue(num1,num2);
111}
112
113Standard_Integer StepGeom_BezierSurfaceAndRationalBSplineSurface::NbWeightsDataI () const
114{
115 return rationalBSplineSurface->NbWeightsDataI ();
116}
117
118Standard_Integer StepGeom_BezierSurfaceAndRationalBSplineSurface::NbWeightsDataJ () const
119{
120 return rationalBSplineSurface->NbWeightsDataJ ();
121}