/// <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) { DroidPaths dPath = new DroidPaths(); DroidParameters dPara = new DroidParameters(); List <string> head = new List <string>(); List <string> foot = new List <string>(); if (!DA.GetData(0, ref dPath)) { return; } if (!DA.GetData(1, ref dPara)) { return; } if (!DA.GetDataList(2, head)) { return; } if (!DA.GetDataList(3, foot)) { return; } List <string> gcode = new List <string>(); List <string> info = new List <string>(); DroidGCode output = new DroidGCode(dPath.printList); gcode = output.Execute(dPara, head, foot); info = output.Info(dPara); DA.SetDataList(0, gcode); DA.SetDataList(1, info); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object can be used to retrieve data from input parameters and /// to store data in output parameters.</param> protected override void SolveInstance(IGH_DataAccess DA) { // Inputs List <Mesh> dSlice = new List <Mesh>(); DroidVolume vol = null; DroidParameters para = null; if (!DA.GetDataList(0, dSlice)) { return; } if (!DA.GetData(1, ref para)) { return; } if (!DA.GetData(2, ref vol)) { return; } // Initialise Polylines[] brimSkirtPaths; Polylines[] contourPaths; Polylines[] shellPaths; List <Polylines[]> fillCapPaths; DroidMesh dMesh; foreach (Mesh x in dSlice) { if (x == null) { return; } } dMesh = new DroidMesh(); dMesh.AssignParameters(para.layerHeight, para.scale, para.nozzle); contourPaths = dMesh.Contour(dSlice); shellPaths = dMesh.Offset(para.shellNumber); brimSkirtPaths = dMesh.BrimSkirt(para.brimSkirtInt, para.brimSkirt); fillCapPaths = dMesh.DroidBoolPaths(para.infillPercent, para.capTopThickness, para.capBotThickness, para.shellNumber); // Initialising Wrapper DroidPaths myDroid = new DroidPaths(contourPaths, shellPaths, fillCapPaths[0], brimSkirtPaths, fillCapPaths[1]); // Output DA.SetData(0, myDroid); DA.SetDataList(1, myDroid.wrapperList[1]); DA.SetDataList(2, myDroid.wrapperList[2]); DA.SetDataList(3, myDroid.wrapperList[3]); DA.SetDataList(4, myDroid.wrapperList[0]); DA.SetDataList(5, myDroid.wrapperList[4]); }
/// <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) { DroidPaths dPath = new DroidPaths(); if (!DA.GetData(0, ref dPath)) { return; } List <Polyline> polylineList = new List <Polyline>(); polylineList = dPath.printList; DA.SetDataList(0, polylineList); }
/// <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) { List <Curve> contour = new List <Curve>(); bool sort = new bool(); DroidVolume dv = new DroidVolume(); if (!DA.GetDataList(0, contour)) { return; } if (!DA.GetData(1, ref sort)) { return; } if (!DA.GetData(2, ref dv)) { return; } DroidPaths myDroid = new DroidPaths(contour, sort, dv); DA.SetData(0, myDroid); }