Skip to main content
18-Opal
Feb 27, 2025 8:03 AM UTC
Question

How to check feature distances using the toolkit

Hello everyone,

 

We are trying to implement a method to calculate the distance between features through the toolkit.

Our scenario is below :

1. Visit the edges of the Geomitems of the features to be compared and create an array.

2. Create ProSelection for the edges of the array.

3. Return the minimum distance between the edges of 2 features. (using ProFitClearanceCompute)

 

As the number of feature increases, it seems that there will be more loops and performance degradation may occur.

If you have a better idea, please let me know.

 

Warm Regards,

SeonHo

3 replies

24-Ruby IV
Feb 27, 2025 8:35 AM UTC

Article - "How to calculate length between two points on curve in Creo Parametric through Toolkit": https://www.ptc.com/en/support/article/CS377113 

Translate
Catalina
Community Moderator
Mar 7, 2025 9:00 AM UTC

Hi @CHASEONHO,

I wanted to see if you got the help you needed.

If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.

Of course, if you have more to share on your issue, please pursue the conversation.

Thanks,

Translate
Catalina | PTC Community Moderator
CHASEONHO18-OpalAuthor
18-Opal
Mar 11, 2025 12:39 AM UTC

Hi, @Catalina 

I'm not posting to the community to ask how to calculate distances between geometry items.

 

I'd like to hear from community users if there's a better way to calculate distances between features than collecting geometry items of a feature and then comparing them with a double for loop.

 

In my opinion... implementing a hashtable or other method seems impossible, so simple iteration seems the best way..

In conclusion, I haven't found a solution yet... 😞

 

Thanks,

SeonHo

 

Translate