Results 1 to 8 of 8

Thread: point inside 3d solid

  1. #1
    Member
    Join Date
    2016-02
    Posts
    25
    Login to Give a bone
    0

    Default point inside 3d solid

    I´m trying to determine whether a point is inside a 3d solid object. That would mean that the number of intersections of a ray from that point and the 3d solid object is uneven. Can somebody help me in writing a lisp to do that?

  2. #2
    All AUGI, all the time
    Join Date
    2015-10
    Location
    Belgrade, Serbia, Europe
    Posts
    564
    Login to Give a bone
    0

    Default Re: point inside 3d solid

    You must be logged to access...
    https://www.theswamp.org/index.php?t...2726#msg552726

    HTH., M.R.

  3. #3
    Member
    Join Date
    2016-02
    Posts
    25
    Login to Give a bone
    0

    Default Re: point inside 3d solid

    Kolega hvala, but no luck, "Command: ; error: bad argument value: AcDbCurve 45"

    I was thinking of doing the check the same way you did (making a section and then checking if the point is inside the region), but then thought counting the intersections of a ray with the solid would be easier (since I work with orthogonal solids and the points can not be on an edge). I will try to edit your code and make it work for me.

    I also vaguely remember of an autocad function which draws the piercing points of a line and a solid (from a job I did a couple of years ago), but can't seem to find it now.

  4. #4
    Member
    Join Date
    2016-02
    Posts
    25
    Login to Give a bone
    0

    Default Re: point inside 3d solid

    Thinking about it some more, I think the models I was talking about in the previous post already had the piercing point drawn in (they were exported from Rhyno). Seems a bit odd Autocad doesn't have functions allowing such interactions between line and 3d solid objects.

  5. #5
    All AUGI, all the time
    Join Date
    2015-10
    Location
    Belgrade, Serbia, Europe
    Posts
    564
    Login to Give a bone
    0

    Default Re: point inside 3d solid

    Quote Originally Posted by mattko View Post
    Thinking about it some more, I think the models I was talking about in the previous post already had the piercing point drawn in (they were exported from Rhyno). Seems a bit odd Autocad doesn't have functions allowing such interactions between line and 3d solid objects.
    If you are talking ab intersections of LINE or CURVE with 3DSOLID, then CAD have this functionality - it's only little convoluted... You have to use IMPRINT command, then select source curve and destination 3dsolid, but then in the end you have to explode 3DSOLID all the levels -> REGIONS and BODIES -> LINES, and then when exploded to the end you should see point of intersections as points... Then COPYBASE those points with base '(0 0 0) and do several UNDOs until you reach the situation before exploding, then just PASTECLIP into point '(0 0 0), and that's it you'll have curves, 3dsolids and points of intersection...

    M.R.

  6. #6
    Member
    Join Date
    2016-02
    Posts
    25
    Login to Give a bone
    0

    Default Re: point inside 3d solid

    Yep, thats the one. So, no easy way to count the imprinted points, too bad. Thanks for the help!

  7. #7
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: point inside 3d solid

    Thinking outside the box a bit (to see if it's actually *inside* the box ) - construct a temporary, very small solid at the desired point. Then check for interference with the other solid in question. If this has to be done repeatedly, then create the point-solid once and relocate to each test point in turn.

  8. #8
    Member
    Join Date
    2016-02
    Posts
    25
    Login to Give a bone
    0

    Default Re: point inside 3d solid

    Great idea! Thanks

Similar Threads

  1. is point inside boundary
    By parkerfeldman in forum AutoLISP
    Replies: 2
    Last Post: 2009-06-01, 05:26 AM
  2. Check if Point is inside Polygon
    By bweir in forum AutoLISP
    Replies: 2
    Last Post: 2007-04-04, 05:28 PM
  3. Determining if a Point is picked inside a 3D Solid
    By roger_wall in forum VBA/COM Interop
    Replies: 0
    Last Post: 2007-02-01, 12:07 AM
  4. Point to attribute inside of a block
    By cgerhardt in forum VBA/COM Interop
    Replies: 3
    Last Post: 2006-12-08, 04:32 PM
  5. Test for point inside of boundary
    By pcsyoga in forum AutoLISP
    Replies: 2
    Last Post: 2005-04-05, 02:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •