Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Measuring the distance between objects
alex_bruskin
Member, Developers Posts: 2 ✭
Hi-
We just started experimenting with OnShape. Our principal experience is in CATIA and we are trying to find familiar features.
Presently, we can't find the OnShape intersect API
We just started experimenting with OnShape. Our principal experience is in CATIA and we are trying to find familiar features.
Presently, we can't find the OnShape intersect API
This is a good description on how it works in CAA:
1. go to C++ API, top right corner
2. scroll down to SpaceAnalysisInterfaces
3. click CATIMeasurableInContext
This gives a MinimumDistance calculation between two bodies or minimum distance between body and a point.
Thanks,
0
Answers
Is there any reason you want to do this with the API? If you just want to know the distance, you can select any two entities and measurement information will appear in the bottom right corner of the graphics area (clicking the little up arrow next to this will give additional information). If you would like to use distance information programmatically you can use the 'Measure Distance' Featurescript:
https://cad.onshape.com/documents/572b968ce4b07aad125dbaaf/v/08093fef6c4d4f330f24dd19/e/b40df94c5081948fe8195e81
This will allow you to measure the minimum or maximum distance between entities and store it in a variable to be used in later modeling operations. If you would like to write a custom FeatureScript to do this you can use our 'evDistance' functionality by hand:
https://cad.onshape.com/FsDoc/library.html#evDistance-Context-map
If your workflow requires you to use the API, I'm sure someone besides me knows how to do that