]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Added parameter to models to check recompute.
authordbv <dbv@opencascade.com>
Wed, 5 Apr 2017 13:36:20 +0000 (16:36 +0300)
committerdbv <dbv@opencascade.com>
Wed, 5 Apr 2017 13:36:35 +0000 (16:36 +0300)
test.models/bobine_film_reel.py
test.models/bracket32.py
test.models/bushing.py
test.models/case24.py
test.models/ecran.py
test.models/gear.py

index 3c52a0085ebd372061491984e1278f06b05195ab..348dc27292fe9eeca47792ebff0d68f7ae1bb378 100644 (file)
@@ -6,7 +6,7 @@ model.begin()
 partSet = model.moduleDocument()
 Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
-model.addParameter(Part_1_doc, "R", "40")
+Parameter_R = model.addParameter(Part_1_doc, "R", "40")
 model.addParameter(Part_1_doc, "h", "3")
 model.addParameter(Part_1_doc, "R2", "33.5")
 model.addParameter(Part_1_doc, "h2", "4")
@@ -107,6 +107,12 @@ SketchLine_13.setName("SketchLine_16")
 SketchLine_13.result().setName("SketchLine_16")
 model.do()
 ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_7r-SketchLine_8r-SketchLine_10f-SketchLine_11f"), model.selection("FACE", "Sketch_8/Face-SketchLine_16f-SketchLine_17f-SketchLine_18r-SketchLine_19r"), model.selection("FACE", "Sketch_8/Face-SketchLine_12f-SketchLine_13f-SketchLine_14r-SketchLine_15r")], model.selection(), model.selection("FACE", "ExtrusionCut_2_1/Modfied_23"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_2_1")])
+
+# Test reexecution after parameter change
+Parameter_R.setValue(50)
+model.do()
+model.testResultsVolumes(ExtrusionCut_3, [35832.402050074902945198118686676])
+Parameter_R.setValue(40)
 model.end()
 
 from GeomAPI import GeomAPI_Shape
index c353823ec958be8ab34c914fa71192f0e4da501e..d0a766288f27fad3f79a6f131e979286afdbbbf2 100644 (file)
@@ -8,7 +8,7 @@ model.addParameter(Part_1_doc, "BHD", "8", "Base Hole Diameter")
 model.addParameter(Part_1_doc, "BHPD", "14", "Base Hole Plate Diameter")
 model.addParameter(Part_1_doc, "BHPS", "2", "Base Hole Plate Thickness")
 model.addParameter(Part_1_doc, "BHPFR", "BHPS/4*3", "Base Hole Plate Fillet Radius")
-model.addParameter(Part_1_doc, "BPS", "6", "Base Plate Thickness")
+Parameter_BPS = model.addParameter(Part_1_doc, "BPS", "6", "Base Plate Thickness")
 model.addParameter(Part_1_doc, "Draft", "100", "Bracket Draft")
 model.addParameter(Part_1_doc, "TDI", "14", "Tube Internal Diameter")
 model.addParameter(Part_1_doc, "TDE", "TDI+8", "Tube External Diameter")
@@ -809,6 +809,12 @@ model.do()
 RevolutionFuse_3 = model.addRevolutionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_9")], model.selection("EDGE", "Sketch_9/Edge-SketchLine_58"), 360, 0, [model.selection("SOLID", "RevolutionFuse_2_1")])
 RevolutionFuse_4 = model.addRevolutionFuse(Part_1_doc, [model.selection("COMPOUND", "Sketch_10")], model.selection("EDGE", "Sketch_10/Edge-SketchLine_66"), 360, 0, [model.selection("SOLID", "RevolutionFuse_3_1")])
 ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchCircle_11_2f"), model.selection("FACE", "Sketch_6/Face-SketchCircle_9_2f"), model.selection("WIRE", "Sketch_6/Wire-SketchCircle_10_2f"), model.selection("FACE", "Sketch_6/Face-SketchCircle_12_2f")], model.selection("EDGE", "PartSet/OZ"), "BPS+5", 5, [model.selection("SOLID", "RevolutionFuse_4_1")])
+
+# Test reexecution after parameter change
+Parameter_BPS.setValue(3)
+model.do()
+model.testResultsVolumes(ExtrusionCut_3, [154096.039414040715200826525688171])
+Parameter_BPS.setValue(6)
 model.end()
 
 from GeomAPI import GeomAPI_Shape
