From 23aae48f6eea55b6b429f0869618a087ada42b88 Mon Sep 17 00:00:00 2001 From: cg246364 Date: Wed, 3 Mar 2021 14:05:12 +0100 Subject: [PATCH] Interpolation : test modification --- src/BuildPlugin/Test/TestInterpolation.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/BuildPlugin/Test/TestInterpolation.py b/src/BuildPlugin/Test/TestInterpolation.py index d2460699f..03e1b5449 100644 --- a/src/BuildPlugin/Test/TestInterpolation.py +++ b/src/BuildPlugin/Test/TestInterpolation.py @@ -19,6 +19,8 @@ from salome.shaper import model +import math + # Create document model.begin() partSet = model.moduleDocument() @@ -177,9 +179,15 @@ model.end() Part_5 = model.addPart(partSet) Part_5_doc = Part_5.document() -Interpolation_11 = model.addInterpolation(Part_5_doc, "sin(t)","cos(t)","t", 0, 100, 10) +Interpolation_11 = model.addInterpolation(Part_5_doc, "sin(t)","cos(t)","t", 0, 100, 100) model.do() model.testNbResults(Interpolation_11, 1) +myDelta = 1e-6 +Props = model.getGeometryCalculation(Part_5_doc,model.selection("EDGE", "Interpolation_1_1")) +model.do() +aRefLength = 141.32010978124 +aResLength = Props[0] +assert (math.fabs(aResLength - aRefLength) < myDelta), "The length is wrong: expected = {0}, real = {1}".format(aRefLength, aResLength) model.end() # ============================================================================= # Test 13. Check Python dump -- 2.39.2