/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { EdgeLoop_goo eLoop = null; int flag = -1; bool pin = false; DA.GetData(0, ref eLoop); DA.GetData(1, ref flag); DA.GetData(2, ref pin); EdgeConstraint_goo edgeConstraint = new EdgeConstraint_goo(); edgeConstraint.crv = eLoop.Value.ToCurve(eLoop.Value.Mesh); edgeConstraint.vertices = eLoop.Value.Vertices; edgeConstraint.edges = eLoop.Value.Edges; edgeConstraint.edgeType = EdgeConstraint_goo.EdgeType.Loop; edgeConstraint.constraint = new EdgeConstraint((EdgeRefineFlags)flag, new DCurveProjectionTarget(edgeConstraint.crv)); edgeConstraint.PinVerts = pin; DA.SetData(0, edgeConstraint); }
protected override void SolveInstance(IGH_DataAccess DA) { this.Message = Type.ToString(); DMesh3_goo goo = null; EdgeLoop_goo loop_goo = null; double eLen = 1; DA.GetData(0, ref goo); DA.GetData(1, ref loop_goo); DA.GetData(2, ref eLen); DMesh3 msh = new DMesh3(goo.Value); EdgeLoop loop = new EdgeLoop(loop_goo.Value); DMesh3 outMesh; switch (Type) { case HoleFillerType.Planar: outMesh = HoleFillMethods.PlanarFill(msh, loop, eLen); break; case HoleFillerType.Smooth: outMesh = HoleFillMethods.SmoothFill(msh, loop, eLen); break; case HoleFillerType.Minimal: outMesh = HoleFillMethods.MinimalFill(msh, loop, eLen); break; default: outMesh = HoleFillMethods.PlanarFill(msh, loop, eLen); break; } DA.SetData(0, outMesh); }