From: Christophe Bourcier Date: Wed, 26 Jun 2024 08:16:19 +0000 (+0200) Subject: Adding test for bos #41748 [CEA] Issue in interpolation edition X-Git-Tag: V9_13_0b1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Ftlpr%2F57%2Fhead;p=modules%2Fshaper.git Adding test for bos #41748 [CEA] Issue in interpolation edition --- diff --git a/src/BuildPlugin/Test/TestInterpolationRename_41748.py b/src/BuildPlugin/Test/TestInterpolationRename_41748.py new file mode 100644 index 000000000..fb876e1eb --- /dev/null +++ b/src/BuildPlugin/Test/TestInterpolationRename_41748.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python + +### +### This file is generated automatically by SALOME v9.12.0 with dump python functionality +### + +# Test fix of bos #41748 [CEA] Issue in interpolation edition + +import sys +import salome + +salome.salome_init() + +### +### SHAPER component +### + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() + +### Create Part +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +model.addParameter(Part_1_doc, "r_canal", '0.00993') +model.addParameter(Part_1_doc, "r_helicoid", '0.109') +model.addParameter(Part_1_doc, "r_octagon", 'r_canal*0.5') +model.addParameter(Part_1_doc, "angle_octagon", '120') +model.addParameter(Part_1_doc, "deg_to_rad", '0.0174533') +model.addParameter(Part_1_doc, "spin_number", '2') +model.addParameter(Part_1_doc, "dz_by_spin", '0.0435') + +### Create Interpolation +Interpolation_1 = model.addInterpolation(Part_1_doc, "r_helicoid*cos(deg_to_rad*t)", "r_helicoid*sin(deg_to_rad*t)", "dz_by_spin*t/360", 0, 720, 800) +Interpolation_1.setName("Helicoid_Path_Interpolation_Fct") +Interpolation_1.result().setName("Helicoid_Path_Interpolation") + +print(Interpolation_1.xt().value()) + +print(Interpolation_1.xt().value()) +Interpolation_1.xt().setValue("r_helicoid*cos(deg_to_rad*t)*1") +print(Interpolation_1.xt().value()) + +model.end() + +model.checkFeaturesValidity(Part_1_doc) + +if salome.sg.hasDesktop(): + salome.sg.updateObjBrowser() diff --git a/src/BuildPlugin/tests.set b/src/BuildPlugin/tests.set index 5b55cbbb3..5908dd1b2 100644 --- a/src/BuildPlugin/tests.set +++ b/src/BuildPlugin/tests.set @@ -73,4 +73,5 @@ SET(TEST_NAMES Test20513_2.py TestNonPlanarFace.py TestNonPlanarFace_Edges.py + TestInterpolationRename_41748.py )