Measure distance method using Fit to Primitives. How to add new options.

Measure distance method using Fit to Primitives. How to add new options.

fundamental4
Advocate Advocate
2,241 Views
6 Replies
Message 1 of 7

Measure distance method using Fit to Primitives. How to add new options.

fundamental4
Advocate
Advocate

 

hi all,

 

I thank you some help.

 

I have an object from a scan (irregular and incomplete shape).
Object was imported to MM and it was scaled (it had some reference points).

 

My final goal is the dimension (in X axis) between 2 points at different level. I mean, it would be the distance between the projected points to the grid plane.

My strategy was:
1.- Create 2 Primitives in the desire areas using Fit to Primitives. I used "Spheres best fit".
2.- Add Pivots to these spheres. Create Pivot/ Bounding box. So, center of the spheres would be matched.
3.- align the axis of these Pivots to the World coordinates system, so Pivots will be aligned with X axis of the scene. 
4.- Measure the projection of these 2 Pivots on the grid plane.

I don't know if this is possible... I am stopped at step 2, Pivots created. I don't know how to continue.

I thought a "personal" method, but I'm not sure if it was the best, and also I don't know how to do it in MM. I would add another Primitive (2x cilinder) aligned with the Pivots in the center of the 2 spheres, and with the lowest faces of the cilinders also aligned with the grid plane. Then add 2 new Pivots in the face of these 2 lowest faces, and finally the Measure between these 2 Pivot points. But I don't know how to do this method.

Could you please help me how to measure this distance?

Please see attached pictures.

Also, is there any way of adding new Primitive Type to Fit Primitive list? (Select/Edit/Fit Primitive)

Thank you

0 Likes
Accepted solutions (1)
2,242 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Accepted solution

No, a user can't add other types of primitives to the FitPrimitive tool. Think one could code a mmApi script to do the same action as FitPrimitive but allowing different primitives to be inserted....

 

Unfortunately there's no tool giving axial distances directly but you can calculate them using Transform:

Its TranslateX, TranslateY, TranslateZ values give the coordinates of the object's centroid.

Now if you write down these values for two objects you can calculate the distances:

 

To get a one dimensional distance in e.g. X you just need to subtract the smaller TranslateX from the bigger TranslateX = distanceX  (analog for distanceY and distanceZ)

 

To get a two dimensional in e.g. XZ you need to use the Pythagorean theorem:

distanceXZsquareRoot ( distanceX^2 + distanceZ^2)

 

Same theorem to get a three dimensional distance:

distanceXYZ = squareRoot ( distanceXZ^2 + distanceY^2)

 

(All that math stuff could be coded in a mmApi script easily)

 

 

Basically you don't need the pivots on the spheres' centroids as Transform snaps to the centroid. So you need to run Transform twice. But if you have pivots Transform snaps to a clicked pivot. So you can get the pivot positions in one session of Transform.

 

 

Message 3 of 7

fundamental4
Advocate
Advocate

 

Thank you 

 

0 Likes
Message 4 of 7

hfcandrew
Advisor
Advisor

I always have trouble following what and why people are asking for. But you can also go to Analyze > Units/Dimension > Click and drag anywhere on the mesh to slide a measuring stick for the 'real length' between two points.

0 Likes
Message 5 of 7

fundamental4
Advocate
Advocate

 

thank you hfcandrew for your help,

 

In this case I don't need the "real" length between 2 points, I need the length in one plane, ie, the projected length in that plane, because points I want to measure are not at the same height (Y value). 


 

0 Likes
Message 6 of 7

Anonymous
Not applicable

Idea:

Combine Transform of the pivot with Andrew's idea using UnitsDimensions:

 

- Activate one of the pivots and run Transform (Snapping needs to be enabled and AbsoluteCoords/Sizes active). Set its TransformY to zero > Now it is at the ground plane (if needed set its TransformZ to zero too). Do the same with the second pivot.

- Go to Units/Dimensions. Draw some measure line anywhere on a mesh (one can't draw such a line from pivot to pivot directly). Now drag its ends to the pivots.

 

 

0 Likes
Message 7 of 7

fundamental4
Advocate
Advocate

 

Thank you

In fact, it is in the way of my first procedure, but at that time I was wrong because I was thinking in using a face-cilinder and Align tool  with grid because I didn't know I could Transform the pivot by itself, without the Primitive.


I also used another method. Due to it is very difficult to adjust a Pivot in a face  (planar area, not just 1 face) I used the Cone Primitive, because the edge is very easy to use as a "pointer".

 

I've checked this method, and it is as much accurate as scale accuracy the original object.

I'm learning...

 

 

0 Likes