From: Nicolas RECHATIN Date: Mon, 28 Jun 2021 13:30:58 +0000 (+0200) Subject: fix doc/example/createNormalToFace X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3089442b77d9eb4eb58466f9dd7fede20cbd4aa4;p=modules%2Fshaper.git fix doc/example/createNormalToFace --- 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()