/// <summary>
 /// Initializes a new instance of the <see cref="BordeoLPanel"/> class.
 /// </summary>
 /// <param name="direction">The panel direction.</param>
 /// <param name="start">The panel start point.</param>
 /// <param name="end">The end point direction.</param>
 /// <param name="size">The panel size.</param>
 /// <param name="code">The panel code.</param>
 public BordeoLPanel(SweepDirection rotation, Point3d start, Point3d end, LPanelMeasure size, String code)
     : base(BordeoUtils.GetRivieraCode(code), size, start)
 {
     this.Rotation  = rotation;
     this.Direction = start.ToPoint2d().GetVectorTo(end.ToPoint2d());
     this.Rotation  = rotation;
     this.Regen();
 }
        /// <summary>
        /// Gets the type of the block to insert.
        /// </summary>
        /// <returns>The block to insert</returns>
        private LBlockType GetBlockType()
        {
            LPanelMeasure size      = this.PanelSize;
            LBlockType    blockType = LBlockType.NONE;

            if (this.Rotation == SweepDirection.Clockwise)
            {
                if (size.FrenteStart == size.FrenteEnd)
                {
                    blockType = LBlockType.RIGHT_SAME_SIZE;
                }
                else if (size.FrenteStart > size.FrenteEnd)
                {
                    blockType = LBlockType.RIGHT_START_MAX_SIZE;
                }
                else
                {
                    blockType = LBlockType.RIGHT_START_MIN_SIZE;
                }
            }
            else
            {
                if (size.FrenteStart == size.FrenteEnd)
                {
                    blockType = LBlockType.LEFT_SAME_SIZE;
                }
                else if (size.FrenteStart > size.FrenteEnd)
                {
                    blockType = LBlockType.LEFT_START_MAX_SIZE;
                }
                else
                {
                    blockType = LBlockType.LEFT_START_MIN_SIZE;
                }
            }
            return(blockType);
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BordeoLPanel"/> class.
 /// </summary>
 /// <param name="direction">The panel direction.</param>
 /// <param name="start">The panel start point.</param>
 /// <param name="end">The end point direction.</param>
 /// <param name="size">The panel size.</param>
 public BordeoL90Panel(SweepDirection direction, Point3d start, Point3d end, LPanelMeasure size)
     : base(direction, start, end, size, CODE_PANEL_90)
 {
 }