public PolyBuilder( PolyHydraEnums.ShapeTypes shapeType, PolyTypes polyType, PolyHydraEnums.JohnsonPolyTypes johnsonPolyType, PolyHydraEnums.GridTypes gridType, PolyHydraEnums.GridShapes gridShape, PolyHydraEnums.OtherPolyTypes otherPolyType ) { ShapeType = shapeType; PolyType = polyType; JohnsonPolyType = johnsonPolyType; GridType = gridType; GridShape = gridShape; OtherPolyType = otherPolyType; }
public static ConwayPoly MakeGrid(PolyHydraEnums.GridTypes gridType, PolyHydraEnums.GridShapes gridShape, int p, int q, bool weld = true) { ConwayPoly conway = null; switch (gridType) { case PolyHydraEnums.GridTypes.Square: conway = MakeUnitileGrid(1, (int)gridShape, p, q); break; case PolyHydraEnums.GridTypes.Isometric: conway = MakeUnitileGrid(2, (int)gridShape, p, q); break; case PolyHydraEnums.GridTypes.Hex: conway = MakeUnitileGrid(3, (int)gridShape, p, q); break; case PolyHydraEnums.GridTypes.U_3_6_3_6: conway = MakeUnitileGrid(4, (int)gridShape, p, q); break; case PolyHydraEnums.GridTypes.U_3_3_3_4_4: conway = MakeUnitileGrid(5, (int)gridShape, p, q); break; case PolyHydraEnums.GridTypes.U_3_3_4_3_4: conway = MakeUnitileGrid(6, (int)gridShape, p, q); break; // case GridTypes.U_3_3_3_3_6: // conway = MakeUnitileGrid(7, (int)gridShape, p, q); // break; case PolyHydraEnums.GridTypes.U_3_12_12: conway = MakeUnitileGrid(8, (int)gridShape, p, q); break; case PolyHydraEnums.GridTypes.U_4_8_8: conway = MakeUnitileGrid(9, (int)gridShape, p, q); break; case PolyHydraEnums.GridTypes.U_3_4_6_4: conway = MakeUnitileGrid(10, (int)gridShape, p, q); break; case PolyHydraEnums.GridTypes.U_4_6_12: conway = MakeUnitileGrid(11, (int)gridShape, p, q); break; case PolyHydraEnums.GridTypes.Polar: conway = MakePolarGrid(p, q); break; } // Welding only seems to work reliably on simpler shapes if (weld && gridShape != PolyHydraEnums.GridShapes.Plane) { conway = conway.Weld(0.001f); } return(conway); }