Manipulate vectors in TUI - Manier les vecteurs sur TUI
Hello everybody and thaks in advance for answers,
I am a recent user of SALOME. I import an item in IGES format using commands in python TUI, I generate the normals to the surfaces of the piece that I can display on the GUI. However, I do not know how to retrieve the coordinates of these vectors (the normals), these vectors are seen by SALOME as objects of type GEOM._objref_GEOM_Object.Question: How can you retrieve the coordinates or calculate the norm of these vectors?
the code is:------------------------------------------------------------
import geompy
import salome
theFileName="/home/..../_part.igs"
Shape = geompy.ImportIGES(theFileName)
geompy.addToStudy(Shape, "PART")
faces = geompy.SubShapeAllSortedCentres(Shape, geompy.ShapeType["FACE"])
face0 = faces[0]
geompy.addToStudy(face0, "Face0")
vnorm0 = geompy.GetNormal(face0)
geompy.addToStudy(vnorm0, "Normale0")
face4 = faces[4]
geompy.addToStudy(face4, "Face4")
vnorm4 = geompy.GetNormal(face4)
geompy.addToStudy(vnorm4, "Normale4")
---------------------------------------------------------------------------
What I want is to add vnorm0 to vnorm4 and calculate the norm of these vectors.
Thank you for your help!
Powered by
Ploneboard
