1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <Standard_Type.hxx>
16 #include <StepGeom_BSplineSurface.hxx>
17 #include <StepGeom_CartesianPoint.hxx>
18 #include <TCollection_HAsciiString.hxx>
20 IMPLEMENT_STANDARD_RTTIEXT(StepGeom_BSplineSurface,StepGeom_BoundedSurface)
22 StepGeom_BSplineSurface::StepGeom_BSplineSurface () {}
24 void StepGeom_BSplineSurface::Init(
25 const Handle(TCollection_HAsciiString)& aName,
26 const Standard_Integer aUDegree,
27 const Standard_Integer aVDegree,
28 const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList,
29 const StepGeom_BSplineSurfaceForm aSurfaceForm,
30 const StepData_Logical aUClosed,
31 const StepData_Logical aVClosed,
32 const StepData_Logical aSelfIntersect)
34 // --- classe own fields ---
37 controlPointsList = aControlPointsList;
38 surfaceForm = aSurfaceForm;
41 selfIntersect = aSelfIntersect;
42 // --- classe inherited fields ---
43 StepRepr_RepresentationItem::Init(aName);
47 void StepGeom_BSplineSurface::SetUDegree(const Standard_Integer aUDegree)
52 Standard_Integer StepGeom_BSplineSurface::UDegree() const
57 void StepGeom_BSplineSurface::SetVDegree(const Standard_Integer aVDegree)
62 Standard_Integer StepGeom_BSplineSurface::VDegree() const
67 void StepGeom_BSplineSurface::SetControlPointsList(const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList)
69 controlPointsList = aControlPointsList;
72 Handle(StepGeom_HArray2OfCartesianPoint) StepGeom_BSplineSurface::ControlPointsList() const
74 return controlPointsList;
77 Handle(StepGeom_CartesianPoint) StepGeom_BSplineSurface::ControlPointsListValue(const Standard_Integer num1,const Standard_Integer num2) const
79 return controlPointsList->Value(num1,num2);
82 Standard_Integer StepGeom_BSplineSurface::NbControlPointsListI () const
84 if (controlPointsList.IsNull()) return 0;
85 return controlPointsList->UpperRow() - controlPointsList->LowerRow() + 1;
88 Standard_Integer StepGeom_BSplineSurface::NbControlPointsListJ () const
90 if (controlPointsList.IsNull()) return 0;
91 return controlPointsList->UpperCol() - controlPointsList->LowerCol() + 1;
94 void StepGeom_BSplineSurface::SetSurfaceForm(const StepGeom_BSplineSurfaceForm aSurfaceForm)
96 surfaceForm = aSurfaceForm;
99 StepGeom_BSplineSurfaceForm StepGeom_BSplineSurface::SurfaceForm() const
104 void StepGeom_BSplineSurface::SetUClosed(const StepData_Logical aUClosed)
109 StepData_Logical StepGeom_BSplineSurface::UClosed() const
114 void StepGeom_BSplineSurface::SetVClosed(const StepData_Logical aVClosed)
119 StepData_Logical StepGeom_BSplineSurface::VClosed() const
124 void StepGeom_BSplineSurface::SetSelfIntersect(const StepData_Logical aSelfIntersect)
126 selfIntersect = aSelfIntersect;
129 StepData_Logical StepGeom_BSplineSurface::SelfIntersect() const
131 return selfIntersect;