index 6b0cddb12d840c81025dae88ad260de5979be144..6028f640dc4e765bdf60ed7589759ad4d84db7f4 100644 (file)
@@ -4,6 +4,7 @@ model.begin()
 partSet = model.moduleDocument()
 Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
+Parameter_H = model.addParameter(Part_1_doc, "H", "12")
 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
 SketchLine_1 = Sketch_1.addLine(0, 0, 0, -14)
 SketchPoint_1 = Sketch_1.addPoint(model.selection("VERTEX", "PartSet/Origin"))
@@ -47,7 +48,7 @@ SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_5.result())
 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_3.result())
 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_7.result())
 SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_6.result())
-SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_7.result(), 12)
+SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_7.result(), "H")
 SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_1.result(), 14)
 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_1.endPoint(), SketchLine_3.result(), 1)
 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_2.endPoint(), SketchLine_1.result(), 1)
@@ -564,6 +565,12 @@ model.do()
 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f-SketchLine_5f-SketchLine_6f-SketchLine_8f-SketchLine_9f-SketchLine_11f-SketchLine_12f-SketchLine_13f-SketchLine_14f")], model.selection("EDGE", "PartSet/OX"), 360, 0)
 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_2/Face-SketchArc_1_2r-SketchLine_382f-SketchLine_383f-SketchLine_20f-SketchArc_2_2r-SketchLine_21f-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchLine_25f-SketchLine_26f-SketchLine_27f-SketchLine_28f-SketchLine_29f-SketchLine_30f-SketchLine_31f-SketchLine_32f-SketchLine_33f-SketchLine_34f-SketchLine_35f-SketchLine_36f-SketchLine_37f-SketchLine_38f-SketchLine_39f-SketchLine_40f-SketchLine_41f-SketchLine_42f-SketchLine_43f-SketchLine_44f-SketchLine_45f-SketchLine_46f-SketchLine_47f-SketchLine_48f-SketchLine_49f-SketchLine_50f-SketchLine_51f-SketchLine_52f-SketchLine_53f-SketchLine_54f-SketchLine_55f-SketchLine_56f-SketchLine_57f-SketchLine_58f-SketchLine_59f-SketchLine_60f-SketchLine_61f-SketchLine_62f-SketchLine_63f-SketchLine_64f-SketchLine_65f-SketchLine_66f-SketchLine_67f-SketchLine_68f-SketchLine_69f-SketchLine_70f-SketchLine_71f-SketchLine_72f-SketchLine_73f-SketchLine_74f-SketchLine_75f-SketchLine_76f-SketchLine_77f-SketchLine_78f-SketchLine_79f-SketchLine_80f-SketchLine_81f-SketchLine_82f-SketchLine_83f-SketchLine_84f-SketchLine_85f-SketchLine_86f-SketchLine_87f-SketchLine_88f-SketchLine_89f-SketchLine_90f-SketchLine_91f-SketchLine_92f-SketchLine_93f-SketchLine_94f-SketchLine_95f-SketchLine_96f-SketchLine_97f-SketchLine_98f-SketchLine_99f-SketchLine_100f-SketchLine_101f-SketchLine_102f-SketchLine_103f-SketchLine_104f-SketchLine_105f-SketchLine_106f-SketchLine_107f-SketchLine_108f-SketchLine_109f-SketchLine_110f-SketchLine_111f-SketchLine_112f-SketchLine_113f-SketchLine_114f-SketchLine_115f-SketchLine_116f-SketchLine_117f-SketchLine_118f-SketchLine_119f-SketchLine_120f-SketchLine_121f-SketchLine_122f-SketchLine_123f-SketchLine_124f-SketchLine_125f-SketchLine_126f-SketchLine_127f-SketchLine_128f-SketchLine_129f-SketchLine_130f-SketchLine_131f-SketchLine_132f-SketchLine_133f-SketchLine_134f-SketchLine_135f-SketchLine_136f-SketchLine_137f-SketchLine_138f-SketchLine_139f-SketchLine_140f-SketchLine_141f-SketchLine_142f-SketchLine_143f-SketchLine_144f-SketchLine_145f-SketchLine_146f-SketchLine_147f-SketchLine_148f-SketchLine_149f-SketchLine_150f-SketchLine_151f-SketchLine_152f-SketchLine_153f-SketchLine_154f-SketchLine_155f-SketchLine_156f-SketchLine_157f-SketchLine_158f-SketchLine_159f-SketchLine_160f-SketchLine_161f-SketchLine_162f-SketchLine_163f-SketchLine_164f-SketchLine_165f-SketchLine_166f-SketchLine_167f-SketchLine_168f-SketchLine_169f-SketchLine_170f-SketchLine_171f-SketchLine_172f-SketchLine_173f-SketchLine_174f-SketchLine_175f-SketchLine_176f-SketchLine_177f-SketchLine_178f-SketchLine_179f-SketchLine_180f-SketchLine_181f-SketchLine_182f-SketchLine_183f-SketchLine_184f-SketchLine_185f-SketchLine_186f-SketchLine_187f-SketchLine_188f-SketchLine_189f-SketchLine_190f-SketchLine_191f-SketchLine_192f-SketchLine_193f-SketchLine_194f-SketchLine_195f-SketchLine_196f-SketchLine_197f-SketchLine_198f-SketchLine_199f-SketchArc_3_2r-SketchArc_4_2r-SketchArc_5_2r-SketchArc_6_2r-SketchArc_7_2r-SketchArc_8_2r-SketchArc_9_2r-SketchArc_10_2r-SketchArc_11_2r-SketchArc_12_2r-SketchArc_13_2r-SketchArc_14_2r-SketchArc_15_2r-SketchArc_16_2r-SketchArc_17_2r-SketchArc_18_2r-SketchArc_19_2r-SketchArc_20_2r-SketchArc_21_2r-SketchArc_22_2r-SketchArc_23_2r-SketchArc_24_2r-SketchArc_25_2r-SketchArc_26_2r-SketchArc_27_2r-SketchArc_28_2r-SketchArc_29_2r-SketchArc_30_2r-SketchArc_31_2r-SketchArc_32_2r-SketchArc_33_2r-SketchArc_34_2r-SketchArc_35_2r-SketchArc_36_2r-SketchArc_37_2r-SketchArc_38_2r-SketchArc_39_2r-SketchArc_40_2r-SketchArc_41_2r-SketchArc_42_2r-SketchArc_43_2r-SketchArc_44_2r-SketchArc_45_2r-SketchArc_46_2r-SketchArc_47_2r-SketchArc_48_2r-SketchArc_49_2r-SketchArc_50_2r-SketchArc_51_2r-SketchArc_52_2r-SketchArc_53_2r-SketchArc_54_2r-SketchArc_55_2r-SketchArc_56_2r-SketchArc_57_2r-SketchArc_58_2r-SketchArc_59_2r-SketchArc_60_2r-SketchArc_61_2r-SketchArc_62_2r-SketchArc_63_2r-SketchArc_64_2r-SketchArc_65_2r-SketchArc_66_2r-SketchArc_67_2r-SketchArc_68_2r-SketchArc_69_2r-SketchArc_70_2r-SketchArc_71_2r-SketchArc_72_2r-SketchArc_73_2r-SketchArc_74_2r-SketchArc_75_2r-SketchArc_76_2r-SketchArc_77_2r-SketchArc_78_2r-SketchArc_79_2r-SketchArc_80_2r-SketchArc_81_2r-SketchArc_82_2r-SketchArc_83_2r-SketchArc_84_2r-SketchArc_85_2r-SketchArc_86_2r-SketchArc_87_2r-SketchArc_88_2r-SketchArc_89_2r-SketchArc_90_2r-SketchArc_91_2r-SketchArc_92_2r-SketchArc_93_2r-SketchArc_94_2r-SketchArc_95_2r-SketchArc_96_2r-SketchArc_97_2r-SketchArc_98_2r-SketchArc_99_2r-SketchArc_100_2r-SketchArc_101_2r-SketchArc_102_2r-SketchArc_103_2r-SketchArc_104_2r-SketchArc_105_2r-SketchArc_106_2r-SketchArc_107_2r-SketchArc_108_2r-SketchArc_109_2r-SketchArc_110_2r-SketchArc_111_2r-SketchArc_112_2r-SketchArc_113_2r-SketchArc_114_2r-SketchArc_115_2r-SketchArc_116_2r-SketchArc_117_2r-SketchArc_118_2r-SketchArc_119_2r-SketchArc_120_2r-SketchArc_121_2r-SketchArc_122_2r-SketchArc_123_2r-SketchArc_124_2r-SketchArc_125_2r-SketchArc_126_2r-SketchArc_127_2r-SketchArc_128_2r-SketchArc_129_2r-SketchArc_130_2r-SketchArc_131_2r-SketchArc_132_2r-SketchArc_133_2r-SketchArc_134_2r-SketchArc_135_2r-SketchArc_136_2r-SketchArc_137_2r-SketchArc_138_2r-SketchArc_139_2r-SketchArc_140_2r-SketchArc_141_2r-SketchArc_142_2r-SketchArc_143_2r-SketchArc_144_2r-SketchArc_145_2r-SketchArc_146_2r-SketchArc_147_2r-SketchArc_148_2r-SketchArc_149_2r-SketchArc_150_2r-SketchArc_151_2r-SketchArc_152_2r-SketchArc_153_2r-SketchArc_154_2r-SketchArc_155_2r-SketchArc_156_2r-SketchArc_157_2r-SketchArc_158_2r-SketchArc_159_2r-SketchArc_160_2r-SketchArc_161_2r-SketchArc_162_2r-SketchArc_163_2r-SketchArc_164_2r-SketchArc_165_2r-SketchArc_166_2r-SketchArc_167_2r-SketchArc_168_2r-SketchArc_169_2r-SketchArc_170_2r-SketchArc_171_2r-SketchArc_172_2r-SketchArc_173_2r-SketchArc_174_2r-SketchArc_175_2r-SketchArc_176_2r-SketchArc_177_2r-SketchArc_178_2r-SketchArc_179_2r-SketchArc_180_2r-SketchLine_200f-SketchLine_201f-SketchLine_202f-SketchLine_203f-SketchLine_204f-SketchLine_205f-SketchLine_206f-SketchLine_207f-SketchLine_208f-SketchLine_209f-SketchLine_210f-SketchLine_211f-SketchLine_212f-SketchLine_213f-SketchLine_214f-SketchLine_215f-SketchLine_216f-SketchLine_217f-SketchLine_218f-SketchLine_219f-SketchLine_220f-SketchLine_221f-SketchLine_222f-SketchLine_223f-SketchLine_224f-SketchLine_225f-SketchLine_226f-SketchLine_227f-SketchLine_228f-SketchLine_229f-SketchLine_230f-SketchLine_231f-SketchLine_232f-SketchLine_233f-SketchLine_234f-SketchLine_235f-SketchLine_236f-SketchLine_237f-SketchLine_238f-SketchLine_239f-SketchLine_240f-SketchLine_241f-SketchLine_242f-SketchLine_243f-SketchLine_244f-SketchLine_245f-SketchLine_246f-SketchLine_247f-SketchLine_248f-SketchLine_249f-SketchLine_250f-SketchLine_251f-SketchLine_252f-SketchLine_253f-SketchLine_254f-SketchLine_255f-SketchLine_256f-SketchLine_257f-SketchLine_258f-SketchLine_259f-SketchLine_260f-SketchLine_261f-SketchLine_262f-SketchLine_263f-SketchLine_264f-SketchLine_265f-SketchLine_266f-SketchLine_267f-SketchLine_268f-SketchLine_269f-SketchLine_270f-SketchLine_271f-SketchLine_272f-SketchLine_273f-SketchLine_274f-SketchLine_275f-SketchLine_276f-SketchLine_277f-SketchLine_278f-SketchLine_279f-SketchLine_280f-SketchLine_281f-SketchLine_282f-SketchLine_283f-SketchLine_284f-SketchLine_285f-SketchLine_286f-SketchLine_287f-SketchLine_288f-SketchLine_289f-SketchLine_290f-SketchLine_291f-SketchLine_292f-SketchLine_293f-SketchLine_294f-SketchLine_295f-SketchLine_296f-SketchLine_297f-SketchLine_298f-SketchLine_299f-SketchLine_300f-SketchLine_301f-SketchLine_302f-SketchLine_303f-SketchLine_304f-SketchLine_305f-SketchLine_306f-SketchLine_307f-SketchLine_308f-SketchLine_309f-SketchLine_310f-SketchLine_311f-SketchLine_312f-SketchLine_313f-SketchLine_314f-SketchLine_315f-SketchLine_316f-SketchLine_317f-SketchLine_318f-SketchLine_319f-SketchLine_320f-SketchLine_321f-SketchLine_322f-SketchLine_323f-SketchLine_324f-SketchLine_325f-SketchLine_326f-SketchLine_327f-SketchLine_328f-SketchLine_329f-SketchLine_330f-SketchLine_331f-SketchLine_332f-SketchLine_333f-SketchLine_334f-SketchLine_335f-SketchLine_336f-SketchLine_337f-SketchLine_338f-SketchLine_339f-SketchLine_340f-SketchLine_341f-SketchLine_342f-SketchLine_343f-SketchLine_344f-SketchLine_345f-SketchLine_346f-SketchLine_347f-SketchLine_348f-SketchLine_349f-SketchLine_350f-SketchLine_351f-SketchLine_352f-SketchLine_353f-SketchLine_354f-SketchLine_355f-SketchLine_356f-SketchLine_357f-SketchLine_358f-SketchLine_359f-SketchLine_360f-SketchLine_361f-SketchLine_362f-SketchLine_363f-SketchLine_364f-SketchLine_365f-SketchLine_366f-SketchLine_367f-SketchLine_368f-SketchLine_369f-SketchLine_370f-SketchLine_371f-SketchLine_372f-SketchLine_373f-SketchLine_374f-SketchLine_375f-SketchLine_376f-SketchLine_377f-SketchCircle_3_2f")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_7"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
 ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_4_2f")], model.selection(), 30, 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
