-# Copyright (C) 2020 CEA/DEN, EDF R&D
+# Copyright (C) 2020-2023 CEA, EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
def test_bspline_by_coordinates(self):
""" Test 1. Create B-spline curve by coordinates of its poles
"""
- self.mySpline = self.mySketch.addSpline(self.myPolesCoordinates)
+ self.mySpline = self.mySketch.addSpline(poles = self.myPolesCoordinates)
self.myDOF += len(self.myPolesCoordinates) * 2
self.myNbSplines += 1
model.do()
def test_bspline_by_poles(self):
""" Test 2. Create B-spline curve by poles
"""
- self.mySpline = self.mySketch.addSpline(self.myPoles)
+ self.mySpline = self.mySketch.addSpline(poles = self.myPoles)
self.myDOF += len(self.myPoles) * 2
self.myNbSplines += 1
model.do()
""" Test 3. Create B-spline curve by poles and degree
"""
self.myDegree = 4
- self.mySpline = self.mySketch.addSpline(self.myDegree, self.myPoles)
+ self.mySpline = self.mySketch.addSpline(degree = self.myDegree, poles = self.myPoles)
self.myDOF += len(self.myPoles) * 2
self.myNbSplines += 1
model.do()
def test_bspline_by_poles_and_weights(self):
""" Test 4. Create B-spline curve by poles and weights
"""
- self.mySpline = self.mySketch.addSpline(self.myPoles, [1, 2, 3, 2, 1])
+ self.mySpline = self.mySketch.addSpline(poles = self.myPoles, weights = [1, 2, 3, 2, 1])
self.myDOF += len(self.myPoles) * 2
self.myNbSplines += 1
model.do()
(42.6953266459619, 76.8712491781612),
(54.1042604888826, 93.164895304981)
]
- self.mySpline = self.mySketch.addSpline(self.myDegree,
- self.myPolesCoordinates,
- [1, 1, 1, 1, 1, 1, 0.957903314642061, 0.95790331464206, 1, 1, 1, 1, 1, 1],
- [-494.543457494654, 500, 507.372773368102, 1501.91623086297],
- [6, 4, 4, 6])
+ self.mySpline = self.mySketch.addSpline(degree = self.myDegree,
+ poles = self.myPolesCoordinates,
+ weights = [1, 1, 1, 1, 1, 1, 0.957903314642061, 0.95790331464206, 1, 1, 1, 1, 1, 1],
+ knots = [-494.543457494654, 500, 507.372773368102, 1501.91623086297],
+ multiplicities = [6, 4, 4, 6])
self.myDOF += len(self.myPolesCoordinates) * 2
self.myNbSplines += 1
model.do()
""" Test 6. Create B-spline curve by 2 poles
"""
self.myDegree = 1
- self.mySpline = self.mySketch.addSpline(self.myPoles[:2])
+ self.mySpline = self.mySketch.addSpline(poles = self.myPoles[:2])
self.myDOF += 4
self.myNbSplines += 1
model.do()
""" Test 7. Create B-spline curve by 3 poles
"""
self.myDegree = 2
- self.mySpline = self.mySketch.addSpline(self.myPoles[:3])
+ self.mySpline = self.mySketch.addSpline(poles = self.myPoles[:3])
self.myDOF += 6
self.myNbSplines += 1
model.do()
def test_bspline_with_poles(self):
""" Test 8. Create B-spline curve and points coincident with its poles
"""
- self.mySpline = self.mySketch.addSpline(self.myPoles)
+ self.mySpline = self.mySketch.addSpline(poles = self.myPoles)
self.mySpline.controlPoles(regular = [0, 2], auxiliary = [1, 3])
self.myDOF += len(self.myPoles) * 2
self.myNbSplines += 1
def test_bspline_with_polygon(self):
""" Test 9. Create B-spline curve and its control polygon
"""
- self.mySpline = self.mySketch.addSpline(self.myPoles)
+ self.mySpline = self.mySketch.addSpline(poles = self.myPoles)
self.mySpline.controlPolygon(regular = [0, 2], auxiliary = [1, 3])
self.myDOF += len(self.myPoles) * 2
self.myNbSplines += 1