hi everyone

i tried to write a script in C# that lofts curves of an array. the
idea is that all lofts consist of the same count of curves. so i can
pass 20 curves and build 4 lofts with 5 curves each or 5 lofts with 4
curves each. the number of curves is passed to input i, the list of
curves to input C. on my way to the target i tried to loft the first
three curves. until now the script looks like that:

#region members
  private MRhinoApp app;
  private MRhinoDoc doc;

  public System.Object S;
#endregion

  void RunScript(List<OnCurve> C, int i)
  {
    List<MRhinoLoftCurve> loftCurves = new List<MRhinoLoftCurve>
();
    MRhinoLoftCurve crv = new MRhinoLoftCurve();
    MArgsRhinoLoft args = new MArgsRhinoLoft();
    OnBrep[] surfaces;

    for (int j = 0;j < i;j++){
      crv.m_curve = C[j].DuplicateCurve();
      crv.m_bClosed = C[j].IsClosed();
      loftCurves.Add(crv);
    }

    args.m_loftcurves = loftCurves.ToArray();
    args.SetClosed(false);
    args.SetLoftType(0);

    RhUtil.RhinoSdkLoft(args, out surfaces);
    S = surfaces;
  }

the script is passing lofts that looks like it has lofted a single
curve, i get an untrimmed surface that looks like one of the input
curves. what did i misunderstand?

Reply via email to