+
+# Test reexecution after parameter change
+Parameter_H.setValue(14)
+model.do()
+model.testResultsVolumes(ExtrusionCut_2, [10205.255531030932615976780653000])
+Parameter_H.setValue(12)
 model.end()
 
 from GeomAPI import GeomAPI_Shape
index 65afa9b008a1e7354b69624e1aaa22f4b83b417c..8008bfb8e90aa825f835abbb629a3f0eeb0123d3 100644 (file)
@@ -6,6 +6,7 @@ model.begin()
 partSet = model.moduleDocument()
 Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
+Parameter_R = model.addParameter(Part_1_doc, "R", "3")
 model.addParameter(Part_1_doc, "DBody", "65")
 Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/YOZ"), 89, False)
 Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
@@ -54,7 +55,7 @@ SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchLine_6.startPoint()
 SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_4.endPoint())
 SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_6.result())
 SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_4.startPoint(), SketchLine_5.result())
-SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], 3)
+SketchConstraintRadius_1 = Sketch_1.setRadius(SketchArc_1.results()[1], "R")
 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchLine_3.startPoint(), SketchAPI_Line(SketchLine_7).startPoint())
 SketchConstraintDistance_1 = Sketch_1.setDistance(SketchLine_2.startPoint(), SketchLine_3.result(), 20)
 SketchConstraintDistance_2 = Sketch_1.setDistance(SketchLine_3.endPoint(), SketchLine_2.result(), 20)
