<?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: Projecting a circle on default UCS in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742124#M51924</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;Gilles!&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="hps"&gt;You probably&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;right, but I've&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;tested this&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;code&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;with different types of&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;polylines in&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;AutoCAD&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;2013 and&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;found no&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;problems.&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Maybe you can&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;clarify&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the conditions in which&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;these problems&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;arise&lt;/SPAN&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Dec 2012 11:17:24 GMT</pubDate>
    <dc:creator>Alexander.Rivilis</dc:creator>
    <dc:date>2012-12-23T11:17:24Z</dc:date>
    <item>
      <title>Projecting a circle on default UCS</title>
      <link>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742021#M51920</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a cirlce which is rotated 45 degree around the X-axis. If you look at it from the top (normal=0,0,1) it will look like an ellipse.&lt;/P&gt;&lt;P&gt;I want to draw a new entity (ELLIPSE) that will have the same shape/look as the circle viewed from the top, but the whole entity must have z=0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, exactly what the command FLATTEN does.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do this easily? Or is the only way to figure out the math behind it? Does anyone know a site where this math is explained?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Dec 2012 14:11:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742021#M51920</guid>
      <dc:creator>Ertqwa</dc:creator>
      <dc:date>2012-12-22T14:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting a circle on default UCS</title>
      <link>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742034#M51921</link>
      <description>&lt;P&gt;Try this code:&lt;/P&gt;
&lt;PRE&gt;using System;&lt;BR /&gt;using System.Runtime.InteropServices;&lt;BR /&gt;using Autodesk.AutoCAD.Runtime;&lt;BR /&gt;using Autodesk.AutoCAD.ApplicationServices;&lt;BR /&gt;using Autodesk.AutoCAD.EditorInput;&lt;BR /&gt;using Autodesk.AutoCAD.Geometry;&lt;BR /&gt;using Autodesk.AutoCAD.DatabaseServices;&lt;BR /&gt;[assembly: CommandClass(typeof(Rivilis.CurveProject))]&lt;BR /&gt;namespace Rivilis&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; public class CurveProject&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [CommandMethod("CrvPrjUCS")]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static public void CrvPrjUCS()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Database db = Application.DocumentManager.MdiActiveDocument.Database;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PromptEntityOptions opt = new PromptEntityOptions("\nSelect a Curve: ");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; opt.SetRejectMessage("Not a Curve");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; opt.AddAllowedClass(typeof(Curve), false);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PromptEntityResult rs = ed.GetEntity(opt);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Matrix3d mat = ed.CurrentUserCoordinateSystem;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Plane pln = new Plane(Point3d.Origin, Vector3d.ZAxis);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pln.TransformBy(mat);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (rs.Status == PromptStatus.OK) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (Transaction tr = db.TransactionManager.StartTransaction()) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Curve crv = tr.GetObject(rs.ObjectId, OpenMode.ForRead) as Curve;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (crv != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Curve newCrv = crv.GetOrthoProjectedCurve(pln);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (newCrv != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BlockTableRecord btr = tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite) as BlockTableRecord;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (btr != null) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; btr.AppendEntity(newCrv);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tr.AddNewlyCreatedDBObject(newCrv, true);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newCrv.Dispose();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tr.Commit();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Dec 2012 15:43:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742034#M51921</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-12-22T15:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting a circle on default UCS</title>
      <link>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742074#M51922</link>
      <description>&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed the GetOrthoProjectedCurve() and GetProjectedCurve() methods gave unexpected results with polylines (all types).&lt;/P&gt;&lt;P&gt;You can have a look at the GetOrthoProjectedPolyline() and GetProjectedPolyline() extension methods for Polyline, Polyline2d and Polyline3d classes in the GeometryExtension library here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.theswamp.org/index.php?topic=31865.msg373672#msg373672" target="_blank"&gt;http://www.theswamp.org/index.php?topic=31865.msg373672#msg373672&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Dec 2012 22:58:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742074#M51922</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2012-12-22T22:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting a circle on default UCS</title>
      <link>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742113#M51923</link>
      <description>Have disagree this code by Alexander is working good enough with aby type of curves [CommandMethod("3ps")] public static void test3dp() { // some dummy points for test Point3dCollection points = new Point3dCollection() { new Point3d(5, 15, 10), new Point3d(25, 20, 0), new Point3d(30, 5, -10), new Point3d(10, 10, 5) }; // create closed 3dpoly create3dPoly(HostApplicationServices.WorkingDatabase, points, true); } // code borrowed from Fenton Webb, Autodesk, 15/06/2012 static public void create3dPoly(Database db,Point3dCollection points,bool closed) { Transaction tr = db.TransactionManager.StartTransaction(); using (tr) { // Create a 3D polyline with two segments (3 points) using (Polyline3d poly3d = new Polyline3d()) { poly3d.SetDatabaseDefaults(); // Add the new object to the current space block table record using (BlockTableRecord btr = tr.GetObject(db.CurrentSpaceId,OpenMode.ForWrite) as BlockTableRecord) { // because before adding vertexes, the polyline must be in the drawing btr.AppendEntity(poly3d); foreach (Point3d pnt in points) { // now create the vertices using (PolylineVertex3d poly3dVertex = new PolylineVertex3d(pnt)) // and add them to the 3dpoly (this adds them to the db also poly3d.AppendVertex(poly3dVertex); } } poly3d.Closed = closed; } tr.Commit(); }//end using transaction }</description>
      <pubDate>Sun, 23 Dec 2012 10:12:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742113#M51923</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-12-23T10:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting a circle on default UCS</title>
      <link>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742124#M51924</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Gilles!&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="hps"&gt;You probably&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;right, but I've&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;tested this&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;code&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;with different types of&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;polylines in&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;AutoCAD&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;2013 and&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;found no&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;problems.&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;Maybe you can&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;clarify&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the conditions in which&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;these problems&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;arise&lt;/SPAN&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Dec 2012 11:17:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742124#M51924</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-12-23T11:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting a circle on default UCS</title>
      <link>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742158#M51925</link>
      <description>&lt;P&gt;Ok, with A3013 GetOrthoProjectedCurve() seems to work as expected with Polyline entities, but I still have unexpected results with Polyline2d entities (wrong elevation).&lt;/P&gt;&lt;P&gt;With prior AutoCAD versions GetOrthoProjectedCurve() raised a eNotApplicable exception with Polyline entities and gave unpredictable reulst with Polyline2d entities.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Dec 2012 17:09:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742158#M51925</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2012-12-23T17:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting a circle on default UCS</title>
      <link>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742159#M51926</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Ok, with &lt;STRONG&gt;A&lt;FONT color="#FF0000"&gt;3&lt;/FONT&gt;013&lt;/STRONG&gt; ...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="hps"&gt;We already live&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in the fourth millennium&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;after Christ&lt;/SPAN&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Dec 2012 17:15:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3742159#M51926</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-12-23T17:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Projecting a circle on default UCS</title>
      <link>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3782803#M51927</link>
      <description>&lt;P&gt;It's a bit late reply, but....great ty!&lt;/P&gt;</description>
      <pubDate>Sun, 17 Feb 2013 19:46:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/projecting-a-circle-on-default-ucs/m-p/3782803#M51927</guid>
      <dc:creator>Ertqwa</dc:creator>
      <dc:date>2013-02-17T19:46:02Z</dc:date>
    </item>
  </channel>
</rss>

