<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Draw line with angle &amp;amp;&amp;amp; Continue line with another angle(); .Net in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659367#M28381</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2144608"&gt;@Juergen_Becker&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please use System.Math.PI instead of 3.1415926535897931.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Jürgen&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's the value of Math.PI.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jan 2018 20:55:55 GMT</pubDate>
    <dc:creator>ActivistInvestor</dc:creator>
    <dc:date>2018-01-02T20:55:55Z</dc:date>
    <item>
      <title>Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659235#M28377</link>
      <description>&lt;P&gt;I want to draw a line which starts from user insertion point with an angle (180 deg) of length x,&lt;/P&gt;&lt;P&gt;and wanted to draw another lines on both the end points vertical down with an angle (270 deg ) of length x on both sides&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help me whats gone wrong with my code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance ;;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;double angle = 180;&lt;BR /&gt;double length = 50;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;double angle1 = 270;&lt;BR /&gt;double length1 = 10;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;BlockTable bt = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;&lt;BR /&gt;BlockTableRecord btr = tr.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;&lt;BR /&gt;PromptPointOptions ppo = new PromptPointOptions("Please Specify the Point");&lt;/P&gt;&lt;P&gt;PromptPointResult ppr = ed.GetPoint(ppo);&lt;/P&gt;&lt;P&gt;if (ppr.Status != PromptStatus.OK)&lt;BR /&gt;return;&lt;/P&gt;&lt;P&gt;Point3d startPt = ppr.Value;&lt;/P&gt;&lt;P&gt;Point3d endPt = new Point3d(startPt.X + Math.Cos(angle) * length, startPt.Y + Math.Sin(angle) * length, 0);&lt;/P&gt;&lt;P&gt;Line l1 = new Line(startPt, endPt);&lt;/P&gt;&lt;P&gt;btr.AppendEntity(l1);&lt;BR /&gt;tr.AddNewlyCreatedDBObject(l1, true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Secondline&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Point3d endPt2 = new Point3d(endPt.X + Math.Cos(angle1) * length1, endPt.Y + Math.Sin(angle1) * length1, 0);&lt;/P&gt;&lt;P&gt;Line l2 = new Line(endPt, endPt2);&lt;/P&gt;&lt;P&gt;btr.AppendEntity(l2);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//Thirdline&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Point3d endPt3 = new Point3d(endPt.X + Math.Cos(&lt;SPAN&gt;angle1&lt;/SPAN&gt;) *&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;length1&amp;nbsp;&lt;/SPAN&gt;, endPt.Y + Math.Sin(&lt;SPAN&gt;angle1&lt;/SPAN&gt;) *&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;length1&amp;nbsp;&lt;/SPAN&gt;, 0);&lt;/P&gt;&lt;P&gt;Line l3 = new Line(startPt, endPt3);&lt;/P&gt;&lt;P&gt;btr.AppendEntity(l3);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;tr.Commit();&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 19:48:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659235#M28377</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-02T19:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659252#M28378</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in all the languages (Visual Lisp, .Net etc.) you have to use angle in radians (PI) not in decimal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;180° = 1PI&lt;/P&gt;&lt;P&gt;90 = 1/2 PI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please try that before other problems has to be resolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        public static double RadAngle(double doubleAngle)
        {
            return doubleAngle * System.Math.PI / 180;
        }&lt;/PRE&gt;&lt;PRE&gt;        public static double DecAngle(double RadAngle)
        {
            return RadAngle * 180 / System.Math.PI;
        }&lt;/PRE&gt;&lt;P&gt;Use above Code to convert from one to another.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Jürgen&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 20:10:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659252#M28378</guid>
      <dc:creator>Juergen_Becker</dc:creator>
      <dc:date>2018-01-02T20:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659343#M28379</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;I want to draw a line which starts from user insertion point with an angle (180 deg) of length x,&lt;/P&gt;&lt;P&gt;and wanted to draw another lines on both the end points vertical down with an angle (270 deg ) of length x on both sides&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help me whats gone wrong with my code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Using the extension methods included below,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   double angle = 180;
   double length = 50;

   double angle1 = 270;
   double length1 = 10;

   Point3d startPt = ppr.Value;

   Point3d endPt = startPt.To(angle.ToRadians(), length);

   //Secondline

   Point3d endPt2 = startPt.To(angle1.ToRadians(), length1);

   //Thirdline

   Point3d endPt3 = endPt.To(angle1.ToRadians(), length1);

&lt;/PRE&gt;&lt;P&gt;Extension methods for converting from angle/radians and computing polar coordinates:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;using System;
using Autodesk.AutoCAD.Geometry;

namespace Autodesk.AutoCAD.Geometry
{
   public static class MyGeometryExtensions
   {
      /// &amp;lt;summary&amp;gt;
      /// Converts a double representing an angle in radians to degrees
      /// &amp;lt;/summary&amp;gt;
      /// &amp;lt;param name="radians"&amp;gt;The angle in radians&amp;lt;/param&amp;gt;
      /// &amp;lt;returns&amp;gt;The angle in degrees&amp;lt;/returns&amp;gt;

      public static double ToDegrees(this double radians)
      {
         return ((radians / 3.1415926535897931) * 180.0);
      }

      /// &amp;lt;summary&amp;gt;
      /// Converts a double representing an angle in degrees to radians
      /// &amp;lt;/summary&amp;gt;
      /// &amp;lt;param name="degrees"&amp;gt;The angle in degrees&amp;lt;/param&amp;gt;
      /// &amp;lt;returns&amp;gt;The angle in radians&amp;lt;/returns&amp;gt;

      public static double ToRadians(this double degrees)
      {
         return ((degrees / 180.0) * 3.1415926535897931);
      }

      /// &amp;lt;summary&amp;gt;
      /// 2D Polar coordinate specificiation (basepoint/angle/distance)
      /// &amp;lt;/summary&amp;gt;
      /// &amp;lt;param name="basepoint"&amp;gt;The basepoint from which the resulting point is computed&amp;lt;/param&amp;gt;
      /// &amp;lt;param name="AngleInXYPlane"&amp;gt;The direction (in radians) to the resulting point&amp;lt;/param&amp;gt;
      /// &amp;lt;param name="distance"&amp;gt;The distance to the resulting point&amp;lt;/param&amp;gt;
      /// &amp;lt;returns&amp;gt;The point at the given distance and direction from the base point&amp;lt;/returns&amp;gt;

      public static Point3d To(this Point3d basepoint, double angleInXYPlane, double distance)
      {
         return new Point3d(
            basepoint.X + (distance * Math.Cos(angleInXYPlane)),
            basepoint.Y + (distance * Math.Sin(angleInXYPlane)),
            basepoint.Z);
      }

   }

}&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 20:53:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659343#M28379</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-01-02T20:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659352#M28380</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please use System.Math.PI instead of 3.1415926535897931.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Jürgen&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 20:49:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659352#M28380</guid>
      <dc:creator>Juergen_Becker</dc:creator>
      <dc:date>2018-01-02T20:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659367#M28381</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2144608"&gt;@Juergen_Becker&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please use System.Math.PI instead of 3.1415926535897931.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Jürgen&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's the value of Math.PI.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 20:55:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659367#M28381</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-01-02T20:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659384#M28382</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have to contradict that because the number pi does not end &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;otherwise the result will be inaccurate.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="g-section"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="g-unit"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&lt;SPAN&gt;&lt;SPAN&gt;That's important when big coordinates are used.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&lt;SPAN&gt;&lt;SPAN&gt;Regards Jürgen&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Jan 2018 21:08:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659384#M28382</guid>
      <dc:creator>Juergen_Becker</dc:creator>
      <dc:date>2018-01-02T21:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659449#M28383</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Juergen_Becker a écrit&amp;nbsp;:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have to contradict that because the number pi does not end &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;otherwise the result will be inaccurate.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="g-section"&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV class="g-unit"&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV class="trans-verified-button-large"&gt;&lt;SPAN&gt;&lt;SPAN&gt;That's important when big coordinates are used.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="trans-verified-button-large"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="trans-verified-button-large"&gt;&lt;SPAN&gt;&lt;SPAN&gt;Regards Jürgen&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Did you just try something like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Console.WriteLine("{0:R}",Math.PI);&lt;/PRE&gt;
&lt;P&gt;or like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Console.WriteLine(Math.PI == 3.1415926535897930);
Console.WriteLine(Math.PI == 3.1415926535897931);
Console.WriteLine(Math.PI == 3.1415926535897932);&lt;/PRE&gt;
&lt;P&gt;You should learn a little about &lt;A href="https://msdn.microsoft.com/en-us/library/system.double(v=vs.110).aspx" target="_blank"&gt;double-precision floating-point&lt;/A&gt; before asserting things about System.Math.PI accuracy.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2018 21:44:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659449#M28383</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-01-02T21:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659802#M28384</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2144608"&gt;@Juergen_Becker&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have to contradict that because the number pi does not end &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;otherwise the result will be inaccurate.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="g-section"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="g-unit"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&lt;SPAN&gt;&lt;SPAN&gt;That's important when big coordinates are used.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&lt;SPAN&gt;&lt;SPAN&gt;Regards Jürgen&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I think you're mistaken.&amp;nbsp; Math.PI is a &lt;EM&gt;const&lt;/EM&gt;, not a function or a number of infinite resolution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The compiler replaces references to a const with the value it is defined to, so the compiled code does not contain "Math.PI", it contains the value shown below, that PI is defined to by the System.Math class:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   // Portion of the System.Math class as rendered by ILSpy:
&lt;BR /&gt;namespace System&lt;BR /&gt;{&lt;BR /&gt;   public static class Math
   {
      private static double doubleRoundLimit = 1E+16;

      private const int maxRoundingDigits = 15;

      /// &amp;lt;summary&amp;gt;Represents the ratio of the circumference of a circle to its diameter, specified by the constant, PI.&amp;lt;/summary&amp;gt;&lt;BR /&gt;
      [__DynamicallyInvokable]
      &lt;FONT color="#FF0000"&gt;public const double PI = 3.1415926535897931;&lt;/FONT&gt;


      //// &amp;lt;&amp;lt;&amp;lt;remainder of Math class omitted&amp;gt;&amp;gt;&amp;gt;
      
   }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 02:42:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7659802#M28384</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-01-03T02:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7660314#M28385</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know what double is. Y&lt;SPAN&gt;&lt;SPAN&gt;ou do not have to teach me.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="g-section"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="g-unit"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&lt;SPAN&gt;&lt;SPAN&gt;Nevertheless, use Math.PI.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&lt;SPAN&gt;&lt;SPAN&gt;Regards Jürgen&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 09:39:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7660314#M28385</guid>
      <dc:creator>Juergen_Becker</dc:creator>
      <dc:date>2018-01-03T09:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7661221#M28386</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2144608"&gt;@Juergen_Becker&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know what double is. Y&lt;SPAN&gt;&lt;SPAN&gt;ou do not have to teach me.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="g-section"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="g-unit"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&lt;SPAN&gt;&lt;SPAN&gt;Nevertheless, use Math.PI.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="trans-verified-button-large"&gt;&lt;SPAN&gt;&lt;SPAN&gt;Regards Jürgen&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You obviously do not know what a &lt;A href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/const" target="_blank"&gt;&lt;FONT color="#FF0000"&gt;const&lt;/FONT&gt; &lt;/A&gt;is, because you mistakenly believe that the use of 'Math.PI' results in a more-precise value than the literal value that I used in the code I posted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, let me say this to you again one more time: Math.PI is a &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;const&lt;/STRONG&gt; &lt;/FONT&gt;defined by the Math class, and its defined value is &lt;STRONG&gt;3.1415926535897931&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We will use whatever we care to use, as long as it is correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 15:48:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7661221#M28386</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-01-03T15:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7662157#M28387</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also know what a const is.&lt;/P&gt;&lt;P&gt;What I want to say is that you better use System.Math.PI because&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. You don't have to declare your own PI&lt;/P&gt;&lt;P&gt;2. You can't do any mistakes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What about this?&lt;/P&gt;&lt;PRE&gt;        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            decimal m_PI = 0;
            m_PI = PI();

            Application.Run(new Form1());
        }

        static decimal PI()
        {
            return PI(1) * 2;
        }

        static decimal PI(int i)
        {
            if (i &amp;gt; 60)
            {
                return i;
            }
            else
            {
                return 1 + (i / (1 + (2.0m * i))) * PI(i + 1) ;
            }
        }&lt;/PRE&gt;&lt;P&gt;This Little Code return PI as a decimal with much more precision.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Jürgen&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 20:31:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7662157#M28387</guid>
      <dc:creator>Juergen_Becker</dc:creator>
      <dc:date>2018-01-03T20:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7662430#M28388</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Juergen_Becker a écrit&amp;nbsp;:&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;What about this?&lt;/P&gt;
&lt;PRE&gt;        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            decimal m_PI = 0;
            m_PI = PI();

            Application.Run(new Form1());
        }

        static decimal PI()
        {
            return PI(1) * 2;
        }

        static decimal PI(int i)
        {
            if (i &amp;gt; 60)
            {
                return i;
            }
            else
            {
                return 1 + (i / (1 + (2.0m * i))) * PI(i + 1) ;
            }
        }&lt;/PRE&gt;
