X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FTest%2FTestPresentation.py;h=bd18f4c3d26e140b2634b21f64bdc1a657b2770d;hb=cdbbde4803e9c320204d537d22af4ac7ef024962;hp=2b675b4ceeaec9263cd121585b7761f00982fbe7;hpb=15e07776045d232135802444b5eb3375e31c9a0e;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/Test/TestPresentation.py b/src/SketchPlugin/Test/TestPresentation.py index 2b675b4ce..bd18f4c3d 100644 --- a/src/SketchPlugin/Test/TestPresentation.py +++ b/src/SketchPlugin/Test/TestPresentation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2019 CEA/DEN, EDF R&D +# Copyright (C) 2018-2021 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -175,3 +175,22 @@ aWeights.setValue(3, 1) aBSpline.boolean("need_control_poly").setValue(True) assert(featureToPresentation(aBSpline).getAISObject(None) is not None) aSession.finishOperation() + +# Test presentation for MacroBSplinePeriodic on low-level +aSession.startOperation() +aBSplineP = aSketchFeature.addFeature("SketchMacroBSplinePeriodic") +aPoles = geomDataAPI_Point2DArray(aBSplineP.attribute("poles")) +aPoles.setSize(4) +aPoles.setPnt(0, 0, 0) +aPoles.setPnt(1, 10, 0) +aPoles.setPnt(2, 10, 10) +aPoles.setPnt(3, 0, 10) +aWeights = aBSplineP.data().realArray("weights") +aWeights.setSize(4) +aWeights.setValue(0, 1) +aWeights.setValue(1, 2) +aWeights.setValue(2, 2) +aWeights.setValue(3, 1) +aBSplineP.boolean("need_control_poly").setValue(True) +assert(featureToPresentation(aBSplineP).getAISObject(None) is not None) +aSession.finishOperation()