Create normal to a face

 1from salome.shaper import model
 2import os
 3
 4### Create a Box
 5model.begin()
 6Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
 7model.do()
 8
 9### Create a top face of the box normal
10Normal_1 = model.getNormal(Part_1_doc, model.selection("FACE", "Box_1_1/Top"))
11model.do()
12
13model.end()

Download this script

Create normal to a face at vertex

 1
 2from salome.shaper import model
 3import os
 4
 5model.begin()
 6Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
 7model.do()
 8    
 9Normal_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]"))
10model.do()
11
12model.end()

Download this script