<?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: Problem in drawing sphere... in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426937#M71864</link>
    <description>i want to put Solid object (Sphere) to user specific position but Sphere is locating at 0,0,0. why?&lt;BR /&gt;
how to use transformBy(Matrix3d transform);&lt;BR /&gt;
&lt;BR /&gt;
Solid3d s = new Solid3d();&lt;BR /&gt;
s.CreateSphere(10.0);&lt;BR /&gt;
btr.AppendEntity(s);&lt;BR /&gt;
tran.AddNewlyCreatedDBObject(s,true);&lt;BR /&gt;
&lt;BR /&gt;
thanks</description>
    <pubDate>Tue, 10 Feb 2009 11:02:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-02-10T11:02:37Z</dc:date>
    <item>
      <title>Problem in drawing sphere...</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426935#M71862</link>
      <description>I am trying to draw Sphere but it is giving me error;&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
using (tran = db.TransactionManager.StartTransaction())&lt;BR /&gt;
            {&lt;BR /&gt;
                try&lt;BR /&gt;
                {&lt;BR /&gt;
                    BlockTable bt = (BlockTable)tran.GetObject(db.BlockTableId,OpenMode.ForRead);&lt;BR /&gt;
                    BlockTableRecord btr = (BlockTableRecord)tran.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);&lt;BR /&gt;
                    Solid3d s = new Solid3d();&lt;BR /&gt;
                    &lt;BR /&gt;
                    //Rectangle3d rec = new Rectangle3d(new Point3d(10, 20, 0), new Point3d(20, 20, 0), new Point3d(10, 0, 0), new Point3d(20, 10, 0));&lt;BR /&gt;
                    Sphere sph = new Sphere(5, new Point3d(10, 10, 0), Vector3d.ZAxis, Vector3d.XAxis, 0, 360, 0, 360);&lt;BR /&gt;
                    btr.AppendEntity(sph);&lt;BR /&gt;
                    tran.AddNewlyCreatedDBObject(sph, true);&lt;BR /&gt;
                    tran.Commit();&lt;BR /&gt;
                }&lt;BR /&gt;
&lt;BR /&gt;
                catch(Autodesk.AutoCAD.Runtime.Exception ex)&lt;BR /&gt;
                {&lt;BR /&gt;
                    editor.WriteMessage("\nAutoCAD &amp;gt;&amp;gt;" + ex.Message);&lt;BR /&gt;
                }&lt;BR /&gt;
                catch(System.Exception ex)&lt;BR /&gt;
                {&lt;BR /&gt;
                    editor.WriteMessage("\nSystem &amp;gt;&amp;gt;" + ex.Message);&lt;BR /&gt;
                }&lt;BR /&gt;
            }&lt;BR /&gt;
{code}</description>
      <pubDate>Mon, 09 Feb 2009 09:44:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426935#M71862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-02-09T09:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in drawing sphere...</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426936#M71863</link>
      <description>The sphere object you are declaring as sph comes from the Geometry namespace, and does not inherit the Entity class, and so can not be appended to a block table record (or added to the transaction I believe).&lt;BR /&gt;&lt;BR /&gt;You need to use your Solid3D object "s" and call s.CreateSphere (Radius)&lt;BR /&gt;&lt;BR /&gt;Then in order to position it in space, you would call s.TranslateBy(TranslationMatrix)&lt;BR /&gt;&lt;BR /&gt;Then you can btr.AppendEntity(s)&lt;BR /&gt;&lt;BR /&gt;and Tran.AddNewlyCreatedDBObject(s, true)</description>
      <pubDate>Mon, 09 Feb 2009 21:53:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426936#M71863</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2009-02-09T21:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in drawing sphere...</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426937#M71864</link>
      <description>i want to put Solid object (Sphere) to user specific position but Sphere is locating at 0,0,0. why?&lt;BR /&gt;
