/***************************************************/ private static void SetGeneratorEyes(ref TheatronGeometry theatronGeom) { for (int i = 0; i < theatronGeom.TotalTiers; i++) { for (int j = 0; j < theatronGeom.Tiers3d[i].Generatorblocks.Count; j++) { var block = theatronGeom.Tiers3d[i].Generatorblocks[j]; SetEyesBasic(ref block); } } }
/***************************************************/ /**** Private Methods ****/ /***************************************************/ private static TheatronGeometry CreateGeometry(TheatronPlan plan, TheatronFullProfile profile, List <ProfileParameters> pParams, StadiaType stadiaType) { var theatron = new TheatronGeometry(); theatron.TotalTiers = profile.MappedProfiles.Count; SetGeneratorblocks(ref theatron, profile, plan, stadiaType, pParams); SetFloorMeshes(ref theatron, pParams); SetGeneratorEyes(ref theatron); return(theatron); }
/***************************************************/ private static void SetFloorMeshes(ref TheatronGeometry theatron, List <ProfileParameters> parameters) { for (int i = 0; i < theatron.TotalTiers; i++) { for (int j = 0; j < theatron.Tiers3d[i].Generatorblocks.Count; j++) { SeatingBlockType bt = theatron.Tiers3d[i].Generatorblocks[j].TypeOfSeatingBlock; var block = theatron.Tiers3d[i].Generatorblocks[j]; if (bt == SeatingBlockType.Side || bt == SeatingBlockType.Corner || bt == SeatingBlockType.End || bt == SeatingBlockType.Undefined) { SetBlockFloor(ref block, parameters[i]); } else { SetBlockFloorBasic(ref block); } } } }
/***************************************************/ private static void SetOtherBlockTypes(ref TheatronGeometry theatronGeom, int tierNum, TheatronFullProfile fullprofile) { ////no Vomitory corner block var corner = theatronGeom.Tiers3d[tierNum].Generatorblocks.Find(x => x.TypeOfSeatingBlock == SeatingBlockType.Corner); var cornerNoVom = corner.DeepClone(); cornerNoVom.TypeOfSeatingBlock = SeatingBlockType.CornerNoVom; theatronGeom.Tiers3d[tierNum].Generatorblocks.Add(cornerNoVom); //// transition 1 block var toMirror = theatronGeom.Tiers3d[tierNum].Generatorblocks.Find(x => x.TypeOfSeatingBlock == SeatingBlockType.Transition1); var transMirror1 = Create.MirrorSeatingBlock(toMirror, SeatingBlockType.Transition1mirrored); theatronGeom.Tiers3d[tierNum].Generatorblocks.Add(transMirror1); //// transition 2 block toMirror = theatronGeom.Tiers3d[tierNum].Generatorblocks.Find(x => x.TypeOfSeatingBlock == SeatingBlockType.Transition2); var transMirror2 = Create.MirrorSeatingBlock(toMirror, SeatingBlockType.Transition2mirrored); theatronGeom.Tiers3d[tierNum].Generatorblocks.Add(transMirror2); }
/***************************************************/ private static void CopyGeneratorBlocks(ref TheatronGeometry theatron, TheatronPlan bp, StadiaType stadiatype) { for (int i = 0; i < theatron.TotalTiers; i++) { BayType current, next; int cornerCount = -1; for (int j = 0; j < bp.SectionOrigins.Count; j++) { current = bp.StructBayType[j]; if (j == bp.SectionOrigins.Count - 1) { next = bp.StructBayType[0]; } else { next = bp.StructBayType[j + 1]; } if (stadiatype == StadiaType.NoCorners && current != next) { continue; //no corner bowl corner position } SeatingBlockType bt = DetermineBlockToCopy(current, next, stadiatype, cornerCount); if (current == BayType.Corner) { cornerCount++; } else { cornerCount = -1; } SeatingBlock blockToCopy = theatron.Tiers3d[i].Generatorblocks.Find(b => b.TypeOfSeatingBlock == bt).DeepClone(); double angle = Geometry.Query.Angle(blockToCopy.Start.Direction, bp.SectionOrigins[j].Direction, Plane.XY); SeatingBlock copy = TransformSeatingBlock(blockToCopy, blockToCopy.Start.Origin, bp.SectionOrigins[j].Origin, angle); theatron.Tiers3d[i].TierBlocks.Add(copy); theatron.Audience.Add(copy.Audience); } } }
/***************************************************/ private static void SetGeneratorblocks(ref TheatronGeometry theatronGeom, TheatronFullProfile fullprofile, TheatronPlan theatronPlan, StadiaType stadiatype, List <ProfileParameters> profileParameters) { //this defines the geometry of the seating blocks from which all others are created TierProfile tierToMap; for (int i = 0; i < theatronGeom.TotalTiers; i++) { tierToMap = fullprofile.BaseTierProfiles[i]; theatronGeom.Tiers3d.Add(new Tier()); var SectionBlock = GetBlockStartIndexes(theatronPlan, stadiatype); foreach (var pair in SectionBlock) { int index = pair.Key; SeatingBlockType blockType = pair.Value; var block = SeatingBlock(theatronPlan.SectionOrigins[index], theatronPlan.VomitoryOrigins[index], theatronPlan.SectionOrigins[index + 1], blockType, profileParameters[i].SeatWidth, profileParameters[i].VomitoryParameters.VomitoryWidth); theatronGeom.Tiers3d[i].Generatorblocks.Add(block); if (block.TypeOfSeatingBlock == SeatingBlockType.Transition1 || block.TypeOfSeatingBlock == SeatingBlockType.Transition2) { //cannot use vomitory location to define profile scaling SetTransitionProfiles(ref block, tierToMap, fullprofile.FullProfileOrigin, theatronPlan.VomitoryOrigins[index - 1], theatronPlan.VomitoryOrigins[index + 1]); } else { SetBlockProfiles(ref block, tierToMap, fullprofile.FullProfileOrigin); } } if (stadiatype == StadiaType.EightArc || stadiatype == StadiaType.Orthogonal) { SetOtherBlockTypes(ref theatronGeom, i, fullprofile);//only needed for radial and othogonal } } }
public void EValueAnanlysisTest(TheatronGeometry bowl, ActivityArea activityArea) { var settings = BH.Engine.Humans.ViewQuality.Create.EvalueSettings(EvalueViewEnum.ToPoint); var results = BH.Engine.Humans.ViewQuality.Query.EvalueAnalysis(bowl.Audience, settings, activityArea); }
public void CValueAnanlysisTest(TheatronGeometry bowl, ActivityArea activityArea) { var settings = BH.Engine.Humans.ViewQuality.Create.CvalueSettings(CvalueFocalMethodEnum.Perpendicular); var results = BH.Engine.Humans.ViewQuality.Query.CvalueAnalysis(bowl.Audience, settings, activityArea.PlayingArea); }
public void AValueAnalysisTest(TheatronGeometry bowl, ActivityArea activityArea) { var settings = BH.Engine.Humans.ViewQuality.Create.AvalueSettings(ViewConeEnum.DynamicConeArea, true); var results = BH.Engine.Humans.ViewQuality.Query.AvalueAnalysis(bowl.Tiers3d[0].TierBlocks[0].Audience, settings, activityArea); }
public void TestAnalysis(TheatronGeometry theatronGeometry, ActivityArea activityArea) { AValueAnalysisTest(theatronGeometry, activityArea); CValueAnanlysisTest(theatronGeometry, activityArea); EValueAnanlysisTest(theatronGeometry, activityArea); }