@@ -763,6 +764,12 @@ model.do()
 RevolutionCut_1 = model.addRevolutionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_9")], model.selection("EDGE", "PartSet/OZ"), 0, 360, [model.selection("SOLID", "ExtrusionFuse_3_1")])
 ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_11/Wire-SketchCircle_4_2f"), model.selection("WIRE", "Sketch_11/Wire-SketchCircle_3_2f"), model.selection("WIRE", "Sketch_11/Wire-SketchCircle_5_2f")], model.selection(), 30, -15, [model.selection("SOLID", "RevolutionCut_1_1")])
 ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_11/Wire-SketchCircle_2_2f"), model.selection("FACE", "Sketch_11/Face-SketchCircle_6_2f"), model.selection("WIRE", "Sketch_11/Wire-SketchCircle_7_2f")], model.selection(), 30, 2, [model.selection("SOLID", "ExtrusionCut_3_1")])
+
+# Test reexecution after parameter change
+Parameter_R.setValue(5)
+model.do()
+model.testResultsVolumes(ExtrusionCut_4, [502615.944655187719035893678665161])
+Parameter_R.setValue(3)
 model.end()
 
 from GeomAPI import GeomAPI_Shape
index 6e09d950ef5ba3244a27276f96ce0883008e63ff..e68c36f74f12d6acafdca3aa253a4908b20ffa5b 100644 (file)
@@ -6,6 +6,7 @@ model.begin()
 partSet = model.moduleDocument()
 Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
