Author Topic: What is it ??  (Read 8797 times)

0 Members and 1 Guest are viewing this topic.

LE

  • Guest
Re: What is it ??
« Reply #15 on: January 23, 2007, 05:32:53 PM »
..............  Yes, I read about that bug yesterday...

Where did you read that information Luis ?

Here:

http://www.codeproject.com/dotnet/dotnetarxsample.asp

Quote
GetBoundingBox()
In the .NET API, the GeomExtents property of an entity can get the corner points of a box that encloses the 3D extents of the entity. But for DBText and MText, the GeomExtents property always returns the point (0,0,0) for the min-point of the box. So, DOTNETARX provides the GetBoundingBox() function to let you get the correct corner points of an entity including the DBText and the MText objects. The return value of GetBoundingBox() is a Point3d array,
  • is the minimum point of the object's bounding box, [1] is the maximum point of the object's bounding box. The following example shows you how to use GetBoundingBox():
I was doing a search about geometry extents on the net, and found that info....

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: What is it ??
« Reply #16 on: January 23, 2007, 06:07:20 PM »
Thanks Luis.
Just had a look at the DOTNETARX.dll :
Declaring Type: DOTNETARX.Tools  :- public static Point3d[] GetBoundingBox(Entity ent);

They use a different solution. Would be interesting to see the results when objects are not in WCS ..
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

LE

  • Guest
Re: What is it ??
« Reply #17 on: January 23, 2007, 06:25:05 PM »
Thanks Luis.
Just had a look at the DOTNETARX.dll :
Declaring Type: DOTNETARX.Tools  :- public static Point3d[] GetBoundingBox(Entity ent);

They use a different solution. Would be interesting to see the results when objects are not in WCS ..

There is a an usage of a an Utils available in acmgdinternal.dll (I think) on the MgdDbg by Jim Awe - and it have are included some functions about geometry extents...... and mentioned by Tony Tanzillo in some of the C# posts I have read - to bad I was not able to compile those samples...

« Last Edit: January 23, 2007, 07:31:42 PM by LE »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: What is it ??
« Reply #18 on: January 24, 2007, 12:22:46 AM »
Luis, I think :

acmgdinternal.dll  is standard AutoCAD

Jim hasn't released the AC2007 of MgdDbg yet, so it would AC2006 which I believe is different ..

.. .. but I'll have a look, and try to find any posts by Tony on the AD Newsgroup that refer to the issue.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: What is it ??
« Reply #19 on: January 24, 2007, 12:55:05 AM »
Luis,

From Jim
QueryEntTests.cs
$DateTime: 2005/06/10 17:13:15

Code: [Select]
        public void
        Extents()
        {
            Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
           
            Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = m_db.TransactionManager;

            while (true) {
                PromptEntityResult prEntRes = ed.GetEntity("\nSelect entity to show extents");
                if (prEntRes.Status != PromptStatus.OK)
                    break;
                   
                using (Autodesk.AutoCAD.DatabaseServices.Transaction tr = tm.StartTransaction()) {
                    AcDb.Entity ent = (AcDb.Entity)tr.GetObject(prEntRes.ObjectId, OpenMode.ForRead);

                    Extents3d ext = ent.GeometricExtents;
                    Point3d centerPt = Utils.Ge.Midpoint(ext.MinPoint, ext.MaxPoint);
                   
                    Utils.AcadUi.PrintToCmdLine(string.Format("\nEXTMIN:    {0}", Utils.AcadUi.PtToStr(ext.MinPoint)));
                    Utils.AcadUi.PrintToCmdLine(string.Format("\nEXTMAX:    {0}", Utils.AcadUi.PtToStr(ext.MaxPoint)));
                    Utils.AcadUi.PrintToCmdLine(string.Format("\nCENTER PT: {0}", Utils.AcadUi.PtToStr(centerPt)));
                   
                    tr.Commit();
                   
                    MakeExtentsBlock(ext);
                }
            }
        }

Which appears to be essentially similar to mine

Note that his version with $DateTime: 2004/11/24  uses ent.GeomExtents not ent.GeometricExtents.
« Last Edit: January 24, 2007, 12:56:29 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

LE

  • Guest
Re: What is it ??
« Reply #20 on: January 24, 2007, 09:29:28 AM »
Luis, I think :

acmgdinternal.dll  is standard AutoCAD

Jim hasn't released the AC2007 of MgdDbg yet, so it would AC2006 which I believe is different ..

.. .. but I'll have a look, and try to find any posts by Tony on the AD Newsgroup that refer to the issue.


Thanks.

This is the post:

http://discussion.autodesk.com/thread.jspa?messageID=5106861

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: What is it ??
« Reply #21 on: November 21, 2011, 08:10:27 AM »


Resurrected :

After a couple of years I have to admit some of my code was pretty primitive and unnecessarily complicated looking back then.
...

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.