how to use transformBy(Matrix3d transform);&lt;BR /&gt;
&lt;BR /&gt;
Solid3d s = new Solid3d();&lt;BR /&gt;
s.CreateSphere(10.0);&lt;BR /&gt;
btr.AppendEntity(s);&lt;BR /&gt;
tran.AddNewlyCreatedDBObject(s,true);&lt;BR /&gt;
&lt;BR /&gt;
thanks</description>
      <pubDate>Tue, 10 Feb 2009 11:02:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426937#M71864</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-02-10T11:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in drawing sphere...</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426938#M71865</link>
      <description>Use GetAsVector method:&lt;BR /&gt;
&lt;BR /&gt;
                        Dim sol As Solid3d = New Solid3d&lt;BR /&gt;
                        sol.CreateSphere(rad)&lt;BR /&gt;
                        Dim ptOpts As PromptPointOptions = New PromptPointOptions( _&lt;BR /&gt;
                            "\nPick a center point of sphere: ")&lt;BR /&gt;
                        Dim ptRes As PromptPointResult = _&lt;BR /&gt;
                        ed.GetPoint(ptOpts)&lt;BR /&gt;
                        If ptRes.Status &amp;lt;&amp;gt; PromptStatus.OK Then&lt;BR /&gt;
                            Return&lt;BR /&gt;
                        End If&lt;BR /&gt;
                        Dim topt As Point3d = ptRes.Value&lt;BR /&gt;
                        Dim mat As Matrix3d = Matrix3d.Displacement(topt.GetAsVector())&lt;BR /&gt;
                        sol.TransformBy(mat)&lt;BR /&gt;
                        btr.AppendEntity(sol)&lt;BR /&gt;
                        tr.AddNewlyCreatedDBObject(sol, True)&lt;BR /&gt;
                        tr.Commit()&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Tue, 10 Feb 2009 11:43:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426938#M71865</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2009-02-10T11:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in drawing sphere...</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426939#M71866</link>
      <description>thanks for your information.&lt;BR /&gt;
&lt;BR /&gt;
in C# Cylinder, Sphere, Cone as they are not inherited from Entity.&lt;BR /&gt;
How we can use them if any one wants to use. Becoz when i use Solid3D.createSphere i never get the center of sphere OR i cant set its position.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
thanks.

Edited by: FergiPune on Feb 11, 2009 6:23 AM</description>
      <pubDate>Wed, 11 Feb 2009 05:55:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426939#M71866</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-02-11T05:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in drawing sphere...</title>
      <link>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426940#M71867</link>
      <description>The sphere is created at the WCS origin, so you have to&lt;BR /&gt;
use TransformBy() to get it into the orientation and position&lt;BR /&gt;
you need.&lt;BR /&gt;
&lt;BR /&gt;
Unfortunately, 3D API functionality is deliberately hobbled&lt;BR /&gt;
and limited in AutoCAD, so it can't be used by customers&lt;BR /&gt;
to build solutions that are competitive with Inventor, et. al.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2009&lt;BR /&gt;
Supporting AutoCAD 2000 through 2009&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Introducing AcadXTabs 2010:&lt;BR /&gt;
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FERGIPUNE&gt; wrote in message news:6122403@discussion.autodesk.com...&lt;BR /&gt;
thanks for your information. in C# Cylinder, Sphere, Cone as they are not &lt;BR /&gt;
inherited from Entity. How we can use them if any one wants to use. Becoz &lt;BR /&gt;
when i use Solid3D.createSphere i never get the center of sphere OR i cant &lt;BR /&gt;
set its position. thanks. Edited by: FergiPune on Feb 11, 2009 6:23 AM&lt;/FERGIPUNE&gt;</description>
      <pubDate>Wed, 11 Feb 2009 13:08:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/problem-in-drawing-sphere/m-p/2426940#M71867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-02-11T13:08:25Z</dc:date>
    </item>
  </channel>
</rss>

