Hi Jelle,
Here is the latest result:
(0.31577899999999998, -0.078945000000000001, 0.0) -> Line1 start 
point(90.311844000015768, 29.919742999954227, 0.0) -> Line1 end 
point(90.384789339801443, 29.933761195815848, 0.0) -> Circle1 curve start 
point(81.100845000009201, 63.416477000251348, 0.0) -> Circle1 curve end 
point(81.100845000000007, 63.416477000256997, 0.0) -> Line2 start 
point(81.100845000000007, 90.032760999999994, 0.0) -> Line2 end 
point(81.100845000000007, 90.032760999999994, 0.0) -> Line3 start 
point(10.077653999966074, 9.1989700000342509, 0.0) -> Line3 end point
The coordinates are OK, but circle center point cannot be displayed. If I can 
get the center x,y and z value, we can close the issue. 
Here is the code:    stepReader = STEPControl.STEPControl_Reader();    
stepReader.ReadFile("occ1.step");            numItems = 
stepReader.NbRootsForTransfer();    numTranslated = stepReader.TransferRoots(); 
   #print str(numTranslated)    shape = stepReader.OneShape();    from OCC 
import TopoDS, BRep, BRepTools    bt = BRep.BRep_Tool()    solids = 
Topo(shape).solids()    for sld in solids:        print sld    #print "solids: 
" + solid    faces = Topo(shape).faces()    for fcs in faces:        print fcs  
  wires = Topo(shape).wires()    for wrs in wires:        print wrs    edges = 
Topo(shape).edges()    for eds in edges:        print bt.Curve(eds)        
#print eds    vertices = Topo(shape).vertices()    shells = 
Topo(shape).shells()    for vcs in vertices:        print bt.Pnt(vcs).Coord()
BR,
Onur




Date: Tue, 17 Jul 2012 21:31:43 +0200
Subject: Re: about pythonocc
From: jelleferi...@gmail.com
To: onu...@hotmail.com; pythonocc-users@gna.org

(<OCC.Geom.Handle_Geom_Curve; proxy of <Swig Object of type 'Handle_Geom_Curve 
*' at 0x02F58D40> >, 0.0, 94.864181845445003)
(<OCC.Geom.Handle_Geom_Curve; proxy of <Swig Object of type 'Handle_Geom_Curve 
*' at 0x02F58D10> >, 5.8424600656149996, 
7.2648719527879999)(<OCC.Geom.Handle_Geom_Curve; proxy of <Swig Object of type 
'Handle_Geom_Curve *' at 0x02F58C98> >, 0.0, 26.616283999743001)
(<OCC.Geom.Handle_Geom_Curve; proxy of <Swig Object of type 'Handle_Geom_Curve 
*' at 0x02F58C50> >, 0.0, 107.60295268836001)

In the code, only edges are detected. I want to get LINEs and CURVEs. I can get 
coordinates but it isnt clear that coordinates are tied to a LINE or CURVE.

Do you have any suggestion?
Sure. By means of a look up table, like curve_lut or surface_lut. Than you know 
type of underlying curve you're dealing with.
Take a look here
take care,
-jelle                                    
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to