Skip to main content
18-Opal
February 27, 2025
Question

How to check feature distances using the toolkit

  • February 27, 2025
  • 2 replies
  • 931 views

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

2 replies

24-Ruby III
February 27, 2025

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

Catalina
Community Moderator
March 7, 2025

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,

Catalina | PTC Community Moderator
CHASEONHO18-OpalAuthor
18-Opal
March 11, 2025

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