Create normal to a face

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from salome.shaper import model
import os

### Create a Box
model.begin()
Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
model.do()

### Create a top face of the box normal
Normal_1 = model.getNormal(Part_1_doc, model.selection("FACE", "Box_1_1/Top"))
model.do()

model.end()

Download this script

Create normal to a face at vertex

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12

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()

Download this script