/// <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) { // Declare a variable for the input String Topologic.CellComplex cellComplex = null; // Use the DA object to retrieve the data inside the first input parameter. // If the retieval fails (for example if there is no data) we need to abort. if (!DA.GetData(0, ref cellComplex)) { return; } // If the retrieved data is Nothing, we need to abort. // We're also going to abort on a zero-length String. if (cellComplex == null) { return; } //if (data.Length == 0) { return; } // Convert the String to a character array. //char[] chars = data.ToCharArray(); IList <Topologic.Face> faces = cellComplex.NonManifoldFaces; // Use the DA object to assign a new String to the first output parameter. DA.SetDataList(0, faces); }
/// <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) { // Declare a variable for the input String List <Topologic.Face> faces = new List <Topologic.Face>(); double tolerance = 0.0001; // Use the DA object to retrieve the data inside the first input parameter. // If the retieval fails (for example if there is no data) we need to abort. if (!DA.GetDataList(0, faces)) { return; } if (!DA.GetData(1, ref tolerance)) { return; } // If the retrieved data is Nothing, we need to abort. // We're also going to abort on a zero-length String. if (faces == null) { return; } //if (endVertex == null) { return; } //if (data.Length == 0) { return; } // Convert the String to a character array. //char[] chars = data.ToCharArray(); Topologic.CellComplex cellComplex = Topologic.CellComplex.ByFaces(faces, tolerance); // Use the DA object to assign a new String to the first output parameter. DA.SetData(0, cellComplex); }