]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'master' into cgt/devCEA
authorClarisse Genrault <clarisse.genrault@cea.fr>
Wed, 4 Jan 2017 13:26:04 +0000 (14:26 +0100)
committerClarisse Genrault <clarisse.genrault@cea.fr>
Wed, 4 Jan 2017 13:26:04 +0000 (14:26 +0100)
1  2 
CMakeLists.txt
src/FeaturesAPI/Test/APIParam_Translation.py
src/FeaturesPlugin/CMakeLists.txt
src/FeaturesPlugin/plugin-Features.xml
src/GeomAlgoAPI/CMakeLists.txt
src/PrimitivesAPI/Test/TestBox.py

diff --cc CMakeLists.txt
Simple merge
index f5ad81dce0ba99ce1b7c0bd1233406d1fe544614,a24515ae6d4a75caf8c9d382786c55604648ac07..85657d32f771f0bcda2c78bd558a8e6e6108dc50
@@@ -40,4 -40,4 +40,4 @@@ aPoint1 = model.addPoint(aDocument, 0, 
  aPoint2 = model.addPoint(aDocument, 10, 10, 0).result()
  aTranslation3 = model.addTranslation(aDocument, [model.selection("SOLID", "Box_1_1")], aPoint1, aPoint2).result()
  aSession.finishOperation()
- assert (aTranslation3 is not None)
 -assert (aTranslation2 is not None)
++assert (aTranslation3 is not None)
Simple merge
Simple merge
index 3caff58e0e246b57672e08aaa38bd5e52d17d2dc,0000000000000000000000000000000000000000..08b2d9f273080af26876cc6cf81a27d581529724
mode 100644,000000..100644
--- /dev/null
@@@ -1,53 -1,0 +1,53 @@@
- import model
 +"""
 +Test case for Primitive Box feature. 
 +Written on High API.
 +"""
 +from ModelAPI import *
 +from GeomAPI import *
 +
++from salome.shaper import model
 +
 +# Get session
 +aSession = ModelAPI_Session.get()
 +
 +# Create a part
 +aDocument = aSession.activeDocument()
 +aSession.startOperation()
 +model.addPart(aDocument)
 +aDocument = aSession.activeDocument()
 +aSession.finishOperation()
 +
 +# Create a box with dimensions
 +aSession.startOperation()
 +aBox1 = model.addBox(aDocument, 10, 10, 10).result()
 +aSession.finishOperation()
 +assert (aBox1 is not None)
 +
 +# Create a first point
 +aSession.startOperation()
 +aFirstPoint = model.addPoint(aDocument, 0, 0, 0).result()
 +aSession.finishOperation()
 +
 +# Create a second point
 +aSession.startOperation()
 +aSecondPoint = model.addPoint(aDocument, 50, 50, 50).result()
 +aSession.finishOperation()
 +
 +# Create a box with 2 points
 +aSession.startOperation()
 +aBox2 = model.addBox(aDocument, aFirstPoint, aSecondPoint).result()
 +aSession.finishOperation()
 +assert (aBox2 is not None)
 +
 +# Create a box with dimensions (error)
 +aSession.startOperation()
 +aBox3 = model.addBox(aDocument, -10, 10, 10).result()
 +aSession.finishOperation()
 +assert (aBox3 is not None)
 +
 +# Create a box with 2 points (error)
 +aSession.startOperation()
 +aBox4 = model.addBox(aDocument, aFirstPoint, aFirstPoint).result()
 +aSession.finishOperation()
 +assert (aBox4 is not None)
 +