private Isothetic BakeIso(List <IsoBlock> blocks) { List <Point3d> isoVertex = new List <Point3d>(); IsoBlock firstBlock = blocks.First(); for (int i = 0; i < blocks.Count; i++) { IsoBlock tempBlock = blocks[i]; Point3d basePt = tempBlock.BasePt; Vector3d widthVec = tempBlock.WidthLine.UnitTangent; Vector3d heightVec = tempBlock.HeightLine.UnitTangent; if (i == 0) { isoVertex.Add(basePt); //add corner1 } Point3d corner2 = basePt + widthVec * tempBlock.Width; Point3d corner3 = corner2 + heightVec * tempBlock.Height; isoVertex.Add(corner2); isoVertex.Add(corner3); if (i == blocks.Count - 1) { isoVertex.Add(basePt + heightVec * tempBlock.Height); //add corner4 isoVertex.Add(isoVertex.First()); } } Polyline bakedOutline = new Polyline(isoVertex); PolylineTools.AlignCCW(bakedOutline); return(new Isothetic(bakedOutline, firstBlock.BasePt, firstBlock.WidthLine, firstBlock.HeightLine)); }
//sub private void RefineBoundary() { PolylineTools.AlignCCW(boundary); PolylineTools.RemoveOnStraightPt(boundary, 0.005); }