0 Replies Latest reply on Aug 18, 2018 3:26 AM by Zhen Yan

    How to stitch together sheets with IModeler::CreateBodiesFromSheets2()?

    Zhen Yan

      I want to cordon off a distance from an edge, basically sweep a sphere from start to finish.


      I make a circle at an end of the edge with IModeler::CreateArc(), normal to the tangent of the edge, make it a spline with IModeler::MakeBsplineCurve2(), sweep from start to end with CreateSweptBody() to create the tubular shaped sheet.


      I made 2 spheres, one at each end using CreateSphericalSurface2(). Then I trim them with


      ball.CreateTrimmedSheet4(new Curve[] { null }, true);


      However, when I sew them together with


      modeler.CreateBodiesFromSheets2(new Body2[] { startBall, swept, endBall }, (int)swSheetSewingOption_e.swSewToSolid, double.Epsilon, ref error);


      I get null a lot of times, with the error being either swSewingIncomplete or swBadArgument. The docs don't say which cases result in success, or how these error types are triggered.


      Does anybody have examples of these functions being used in different scenarios?