+Parameter_H = model.addParameter(Part_1_doc, "H", "0.3")
 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("YOZ"))
 SketchLine_1 = Sketch_1.addLine(55.1, 10.3, 55.1, 0.3)
 SketchLine_2 = Sketch_1.addLine(55.1, 0.3, 2.3, 0.3)
@@ -71,7 +72,7 @@ SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_8.result(), S
 SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_11.result(), 55.4)
 SketchConstraintLength_3.setName("SketchConstraintLength_5")
 SketchConstraintVertical_4 = Sketch_1.setVertical(SketchLine_10.result())
-SketchConstraintLength_4 = Sketch_1.setLength(SketchLine_8.result(), 0.3)
+SketchConstraintLength_4 = Sketch_1.setLength(SketchLine_8.result(), "H")
 SketchArc_1 = Sketch_1.addArc(2.3, 2.3, 0.3, 2.3, 2.3, 0.3, False)
 SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_4.startPoint())
 SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_2.endPoint())
@@ -1040,6 +1041,12 @@ Sketch_8.setName("Sketch_9")
 Sketch_8.result().setName("Sketch_9")
 ExtrusionCut_7 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_9/Face-SketchLine_147f-SketchLine_148f-SketchArc_64_2f-SketchArc_65_2f"), model.selection("FACE", "Sketch_9/Face-SketchLine_139f-SketchLine_141f-SketchArc_63_2f-SketchArc_62_2f"), model.selection("FACE", "Sketch_9/Face-SketchArc_66_2f-SketchArc_67_2f-SketchLine_149r-SketchLine_150r")], model.selection(), 0, 10, [model.selection("SOLID", "ExtrusionCut_6_1")])
 model.do()
