Skip to content
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

ZMT zurich med tech

  1. Home
  2. Sim4Life
  3. Python API
  4. Example using the model.Extrude function

Example using the model.Extrude function

Scheduled Pinned Locked Moved Python API
pythonextrude
1 Posts 1 Posters 414 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SylvainS Offline
    SylvainS Offline
    Sylvain
    ZMT
    wrote on last edited by Sylvain
    #1

    function Extrude

    Extrude( (object)entities, (Vec3​)extrusion_vector, (object)make_solid, (object)assign_new_color) -> Body

    Extrudes a body out of a surface.

    Member of module model.

    import s4l_v1.model as model
    from s4l_v1.model import Vec3
     
    p1 = model.CreatePolyLine([Vec3(0,0,0), Vec3(0,1,0),Vec3(1,1,0), Vec3(1,0,0)])
    model.Extrude([p1],Vec3(0,0,5),True,False)  
     
    p2 = model.CreatePolyLine([Vec3(2,0,0), Vec3(2,1,0),Vec3(3,1,0), Vec3(3,0,0), Vec3(2,0,0)])
    model.Extrude([p2],Vec3(0,0,5),True,False) 
    

    0_1512545406635_a4c91ec6-5eb3-4821-808d-442ed3c12c97-image.png 0_1512545689380_05232d89-e6b9-49e5-998f-913b493c2a07-image.png

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Search