Guest User

Cutting Edge #2

a guest
Oct 7th, 2014
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. from OCC import GC
  2. from OCC import gp
  3. from OCC import TopoDS
  4. from OCC import BRepBuilderAPI
  5. from OCC import BRepPrimAPI
  6. from OCC import BRepFill
  7. from OCC.Display.SimpleGui import init_display
  8.  
  9. a = gp.gp_Pnt(-1.0, 0.0, 0.0)
  10. b = gp.gp_Pnt(0.0, -1.0, 0.0)
  11. c = gp.gp_Pnt(1.0, 0.0, 0.0)
  12.  
  13. arc1 = GC.GC_MakeArcOfCircle(a, b, c)
  14. arc1Edge = BRepBuilderAPI.BRepBuilderAPI_MakeEdge(arc1.Value())
  15.  
  16.  
  17. prismVec = gp.gp_Vec(0.0, 0.0, 5.0)
  18.  
  19. face = BRepPrimAPI.BRepPrimAPI_MakePrism(arc1Edge.Edge(), prismVec)
  20. vec2 = gp.gp_Vec(0.0, -5.0, 0.0)
  21. body = BRepPrimAPI.BRepPrimAPI_MakePrism(face.Shape(), vec2)
  22.  
  23.  
  24. display, start_display, add_menu, add_function_to_menu = init_display()
  25. display.DisplayShape(body.Shape(), update=True)
  26. start_display()
Advertisement
Add Comment
Please, Sign In to add comment