Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

How to determine which mesh elements are touching another?

How to determine which mesh elements are touching another?

jeanfA52BL
Participant Participant
779 Views
9 Replies
Message 1 of 10

How to determine which mesh elements are touching another?

jeanfA52BL
Participant
Participant

Hi, I'm at the planning stage of a Max plugin whose first operation would be to determine which objects in a scene are touching each other and count the number of contacts. I'd then like to sort them from least to most neighbors in a hierarchical tree with "leaves" having a value of 1, and twigs, branches and trunk having successively higher and higher values. Think of "Minesweeper" and the number of mines each square is touching....

These objects are typically tangential rather than overlapping (they are walls, floors, ducts etc exported from Revit. They typically have overlapping vertices 

I'd like to not use bounding box intersections as it throws false positives in cases of L shaped objects. 

Does anyone have any thoughts on this? Would I want to try raycasting from the vertices? Or creating spheres centered on the vertices which could intersect other objects? 

Thanks

0 Likes
780 Views
9 Replies
Replies (9)
Message 2 of 10

denisT.MaxDoctor
Advisor
Advisor

Firstly, let's define - are we talking about MaxScript or c++ SDK plugin?

0 Likes
Message 3 of 10

jeanfA52BL
Participant
Participant
Ultimately I'm looking to create a plugin but right now I'm stumbling through MaxScript trying to figure out the parts and pieces. I've never coded a line in my life so this is a ground up learning effort involving CodeAcademy, ChatGPT, every Youtube video I can skim through and ... you : )
0 Likes
Message 4 of 10

istan
Advisor
Advisor
0 Likes
Message 5 of 10

jeanfA52BL
Participant
Participant

I didn’t say I was adverse to long responses : ) 

thanks for the recommendation. I may need to get another MA to read that tho. 

0 Likes
Message 6 of 10

denisT.MaxDoctor
Advisor
Advisor

@jeanfA52BL wrote:
Ultimately I'm looking to create a plugin but right now I'm stumbling through MaxScript trying to figure out the parts and pieces. I've never coded a line in my life so this is a ground up learning effort involving CodeAcademy, ChatGPT, every Youtube video I can skim through and ... you : )

So, if I understand correctly, you've decided to skip the small stuff and dive right into learning by solving unsolved problems.

0 Likes
Message 7 of 10

jeanfA52BL
Participant
Participant

That’s about the size of it yeah. I’m an architect not a software developer. I’m doing this because nobody’s got the  the tool I need and I dont know enough to know if it’s feasible or not. 

0 Likes
Message 8 of 10

denisT.MaxDoctor
Advisor
Advisor

I believe it's important for everyone to stick to their own area of expertise. Sometimes, as a tools developer, it can be challenging to find truly valuable subjects to work on. If you have an idea for a tool that can significantly simplify or speed up a process, I encourage you to share it with someone capable of bringing it to life.

0 Likes
Message 9 of 10

jeanfA52BL
Participant
Participant
No doubt, and I largely agree. But I have not been successful so far finding that "someone". Also, the gap between building construction and software development is so large that it's difficult gaining a common vocabulary. I believe I do have an idea for something that could speed up a process. And I think that I now know enough about your area of expertise that I can explain it to a developer coherently. The only way for me to gain that common vocabulary so I can understand what you're saying is to dabble in your field.

If you have a hot second for a wall of text in your DM I can expand a bit on the process I'd like to make happen and you tell me if I'm crazy. And you can critique my grasp of the process. If I make sense and you have any idea who I need to talk to that would be great!
0 Likes
Message 10 of 10

istan
Advisor
Advisor

@jeanfA52BL wrote:

I didn’t say I was adverse to long responses : ) 

thanks for the recommendation. I may need to get another MA to read that tho. 


I wanted to point out, that it is impossible to even begin to solve such a task without a detailed specification. You wrote, some vertices already overlap. So you either have to clean up your data first or you might need more or less sophisticated mesh/face/vertex distance measurement algorithms. Each collision software has different goals: accuracy, speed, convex, concave, collision prediction..

 

0 Likes