Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.
I want to find the distance between two components in as assembly using toolkit .In Pro/E it can be achived by Analysis ->Distance ->Measure .But i didnt find any direct way in toolkit.If anybodygot any idea please reply
Look up the function ProGeomitemDistanceEval. To quote the API Wizard under User's Guide->The Selection Object->The Selection Object->ProSelect Function Examples:
<LI =bullet><A name=70></A>ProGeomitemDistanceEval() uses ProSelection as its input, instead of ProGeomitem, so it can measure the distance between model items in different subassemblies.</LI>
Hope this helps.
ProGeomitemDistanceEval is not giving correct values . But i got an alternative pro_compute_clearance ,this will give coordinates of the closest points of respective parts in the assembly .
So i can transform two points to Assy Csys and it will give the distance between two components in the assy .
I think ProGeomitemDistanceEval might use the "center" of the model item when it does the calculation rather than using the closest points. That is a great question for PTC technical support.
I spoke with an engineer here and asked him how the Pro/E UI does it. When measuring a distance the UI only allows the selection of geometry entities such as planes orvertices. However to get a distance between two components he would calculate a clearance. This information is exactly what you have done, it's just some verification for you.
Additionally, I did create a ticket with PTC to ask about the behavior of ProGeomitemDistanceEval. I will post the reply.
The response from PTC.
Hi Patrick,<?:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" />
Regarding your recent call with PTC Technical Support: Customer would like to know more about the behavior of ProGeomitemDistanceEval()
This function should act like the measurement tool in Pro/ENGINEER. The function only allows input arguments of axes, planes, surfaces, and datum points, and the type of measurement you get will depend on which types you pass to the function. For example, if you pass in two points, you will get the straight line distance from point to point. If you pass in a point and a plane, the distance will be the length of a vector normal to the plane that terminates at the point. If you select a surface and a point, the distance will be a straight line from the point to the closestpoint of the surface. I'm not sure how it will behave if you select entities with ambiguous solutions -- for example an axis and a plane, where the axis passes through the plane, but is neither normal or parallel to the plane.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.