Kean Walmsley

July 2009

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Twitter Updates

    follow me on Twitter



    « Displaying a progress meter during long operations in AutoCAD using .NET | Main | Showing a splash-screen from your AutoCAD .NET application »

    May 29, 2007

    TrackBack

    TrackBack URL for this entry:
    http://www.typepad.com/services/trackback/6a00d83452464869e200d8357f669769e2

    Listed below are links to weblogs that reference Getting the type of an AutoCAD solid using .NET:

    Comments

    Hello Kean,

    I have been studying your great articles. They have been very helpful in getting me up to speed with AutoCAD 2008 .NET. I was wondering if you might know how to go about aligning 3d objects? For example you have two cylinders in your drawing and they are perpendicular in relation to each other and you want to get them where they are collinear so they would share the same axis and their faces would be facing each other.
    I know there has to be a TransformBy applied to on of the objects, but setting up the matrix correctly is where I am stumped. I still can't grasp the Matrix3d.

    Thanks Kean!
    Larry

    Hi Larry,

    That's an interesting question... I imagine that you'd need to get the solid's faces and the planes of those faces, and then use the geometry libary to calculate the transformation(s) needed to make them co-planar. The bad news is that the BRep API (which would be needed to traverse the solid's faces) is not currently available in .NET (so you'd need to use at least some C++, for now).

    Sorry not to have better news for you,

    Kean

    Hi Larry,
    I realize I am pretty late on this post, but here it goes:

    My programmers created an API, in C++ ARX, that traverses the 3D Solids Exterior Loops,
    Interior Loops, and Edges, and then returns:
    The number of faces
    The vertexes of each face
    The area of each face
    The normal and inverse normal of the faces
    The radius values of planer 3d curves
    The cylinder holes
    and a few others

    The API can be accessed from Visual Basic 6, VB.NET, C# and Lisp.

    I am not sure how many programmers would want this API, but I know we really needed it. If the demand is there I would consider making it available.

    David Wishengrad
    President and CTO
    MillLister, Inc.

    And just to add something from my side: we exposed the BRep API to be usable from .NET with AutoCAD 2009, in case this helps.

    Regards,

    Kean

    Hi Kean,

    Are there any options to write/edit eg. Cylinder properties?

    I managed to get more specific Cylinder properties by using the Cylinder.Create() Method. This way I can get/set the Radius property, but the Height property throws an AccessViolationException.

    I must be doing something wrong, but what would be the correct way?

    (more info at http://discussion.autodesk.com/forums/thread.jspa?messageID=6072309� )

    Hi Bert,

    Sorry - I'm just getting ready for a trip (I leave for China tomorrow morning), so don't have time to look at this.

    Hopefully you'll get a response via the discussion group.

    Regards,

    Kean

    Verify your Comment

    Previewing your Comment

    This is only a preview. Your comment has not yet been posted.

    Working...
    Your comment could not be posted. Error type:
    Your comment has been posted. Post another comment

    The letters and numbers you entered did not match the image. Please try again.

    As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

    Having trouble reading this image? View an alternate.

    Working...

    Post a comment

    Feed & Share

    Search