Beispiel #1
0
        /***************************************************/

        private static SeatingBlock MirrorSeatingBlock(SeatingBlock original, SeatingBlockType stype)
        {
            SeatingBlock mirrored = original.DeepClone();

            mirrored.TypeOfSeatingBlock = stype;
            List <TierProfile> mirroredProfiles = new List <TierProfile>();

            //mirror the origins
            mirrored.Start.Origin.Y       = -mirrored.Start.Origin.Y;
            mirrored.Start.Direction.Y    = -mirrored.Start.Direction.Y;
            mirrored.Vomitory.Origin.Y    = -mirrored.Vomitory.Origin.Y;
            mirrored.Vomitory.Direction.Y = -mirrored.Vomitory.Direction.Y;
            mirrored.End.Origin.Y         = -mirrored.End.Origin.Y;
            mirrored.End.Direction.Y      = -mirrored.End.Direction.Y;
            //mirror the points and profile
            foreach (TierProfile profile in mirrored.Sections)
            {
                var mirroredprofile = MirrorTierYZ(profile);
                mirroredProfiles.Add(mirroredprofile);
            }
            //reverse the sections list
            mirroredProfiles.Reverse();
            mirrored.Sections = mirroredProfiles;
            //flip the start and end
            var tempstart = mirrored.Start.DeepClone();
            var tempend   = mirrored.End.DeepClone();

            mirrored.Start = tempend;
            mirrored.End   = tempstart;
            return(mirrored);
        }
Beispiel #2
0
        /***************************************************/

        private static SeatingBlock TransformSeatingBlock(SeatingBlock originalBlock, Point source, Point target, double angle)
        {
            SeatingBlock transformedBlock = originalBlock.DeepClone();

            var xRotate = Geometry.Create.RotationMatrix(source, Vector.ZAxis, angle);
            var xTrans  = Geometry.Create.TranslationMatrix(target - source);

            TransformBlock(ref transformedBlock, xRotate);
            TransformBlock(ref transformedBlock, xTrans);
            return(transformedBlock);
        }