+
+# Test reexecution after parameter change
+Parameter_H.setValue(0.4)
+model.do()
+model.testResultsVolumes(ExtrusionCut_7, [5641.450357292746048187837004662])
+Parameter_H.setValue(0.3)
 model.end()
 
 from GeomAPI import GeomAPI_Shape
index d5190da9a16bc929970ec068f292bec7b7cb1756..a25353b364bea9d87ca374a57e055c42289ef551 100644 (file)
@@ -36,6 +36,7 @@ SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchLine_8.endPoint(),
 model.do()
 Part_1 = model.addPart(partSet)
 Part_1_doc = Part_1.document()
+Parameter_R = model.addParameter(Part_1_doc, "R", "15")
 Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("YOZ"))
 SketchPoint_2 = Sketch_2.addPoint(model.selection("VERTEX", "PartSet/Origin"))
 SketchLine_9 = Sketch_2.addLine(0, 0, 0, 45.59203984275747)
@@ -107,7 +108,7 @@ SketchLine_79 = Sketch_3.addLine(0, 0, 0, 15)
 SketchLine_79.setAuxiliary(True)
 SketchConstraintCoincidence_36 = Sketch_3.setCoincident(SketchLine_79.startPoint(), SketchPoint_3.result())
 SketchConstraintVertical_7 = Sketch_3.setVertical(SketchLine_79.result())
-SketchConstraintLength_8 = Sketch_3.setLength(SketchLine_79.result(), 15)
+SketchConstraintLength_8 = Sketch_3.setLength(SketchLine_79.result(), "R")
 SketchLine_80 = Sketch_3.addLine(0, 15, 0.5, 15)
 SketchLine_80.setAuxiliary(True)
 SketchConstraintCoincidence_37 = Sketch_3.setCoincident(SketchLine_79.endPoint(), SketchLine_80.startPoint())
@@ -171,6 +172,12 @@ model.do()
 ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection("FACE", "Revolution_1_1/Generated_Face_1"), 0, model.selection(), 0, [model.selection("SOLID", "Revolution_1_1")])
 RevolutionCut_1 = model.addRevolutionCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection("EDGE", "PartSet/OX"), 0, 360, [model.selection("SOLID", "ExtrusionCut_1_1")])
 model.do()
+
+# Test reexecution after parameter change
+Parameter_R.setValue(16)
+model.do()
+model.testResultsVolumes(RevolutionCut_1, [65207.601331337653391528874635696])
+Parameter_R.setValue(15)
 model.end()
 
 from GeomAPI import GeomAPI_Shape