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.
14 #include <StepGeom_BSplineSurface.ixx>
17 StepGeom_BSplineSurface::StepGeom_BSplineSurface () {}
19 void StepGeom_BSplineSurface::Init(
20 const Handle(TCollection_HAsciiString)& aName)
23 StepRepr_RepresentationItem::Init(aName);
26 void StepGeom_BSplineSurface::Init(
27 const Handle(TCollection_HAsciiString)& aName,
28 const Standard_Integer aUDegree,
29 const Standard_Integer aVDegree,
30 const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList,
31 const StepGeom_BSplineSurfaceForm aSurfaceForm,
32 const StepData_Logical aUClosed,
33 const StepData_Logical aVClosed,
34 const StepData_Logical aSelfIntersect)
36 // --- classe own fields ---
39 controlPointsList = aControlPointsList;
40 surfaceForm = aSurfaceForm;
43 selfIntersect = aSelfIntersect;
44 // --- classe inherited fields ---
45 StepRepr_RepresentationItem::Init(aName);
49 void StepGeom_BSplineSurface::SetUDegree(const Standard_Integer aUDegree)
54 Standard_Integer StepGeom_BSplineSurface::UDegree() const
59 void StepGeom_BSplineSurface::SetVDegree(const Standard_Integer aVDegree)
64 Standard_Integer StepGeom_BSplineSurface::VDegree() const
69 void StepGeom_BSplineSurface::SetControlPointsList(const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList)
71 controlPointsList = aControlPointsList;
74 Handle(StepGeom_HArray2OfCartesianPoint) StepGeom_BSplineSurface::ControlPointsList() const
76 return controlPointsList;
79 Handle(StepGeom_CartesianPoint) StepGeom_BSplineSurface::ControlPointsListValue(const Standard_Integer num1,const Standard_Integer num2) const
81 return controlPointsList->Value(num1,num2);
84 Standard_Integer StepGeom_BSplineSurface::NbControlPointsListI () const
86 if (controlPointsList.IsNull()) return 0;
87 return controlPointsList->UpperRow() - controlPointsList->LowerRow() + 1;
90 Standard_Integer StepGeom_BSplineSurface::NbControlPointsListJ () const
92 if (controlPointsList.IsNull()) return 0;
93 return controlPointsList->UpperCol() - controlPointsList->LowerCol() + 1;
96 void StepGeom_BSplineSurface::SetSurfaceForm(const StepGeom_BSplineSurfaceForm aSurfaceForm)
98 surfaceForm = aSurfaceForm;
101 StepGeom_BSplineSurfaceForm StepGeom_BSplineSurface::SurfaceForm() const
106 void StepGeom_BSplineSurface::SetUClosed(const StepData_Logical aUClosed)
111 StepData_Logical StepGeom_BSplineSurface::UClosed() const
116 void StepGeom_BSplineSurface::SetVClosed(const StepData_Logical aVClosed)
121 StepData_Logical StepGeom_BSplineSurface::VClosed() const
126 void StepGeom_BSplineSurface::SetSelfIntersect(const StepData_Logical aSelfIntersect)
128 selfIntersect = aSelfIntersect;
131 StepData_Logical StepGeom_BSplineSurface::SelfIntersect() const
133 return selfIntersect;