&lt;P&gt;This Little Code return PI as a decimal with much more precision.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So what?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even implemented in a more usable way (as the following code examples), to be used with AutoCAD (which only uses the Double type for floating numbers), MathExtension.PI will have to be converted into a double, and (double)MathExtension.PI returns: 3.1415926535897931, which is the same as System.Math.PI value...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    public class MathExtension
    {
        static MathExtension()
        {
            PI = 2 * ComputePI(1);
        }

        public static decimal PI { get; }

        static decimal ComputePI(int i)
        {
            if (i &amp;gt; 60)
                return i;
            else
                return 1 + (i / (1 + (2.0m * i))) * ComputePI(i + 1);
        }
    }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or, equivalent, but much more simple and direct (as you know what a const is):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    public static class MathExtension
    {
        public const decimal PI = 3.141592653589793250103076431m;
    }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 22:51:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7662430#M28388</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2018-01-03T22:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Draw line with angle &amp;&amp; Continue line with another angle(); .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7665649#M28389</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You do not know what a const is, as you made that perfectly clear in your first reply, by suggesting that Math.PI is more accurate than the literal const value in my code, which is the value that Math.PI is defined as in System.Math. You are completely mistaken about that, so don't try to change the story now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You also do not understand that a System.Double's precision is limited to 15 places to the right of the decimal point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It does not matter what the resolution of a System.Decimal is, because computations are always done using System.Double, not System.Decimal, and all APIs that accept radian angle arguments declare tham as System.Double, not System.Decimal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is another portion of the disassembled code of System.Math, do you see any parameters declared as&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;decimal&lt;/FONT&gt;&lt;/STRONG&gt; ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;public static extern &lt;FONT color="#FF0000"&gt;double&lt;/FONT&gt; Acos(&lt;FONT color="#FF0000"&gt;double&lt;/FONT&gt; d);
