From 3089442b77d9eb4eb58466f9dd7fede20cbd4aa4 Mon Sep 17 00:00:00 2001 From: Nicolas RECHATIN Date: Mon, 28 Jun 2021 15:30:58 +0200 Subject: [PATCH] fix doc/example/createNormalToFace --- doc/examples/createNormalToFace.py | 12 ------------ doc/examples/createNormalToFaceAtVertex.py | 12 ------------ .../doc/examples/createNormalToFace.py | 9 +++------ .../doc/examples/createNormalToFaceAtVertex.py | 11 +++-------- 4 files changed, 6 insertions(+), 38 deletions(-) delete mode 100644 doc/examples/createNormalToFace.py delete mode 100644 doc/examples/createNormalToFaceAtVertex.py diff --git a/doc/examples/createNormalToFace.py b/doc/examples/createNormalToFace.py deleted file mode 100644 index c89e07c6b..000000000 --- a/doc/examples/createNormalToFace.py +++ /dev/null @@ -1,12 +0,0 @@ -from salome.shaper import model -import os - -model.begin() -Box_1 = model.addBox(Part_1_doc, 10, 10, 10) -model.do() - -### Create BoundingBox -Normal_1 = model.getNormal(Part_1_doc, model.selection("FACE", "Box_1_1/Top")) -model.do() - -model.end() diff --git a/doc/examples/createNormalToFaceAtVertex.py b/doc/examples/createNormalToFaceAtVertex.py deleted file mode 100644 index eb0071efb..000000000 --- a/doc/examples/createNormalToFaceAtVertex.py +++ /dev/null @@ -1,12 +0,0 @@ - -from salome.shaper import model -import os - -model.begin() -Box_1 = model.addBox(Part_1_doc, 10, 10, 10) -model.do() - -Normal_1 = model.getNormal(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Right][Box_1_1/Bottom]")) -model.do() - -model.end() diff --git a/src/FeaturesPlugin/doc/examples/createNormalToFace.py b/src/FeaturesPlugin/doc/examples/createNormalToFace.py index a1f973011..c89e07c6b 100644 --- a/src/FeaturesPlugin/doc/examples/createNormalToFace.py +++ b/src/FeaturesPlugin/doc/examples/createNormalToFace.py @@ -2,14 +2,11 @@ from salome.shaper import model import os model.begin() -file_path = os.path.join(os.getenv("DATA_DIR"),"Shapes","Brep","box1.brep") -partSet = model.moduleDocument() -Part_1 = model.addPart(partSet) -Part_1_doc = Part_1.document() -Import_1 = model.addImport(Part_1_doc,file_path) +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) model.do() ### Create BoundingBox -Normal_1 = model.getNormal(Part_1_doc, model.selection("FACE", "box1_1/Shape_6")) +Normal_1 = model.getNormal(Part_1_doc, model.selection("FACE", "Box_1_1/Top")) model.do() + model.end() diff --git a/src/FeaturesPlugin/doc/examples/createNormalToFaceAtVertex.py b/src/FeaturesPlugin/doc/examples/createNormalToFaceAtVertex.py index c59aa67c5..eb0071efb 100644 --- a/src/FeaturesPlugin/doc/examples/createNormalToFaceAtVertex.py +++ b/src/FeaturesPlugin/doc/examples/createNormalToFaceAtVertex.py @@ -3,15 +3,10 @@ from salome.shaper import model import os model.begin() -file_path = os.path.join(os.getenv("DATA_DIR"),"Shapes","Brep","box1.brep") -partSet = model.moduleDocument() -Part_1 = model.addPart(partSet) -Part_1_doc = Part_1.document() -Import_1 = model.addImport(Part_1_doc,file_path) +Box_1 = model.addBox(Part_1_doc, 10, 10, 10) model.do() -### Create BoundingBox -Normal_1 = model.getNormal(Part_1_doc, model.selection("FACE", "box1_1/Shape_6"), - model.selection("VERTEX", "[box1_1/Shape_2][box1_1/Shape_4][box1_1/Shape_6]")) +Normal_1 = model.getNormal(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "[Box_1_1/Front][Box_1_1/Right][Box_1_1/Bottom]")) model.do() + model.end() -- 2.39.2