With which Command(api), make reverse the SplitKinty process? Convert Openbrep to Untrimsrf

With which Command(api), make reverse the SplitKinty process? {Convert Openbrep to Untrimsrf}

For example, I want Sweep1 output asEdge SurfaceUnsplitof Untrimsurface type
How should I do this? Is the API to vote the SplitKinty action?

private void RunScript(Curve rail, List<Curve> shape, bool closed, ref object A, ref object w)
  {
    if(rail != null && shape != null){
      Brep [] x;;
      x = Brep.CreateFromSweep(rail, shape, closed, RhinoDocument.ModelAbsoluteTolerance);
      w = x[0].Faces.ShrinkFaces();
      x[0].Edges.MergeAllEdges(0.01);
      x[0].Edges.RemoveNakedMicroEdges(0.01);
      x[0].CullUnusedEdges();
      A = x[0];}

splitKinty.gh (18.0 KB)
@Mahdiyar

UnsplitSweep

private void RunScript(Curve rail, List<Curve> shape, double roundness, bool smooth, bool closed, ref object A)
{
  var abs = RhinoDocument.ModelAbsoluteTolerance;
  var ang = RhinoDocument.ModelAngleToleranceRadians;
  var breps = Brep.CreateFromSweep(rail, shape, closed, abs);
  var results = new List<Brep>();
  foreach(var brep in breps)
  {
    var result = brep.Faces.ExtractFace(0);
    result.Faces[0].ShrinkSurfaceToEdge();
    for(vari = 1; i < brep.Faces.Count; i++)
    {
      var srf = brep.Faces.ExtractFace(i);
      srf.Faces[0].ShrinkSurfaceToEdge();
      result = Brep.MergeSurfaces(result, srf, abs, ang, Point2d.Unset, Point2d.Unset, roundness, smooth);
    }
    results.Add(result);
  }
  A = results;
}

UnsplitSweep.gh (5.9 KB)

1 Like