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. how to implement 'thicken-wire' in Modify menu of a spline?

how to implement 'thicken-wire' in Modify menu of a spline?

Scheduled Pinned Locked Moved Python API
2 Posts 2 Posters 336 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.
  • A Offline
    A Offline
    Aiping 0
    wrote on last edited by
    #1

    Dear Sim4life Team,
    I am writing a script to automatically generate implant wires, therefore I need to use the thicken-wire function for a spline, but I can not find the relevant description of this function in API, could you please help to check how to implement it in Python?

    Thank you
    Aiping

    S 1 Reply Last reply
    0
    • A Aiping 0

      Dear Sim4life Team,
      I am writing a script to automatically generate implant wires, therefore I need to use the thicken-wire function for a spline, but I can not find the relevant description of this function in API, could you please help to check how to implement it in Python?

      Thank you
      Aiping

      S Offline
      S Offline
      Spuky
      wrote on last edited by Spuky
      #2

      Hello Aiping,

      Bellow is a small example which might help you.

      import s4l_v1 as s4l
      import XCoreModeling
      import random
      
      radius = 0.1
      
      points = list()
      for ii in range(20):
      	points.append(s4l.Vec3(random.randrange(0,20), random.randrange(0,20), random.randrange(0,20)))
      spline = XCoreModeling.CreateSpline(points)
      wire = XCoreModeling.ThickenWire(spline, radius)
      

      Regards,

      Spuky

      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