public static extern &lt;FONT color="#FF0000"&gt;double&lt;/FONT&gt; Asin(&lt;FONT color="#FF0000"&gt;double&lt;/FONT&gt; d);
public static extern &lt;FONT color="#FF0000"&gt;double&lt;/FONT&gt; Atan(&lt;FONT color="#FF0000"&gt;double&lt;/FONT&gt; d);
public static extern &lt;FONT color="#FF0000"&gt;double&lt;/FONT&gt; Atan2(&lt;FONT color="#FF0000"&gt;double&lt;/FONT&gt; y, &lt;FONT color="#FF0000"&gt;double&lt;/FONT&gt; x);&lt;BR /&gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2144608"&gt;@Juergen_Becker&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also know what a const is.&lt;/P&gt;&lt;P&gt;What I want to say is that you better use System.Math.PI because&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. You don't have to declare your own PI&lt;/P&gt;&lt;P&gt;2. You can't do any mistakes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What about this?&lt;/P&gt;&lt;PRE&gt;        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            decimal m_PI = 0;
            m_PI = PI();

            Application.Run(new Form1());
        }

        static decimal PI()
        {
            return PI(1) * 2;
        }

        static decimal PI(int i)
        {
            if (i &amp;gt; 60)
            {
                return i;
            }
            else
            {
                return 1 + (i / (1 + (2.0m * i))) * PI(i + 1) ;
            }
        }&lt;/PRE&gt;&lt;P&gt;This Little Code return PI as a decimal with much more precision.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Jürgen&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2018 00:54:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/draw-line-with-angle-amp-amp-continue-line-with-another-angle/m-p/7665649#M28389</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-01-05T00:54:54Z</dc:date>
    </item>
  </channel>
</rss>

