Jump to content

Best Fit and RMS


---
 Share

Recommended Posts

Hello, I'm attempting to Best Fit a series of space points on a dish type surface and then calculate the Root Mean Square. There are approx. (160) points and I have used the 3D Best Fit Alignment function for this purpose. My first question is this the correct Best Fit function to use and then how to calculate the RMS. I need to take the space point values and use the formula, SQRT(SUMSQ(C2:C11)/COUNTA(C2:C11)). Can the Result Element function calculate this? I do not have PCM.
Thanks for any information provided.
Link to comment
Share on other sites

As to the alignment, that should be called out on the print.

Off the top of my head...Yes.
Result element for each point =square of the space distance
Construct an average feature of those Result Elements
Result Element to take the square root.

Someone else may have an easier way.

RMS=STDEV=SIGMA

Maybe there is a way to pull the sigma with the * symbol in a result element?
Link to comment
Share on other sites

I really don't think this is possible within a result element without PCM, because as far as I know, there isn't a function like in excel, to take the sum of the squares of each point (sumsq). And to try and add all the points, you will run out if character lines. If there is, I will have learned something new.

Do you need it within the program? or just a result. You could report the space point distance for each point, export it to excel, and then formulate the RMS within your excel report.
Link to comment
Share on other sites

Erik,

Hello, thanks for your input. I was hoping for a one time report for the vertex, focal point and RMS values stemming from the contour Best Fit alignment. You are correct, we can transfer the data from our CMM standalone computer to our desktop computer, then use Excel to calculate. Thanks again for reply.
Link to comment
Share on other sites

Thinking about it further, using many Result elements, you could eventually get to the result you wanted, but it would be tedious. You would start by creating a result element squaring each space point result deviation. So approx. 160 of them. Next you would create result elements to add them. Since there are limited number of characters in a result element, you would have to add them in sections. Maybe 30-40 at a time. Once all 160 points are added within maybe 4-5 result elements, you would create another result element to do the rest of the math. Add all the result elements to get the total sum, divide by the number of points, and then take the square root. This would work, but like I said, it would be tedious.
Link to comment
Share on other sites

If you don't have pcm, do it externally, in excel as mentioned or in someting else suitable.

How ever, yes it can be done without PCM, but I would not recommend that.
But here is one example.
114_44413610e2586b821284760d8841fc22.png
Character limit of a result elemnt is 1024.

*edit, had a minute over, so I cleaned it up.
Link to comment
Share on other sites

I'm glad Eric M. remembered the character limit, because I didn't. Before I new about the Max Result calculation, I was formulating a max result through a result element and found there was a limit to how many characters could be used. 🤣
Link to comment
Share on other sites

I have a vague memory about loops in features and characteristics?
Something like this for 18 holes in a pattern?
Diameter - loop18(circle1*)
Does anyone have a PDF on looping in a feature or characteristic? Or examples?
Link to comment
Share on other sites

Please sign in to view this quote.

No you can't. You can store the result of a for loop in eg. a variable. And then present that variable in a result element. But the character limit still remains at 1024. A loop does not change that. So you can't get around the character limit and use eg. 1025 characters.
And OP don't have PCM, so a for-loop is not an valid suggestion.


Regarding you question about 18 holes. I don't understand what you are grasping at. loop18? There are four (4)
index holders in Calypso. LOOP1 (), LOOP2 [], LOOP3 <> and LOOP4 {}.

Are you aiming at quiring all index, one by one, while evaluation? Then use: getActual/Nominal("Diameter",LOOP1)
(Where the index holder (LOOP#) corresponds to the pattern used. (), [], <> or {})
Link to comment
Share on other sites

Please sign in to view this quote.

What I meant, obviously, was that you can solve any problem that requires you to handle long, repeating variables by means of a loop, getting you a result without cramping everything in one line. PCM is not needed for that, I’ve never had PCM, and still think that almost any lower complex problem can be solved without PCM.

You can use loops in your features and characteristics, you can use single PCM commands within result characteristics or theoretical features and in many more places than that.

Very useful and effectively lets you circumvent any restrictions caused by the character limitation.
Link to comment
Share on other sites

Can you please elaborate on what you are reffering to with "long, repeating variables", beacuase I really don't think we reffer to the same thing when mentioning long. Long for me, is an extended type that store numbers with higher precision.

Could you also provide an example of how you don't cramp everything in one line without a PCM license?
Link to comment
Share on other sites

Please sign in to view this quote.

That should have read more like "long strings, caused by repeating variables".

Take as an example something like above, where you try to cramp 160 references to a characteristic in one line. You easily use more than the allowed number of characters. Let's just say you try to find the maximum value of 160 different values.

In PCM it's easy to solve this task, but even without PCM it's not a problem.

You just make a new result element and assign it the first of your 160 values. This is your starting element and you call it "Maximum Value".

Then make a new result element by the same name and you add a formula in which you compare the actual value of the result element "Maximum Value" (which was your starting value) with the second one, storing the higher value back into that result element. Either your new value is higher, then your "Maximum Value" result element holds that new number, or it is lower (or equal), then the original number remains unchanged.

Make a loop out of the second result element and loop it 159 time (one less than the number of elements you want to compare), and don't forget to change the formula, so that the index number of your element is changed to LOOP1.

When the loop is done, your result element "Maximum Value" holds the maximum of your 160 values. Tadaa... You can even do it with 10000 values, just takes longer. There is no real limit.

You can make your loops much more complex than that or work with conditions (which are basically if-then decisions).

It's a bit more clumsy than PCM programming but it works just fine. You could even devise ways to program your plans so that you can measure part families (one of the major selling points of PCM). The only problem there is to load starting parameters, but there are ways to get around this.
Link to comment
Share on other sites

 Share

×
×
  • Create New...