Example #1
0
        public void TestPanelInsert()
        {
            Point3d p0, pf;

            if (Picker.Point("Selecciona el punto inicial", out p0) &&
                Picker.Point("Selecciona el punto final", p0, out pf))
            {
                App.Riviera.Is3DEnabled = true;
                new QuickTransactionWrapper((Document doc, Transaction tr) =>
                {
                    RivieraSize frente = new RivieraSize()
                    {
                        Measure = KEY_FRONT, Nominal = 18, Real = 18 * 0.0254d
                    },
                    alto1 = new RivieraSize()
                    {
                        Measure = KEY_HEIGHT, Nominal = 27, Real = 27 * 0.0254d
                    },
                    alto2 = new RivieraSize()
                    {
                        Measure = KEY_HEIGHT, Nominal = 15, Real = 15 * 0.0254d
                    };
                    PanelMeasure panel     = new PanelMeasure(frente, alto1),
                    panel2                 = new PanelMeasure(frente, alto2);
                    BordeoPanelStack stack = new BordeoPanelStack(p0, pf, panel);
                    stack.AddPanel(panel2);
                    stack.Draw(tr);
                }).Run();
            }
        }
 /// <summary>
 /// Gets the end point.
 /// </summary>
 /// <param name="geometry">The end point of the geometry.</param>
 /// <returns>The end point of the geometry</returns>
 public static Point2d GetEndPoint(this Line geometry, PanelMeasure size)
 {
     Point2d start = geometry.StartPoint.ToPoint2d(),
         end = geometry.EndPoint.ToPoint2d();
     Double angle = start.GetVectorTo(end).Angle;
     Double distance = size.Frente.Real;
     return start.ToPoint2dByPolar(distance, angle);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BordeoPanel"/> class.
 /// </summary>
 /// <param name="start">The start.</param>
 /// <param name="end">The end.</param>
 /// <param name="measure">The measure.</param>
 public BordeoPanel(Point3d start, Point3d end, PanelMeasure measure) :
     base(BordeoUtils.GetRivieraCode(CODE_PANEL_RECTO), measure, start)
 {
     this.Direction = start.ToPoint2d().GetVectorTo(end.ToPoint2d());
     this.Regen();
 }