• Announcements regarding our community

    13 Topics
    13 Posts

    We are excited to unveil our latest breakthrough: the ability to set up and run complex simulations directly in any browser, utilizing cloud technology – with Sim4Life web. The Sim4Life V8.0 web and desktop versions are identical twins offering seamless compatibility, excellent responsiveness, and a unified user experience.

    Sign up and start using the web version immediately! Through the end of March, the first 1000 users who log into Sim4Life web will receive a welcome gift of 1000 credits.

    Sim4Life web:
    sim4life.io for Commercial use
    sim4life.science for Academia

    sim4lifeweb.png

    Visit our new website for detailed information on Sim4Life.

    newsim4lifepage.png

    For further information, please email us at s4l-support@zmt.swiss.

  • 7 Topics
    13 Posts
  • 572 Topics
    2k Posts

    This behavior is by design for splines in Sim4Life. To extract points along a spline via the GUI, select the spline, then go to Wire Tools > To Polyline. This will allow you to specify a Faceting parameters that will determine how many points can be extracted.

    To extract points via the Python API, you can manually extract the points used to define the initial spline, or you can resample the spline:

    # -*- coding: utf-8 -*- import s4l_v1.model as model import XCoreModeling entity = model.AllEntities()['Spline Name'] # Get exact points making up spline points_exact = [] for p in entity.Parameters[0]: points_exact.append(p.Value) # Sample spline sample_interval = 100 wires = XCoreModeling.GetWires(entity) curve = wires[0].GetGeometry() curve.Transform(entity.Transform) interval = curve.ParameterRange length = XCoreModeling.MeasureLength([entity]) num_samples = int(length / sample_interval) param_delta = (interval.End - interval.Start) / num_samples points_sampled = [] for i in range(num_samples): points_sampled.append(curve.Eval(interval.Start + i * param_delta))
  • 0 Topics
    0 Posts
    No new posts.
  • Got a question? Ask away!

    10 Topics
    21 Posts
    No new posts.