That is perfectly clear ;')

-jelle

> My previous message was not very clear. Here is a small sample to illustrate 
> it: a box is created, all vertices are then obtained from the Topo class (8 
> vertices) and converted to a gp_Pnt. Finally, the X,Y an Z coordinates are 
> displayed:
> 
> ############## Python Code ##################
> from OCC.BRepPrimAPI import *
> from OCC.Utils.Topology import *
> from OCC.BRep import *
> 
> # Create shape
> my_shape = BRepPrimAPI_MakeBox(10,20,30).Shape()
> 
> # Traverse topology
> t = Topo(my_shape)
> for vertex in t.vertices():   
>     pnt = BRep_Tool().Pnt(vertex)
>     print 'X',pnt.X(),'Y',pnt.Y(),'Z',pnt.Z()
> ############# End of python code ################
> 
> And here is the ouput:
> X 0.0 Y 0.0 Z 30.0
> X 0.0 Y 0.0 Z 0.0
> X 0.0 Y 20.0 Z 30.0
> X 0.0 Y 20.0 Z 0.0
> X 10.0 Y 0.0 Z 30.0
> X 10.0 Y 0.0 Z 0.0
> X 10.0 Y 20.0 Z 30.0
> X 10.0 Y 20.0 Z 0.0

_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to