]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Add TestMakeBrick1.py.
authorspo <sergey.pokhodenko@opencascade.com>
Fri, 30 Oct 2015 08:10:49 +0000 (11:10 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 30 Oct 2015 13:42:52 +0000 (16:42 +0300)
src/PythonAPI/CMakeLists.txt
src/PythonAPI/MakeBrick1.py
src/PythonAPI/Test/TestMakeBrick1.py [new file with mode: 0644]

index b6ab797df8c14c194a3493456a79997d45d378a9..8d3e0cab4c935f2f4a1a276cec4b17c423b48896 100644 (file)
@@ -30,4 +30,6 @@ ADD_UNIT_TESTS(
 
   TestFeaturesExtrusion.py
   TestFeaturesRevolution.py
+
+  TestMakeBrick1.py
   )
index ceead3f6949ed45fd81b7cde32a3ec94c5ee7b79..dd064fbd8a00930378546dff9c76a71b4ab7ad0f 100644 (file)
@@ -38,28 +38,26 @@ mybase.setPerpendicular( l1.result(), l4.result() )
 mywidth  = mybase.setLength( l1.result(), 50 )
 mylength = mybase.setDistance( l1.startPointData(), l3.result(), 50 )
 
-
 # Creating the extrusion
 
 mybox = model.addExtrusion( mypart, mybase.selectFace(), 50 )
 
-
 # Creating a cylinder on a face of the box
 
-thisface = "Extrusion_1/LateralFace_2"
-thisxmin = "Extrusion_1/LateralFace_3|Extrusion_1/LateralFace_2"
-thisxmax = "Extrusion_1/LateralFace_2|Extrusion_1/LateralFace_1"
+thisface = "Extrusion_1_1/LateralFace_2"
+thisxmin = "Extrusion_1_1/LateralFace_3|Extrusion_1_1/LateralFace_2"
+thisxmax = "Extrusion_1_1/LateralFace_2|Extrusion_1_1/LateralFace_1"
 thiszmin = "Sketch_1/Edge5_1"
-thiszmax = "Extrusion_1/LateralFace_2|Extrusion_1/TopFace_1"
+thiszmax = "Extrusion_1_1/LateralFace_2|Extrusion_1_1/ToFace_1"
 
 mystand = model.addSketch( mypart, thisface )
+
 c1      = mystand.addCircle( 0, 25, 5)
 mystand.setDistance( c1.centerData(), thisxmin, 10 )
 mystand.setDistance( c1.centerData(), thiszmax, 10 )
 
 myboss = model.addExtrusion( mypart, mystand.selectFace(c1.result()), -5 )
 
-
 # Subtracting the cylinder to the box
 
 model.addSubtraction( mypart, mybox.result(), myboss.result() )
diff --git a/src/PythonAPI/Test/TestMakeBrick1.py b/src/PythonAPI/Test/TestMakeBrick1.py
new file mode 100644 (file)
index 0000000..237ae03
--- /dev/null
@@ -0,0 +1,6 @@
+import unittest
+
+import MakeBrick1
+
+if __name__ == "__main__":
+    unittest.main()