Skip to content

Python API

Scripting interface for Sim4Life

121 Topics 342 Posts
  • How to create a Cone from Python?

    Moved
    2
    0 Votes
    2 Posts
    326 Views
    SylvainS

    There is no python interface for the Solid Cone creation tool. However, you can achieve the same result by using the SkinWires() primitive as follows:

    import s4l_v1.model as model import XCoreModeling c1 = model.CreateCircle(model.Vec3(0,0,0), model.Vec3(0,0,1), 50) c2 = model.CreateCircle(model.Vec3(0,0,50), model.Vec3(0,0,1), 25) XCoreModeling.SkinWires([c1, c2])