/// <summary> /// Constructor for user input programs. /// </summary> /// <param name="quota">User input quota. A value of 0 means program will be maximized.</param> /// <param name="access">Direction program is accessed from. (NESW)</param> /// <param name="isPrivate">Is the program enclosed?</param> /// <param name="extents">Rectangular bounds of program occupation. Does not include circulation for access.</param> /// <param name="geo">2D curve information used for drawing.</param> public ProgramPackage(int quota, string access, bool isPrivate, Curve extents, List <Curve> geo) { var rectInfo = new CurveBounds(extents); Quota = quota; AccessDirections = access; IsPrivate = isPrivate; OccupationBoundary = extents; OccupationArea = rectInfo.Area; DrawingGeometry = geo; Dims = rectInfo; BasePlane = new Plane(new Point3d(rectInfo.XMin, rectInfo.YMax, 0), new Vector3d(1, 0, 0), new Vector3d(0, 1, 0)); }
/// <summary> /// Basic constructor for instances where other parameters are added using Update.Room methods. /// </summary> /// <param name="region">Planar 2D Brep representation of floor area for room.</param> /// <param name="numPrograms">Number of programs in manifest.</param> public RoomPackage(Brep region, int numPrograms) { Region = region; RegionPerimeter = Utils.GetRegionPerimeter(region); AllEdgeCurves = new List <Curve>(Curve.JoinCurves(region.Curves3D)); NumProgramsPlaced = new List <int>(); for (int i = 0; i < numPrograms; i++) { NumProgramsPlaced.Add(0); } Dims = new CurveBounds(Utils.GetBoundingBoxCurve(region)); }