public PlanarMesher(List<String> tErrorContainer, WingedMesh tWingMesh, Mesh tRhinoMesh, int tNumPanels, int metric, GH_PreviewUtil tPreview) { errorContainer = tErrorContainer; wingMesh = tWingMesh; rhinoMesh = tRhinoMesh; numPanels = tNumPanels; currentPartition = new Partition(wingMesh.faces.Count, this); preview = tPreview; metricRef = metric; }
public Proxy(int tIndex, Point3d tPosition, Vector3f tNormal, int tSeedFaceOIndex, int numFacesInMesh, Partition tPartition)//proxy created from initial seed { index = tIndex; rhinoPlane = new Plane(tPosition, tNormal); rhinoPlane.Normal.Unitize(); origin = tPosition; seedFaceOIndex = tSeedFaceOIndex; hasBeenPoppedInToThis = new bool[numFacesInMesh]; UsefulFunctions.setAllArrayTo(false,hasBeenPoppedInToThis); hasBeenPoppedInToThis[seedFaceOIndex] = true; //set seed to popped assignedFaces = new List<int>(); assignedFaces.Add(seedFaceOIndex);//add this first face partition = tPartition; if (partition.controller.metricRef == 0) { partition.addToQueueInOrder(new PoppedFaceInfo(errorMetricEuclidean(seedFaceOIndex), seedFaceOIndex, index)); } else { partition.addToQueueInOrder(new PoppedFaceInfo(errorMetric21(seedFaceOIndex), seedFaceOIndex, index)); } }