|
PR258923 - Problem with reported MAX / MIN diameter from MAX_INSC constructed circle
Hi Yanhhua,
Unfortunately I’ve not an immediate answer to your question; I’ve not yet studied that code;-)
The formula you are suggesting for fmax and fmin seems correct to me, but I didn’t have time to verify the existing ones.
I’ve also some doubts about the necessity to differentiate the computation of fmax and fmin depending on the algorithm used to compute the feature … if(m_nBFSubType == MAX_INSCRIBED)…
If necessary tomorrow I will do better investigations.
Regards,
Antonella
From: Yanhua HUANG
Sent: Wednesday, January 14, 2009 12:45 PM
To: Andy Roberts; Antonella Cravero
Cc: Don Turcotte
Subject: RE: PR258923 - Problem with reported MAX / MIN diameter from MAX_INSC constructed circle
Importance: High
Andy and Antonella,
How to calculate “fmax” and “fmin” when best_fit_circle(MAX_INSCRIBED)?
In PR258923, for DIM LOC2, the customer expected the results to show a min value of 20 and a max value of 40, not 19.444 and 39.444.
In the existing code, for theo(max, min), it seems right. But for meas(max, min), the result seems wrong.
for meas(max, min), can we calculate “fmax” and “fmin” using the following formula?
fmax(meas) = max[Ri(meas)]– diam(meas)/2,
Ri = radius distance{Pi(meas) – O(fit_circle center, meas)}
void CPCDbest_fit_circle::maxmin()
// V44B\CONSFEAT\BEST_CIR.CPP, line 751
// existing code
if(m_nBFSubType == MAX_INSCRIBED)
{
if (numValidInputs)
ave /= (double) (numValidInputs);
// could not understand “fmax -= ave” when calculate fmax(meas)
fmax -= ave;
fmin -= ave;
// change to the new code
if(m_nBFSubType == MAX_INSCRIBED)
{
// fmax = max(Ri), fmin = min(Ri)
fmax -= diam/2;
fmin -= diam/2;
From: Don Turcotte
Sent: 2009年1月13日 10:50 PM
To: Yanhua HUANG
Cc: 'rjakl@cmmxyz.com'
Subject: RE: PR258923 - Problem with reported MAX / MIN diameter from MAX_INSC constructed circle
Yanhua,
If you create location dimensions for the points used in the constructed circle (PNT1 … PNT36) and check PR, PA (instead of X,Y,Z), you will see that the PR (radius from origin) is 10 for all the points except PNT19 which has a PR of 20. Since the actual center of the constructed circle is (0,0,0), one would expect the MAX diameter to be 2*20 = 40 and the min diameter to be 2*10 = 20. I believe these values are calculated by the constructed feature itself and only reported by the location dimension so you should look at the code in the constructed feature. This may be an issue for Andy Roberts.
Regards,
Don
From: Yanhua HUANG
Sent: Tuesday, January 13, 2009 7:37 AM
To: rjakl@cmmxyz.com; Don Turcotte
Subject: PR258923 - Problem with reported MAX / MIN diameter from MAX_INSC constructed circle
Ron,
Why did you expect the results to show a min value of 20 and a max value of 40?
19.444 and 39.444 are calculated by circle_fit(MIN_INSC | MAX_INSC, measured points) algorithm.
Don,
What do you think?
yanhua
<< Ron Jakl -- 01/06/09 09:51:39>>
The results displayed for the MAX / MIN diameter of a circle constructed with the MAX_INSC option does not seem correct. The dimension shown below is from a circle constructed with 36 points (see attached program for details). I expected the results to show a min value of 20 and a max value of 40.
DIM LOC2= LOCATION OF CIRCLE CIR2 UNITS=MM ,$
GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
AX MEAS NOMINAL DEV MAX MIN
X 0.000 0.000 0.000 10.000 -20.000 ----#----
Y 0.000 0.000 0.000 10.000 -10.000 ----#----
D 20.000 20.000 0.000 39.444 19.444 ----#----
END OF DIMENSION LOC2
<<END>> |
|