|
[10:09:18 PM] yanhua Huang says: hi in?
[10:30:16 PM] Dan Zwick says: Hi Yanhua
[10:30:55 PM] yanhua Huang says: What difference between CPCDcurve and CDSFitCurve?
[10:31:52 PM] Dan Zwick says: I guess one is a DSFit class and one is a PC-DMIS class.
[10:32:58 PM] yanhua Huang says: Could you help me to review my changed code for item 11 of TK104539?
[10:33:42 PM] Dan Zwick says: Ok. Do you have a part program that you use for testing?
[10:33:50 PM] yanhua Huang says: yes
[10:34:03 PM] yanhua Huang says: I sent you via email right now
[10:34:25 PM] yanhua Huang says: don R gave me a test PP last week
[10:34:38 PM] Dan Zwick says: Ok, I'll give it a look this morning.
[10:35:01 PM] Dan Zwick says: Is it a 4.3B part program?
[10:35:12 PM] yanhua Huang says: V44B
[10:35:23 PM] Dan Zwick says: Oh. Then I'll have to build 4.4B first.
[10:37:17 PM] Dan Zwick says: That will take a while.
[10:37:54 PM] Dan Zwick says: Did you say you sent me that pp? I haven't received it yet.
[10:40:23 PM] yanhua Huang sent file "10212008_01a.zip" to members of this chat
[10:41:06 PM] Dan Zwick says: Thanks
[10:42:03 PM] Dan Zwick says: I'm downloading now. I'll build 4.4B and let you know how it went.
[10:43:45 PM] yanhua Huang says: thanks.
double arc_inverse(int m, int ndim, double *cx, double *cy, double *cz,
double *t, double u, double tau)
{
int i;
double f, fprime, t0, del_tau, eps = 1.e-4;
t0 = t[3];
for (i = 0; i < 30; i++)
{
fprime = spline_func(m, ndim, cx, cy, cz, t, tau);
if (fprime == 0.)
break;
f = compute_length(m, ndim, cx, cy, cz, t, t0, tau) - u;
del_tau = f / fprime;
tau -= del_tau;
if (fabs(del_tau) < eps)
break;
}
if (tau < t0)
return t0;
if (tau > t[m+1])
return t[m+1];
return tau;
} /* end arc_inverse */
for (i = 0; i < 30; i++)
What means 30 (loop)
[10:45:13 PM] Dan Zwick says: That's Newton's method.
[10:45:34 PM] yanhua Huang says: oh
[10:46:37 PM] Dan Zwick says: It solves for tau iteratively. 30 is the maximal number of iterations.
[10:47:31 PM] Dan Zwick says: Ignoring the other arguments, the function to solve for is f(tau) = length(tau) - u.
[10:48:24 PM] Dan Zwick says: The derivative is easy since the length is an integral. By the fundamental theorem of calculus the derivative of the integral is its integrand (the thing it's integrating) evaluated at tau.
[10:48:42 PM] Dan Zwick says: That's fprime.
[10:48:50 PM] yanhua Huang says: #define DEFAULT_THIN_TOL 0.01
is its unit mm or inch? set m_ThinTol = 0.01
is the tolerance value OK when try to fit scan as curve?
[10:49:54 PM] Dan Zwick says: That's a good question. The thinning tolerance is a distance, so maybe it should have been multiplied by global_units.
[10:50:44 PM] Dan Zwick says: But generally speaking, the larger the tolerance the fewer knots and the smaller the tolerance the more knots.
[10:51:17 PM] Dan Zwick says: More knots means more parameters, and a better fit. But it also means that it takes longer to compute.
[10:52:04 PM] Dan Zwick says: The thinning tolerance is used for approximating data by splines.
[10:52:20 PM] Dan Zwick says: Not for interpolating all of the data.
[10:52:40 PM] Dan Zwick says: If you set the thinning tolerance to 0 it will interpolate.
[10:53:27 PM] yanhua Huang says: 3-bspine interpolate?
[10:53:29 PM] Dan Zwick says: The thinning tolerance and the other thinning parameter determine how many of the original data points to use as knots.
[10:53:32 PM] Dan Zwick says: Yes.
[10:54:06 PM] Dan Zwick says: The thinning parameter says what percentage (approximately) of the points to use as knots.
[10:54:56 PM] yanhua Huang says: for scan, is it better to use interpolate or fit with tolerance?
[10:55:21 PM] Dan Zwick says: Depends on what the purpose is.
[10:57:00 PM] Dan Zwick says: Why do you need to fit a curve to do straightness per unit length?
[10:57:15 PM] yanhua Huang says: for per unit line profile on scan, just slide per unit window based the fited curve
[10:57:22 PM] Dan Zwick says: The points are already in order.
[10:57:36 PM] Dan Zwick says: If they weren't you wouldn't be able to fit the curve.
[10:57:38 PM] yanhua Huang added Donald Turcotte to this chat
[10:57:49 PM] Dan Zwick says: Hi Don
[10:57:57 PM] Donald Turcotte says: Hi Dan
[10:58:17 PM] Dan Zwick says: I'm going to review Yanhua's curve code.
[10:59:08 PM] yanhua Huang says: Dan ask...
Why do you need to fit a curve to do line profile (scan) with per unit length?
[10:59:34 PM] Donald Turcotte says: Ok, We still have an issue 257774 with CPCDcurve since it doesn't implement get_points(...)
[11:00:18 PM] Dan Zwick says: I thought this had to do with straightness per unit length for a scan.
[11:00:24 PM] Donald Turcotte says: You don't need to fit a curve to do the line profile. I guess the question is why is there a CPCDcurve object?
[11:00:48 PM] Dan Zwick says: ?
[11:01:14 PM] Dan Zwick says: Are we doing straightness per unit length for a scan or for a curve?
[11:01:43 PM] Donald Turcotte says: I would think this should work for either.
[11:02:45 PM] Donald Turcotte says: Yanhua is working on profile per unit length (formonly) also.
[11:02:49 PM] Dan Zwick says: Ok, I withdraw my question. As soon as I finish building 4.4B I'll run the part program and review the code.
[11:03:25 PM] Donald Turcotte says: We still have 257161 which is Stop Release. This is the adjust filter problem which you were going to work on.
[11:03:56 PM] Donald Turcotte says: For some reason Tim, assigned this back to me, but I am not familiar with the adjust filer.
[11:04:30 PM] Dan Zwick says: Yes, I didn't have time last week. I can look at again starting tomorrow. I don't know why it's Stop Release, though. Those values are bad, but the final sphere is good.
[11:04:50 PM] Dan Zwick says: It just seems to be a dim prof problem.
[11:10:09 PM] yanhua Huang says: another question-
had we functions to sort meas points for arc, ellipse and polygon?
[11:11:21 PM] Dan Zwick says: Not that I know of. It's possible that the auto features do some sorting. The points for a curve are supposed to already be in order.
[11:12:11 PM] yanhua Huang says: if scan form is like "&", is it better to interpolate scan?
[11:15:39 PM] Dan Zwick says: It doesn't make any difference if the curve crosses itself as long as the points are in the right order. If there is a problems with the data then the curve fitting process can fix some of them, while the interpolating spline simply passes through all the points in the order given.
[11:17:32 PM] Dan Zwick says: However, if I understand things correctly you are using the spline solely for the purpose of figuring out which points lie inside the sliding window. For that a fitted curve is probably better. But I would use a reasonable percentage of the points for knots. I think the default percentage is 1/3.
[11:18:43 PM] Dan Zwick says: That should probably suffice.
[11:20:17 PM] Dan Zwick says: And I would use the options to fix the data and fix the knots, if available.
[11:22:24 PM] Dan Zwick says: Also, if the theo data and the meas data are close, you only need to compute a spline fit to the theo data. This assumes they aren't in different coordinate systems.
[11:22:46 PM] Dan Zwick says: A curve fit can take a long time.
[11:23:37 PM] yanhua Huang says: which function is spline fit?
[11:26:02 PM] Dan Zwick says: CPCDcurve::do_math?
[11:26:56 PM] Dan Zwick says: It calls fit_curve from the CSFit project.
[11:27:23 PM] Dan Zwick says: As far as I know the curve element of DSFit isn't used.
[11:29:32 PM] Dan Zwick says: Do I need to run this part program online? That is, do I need the debug file?
[11:30:19 PM] yanhua Huang says: How to set filter parameter to eliminate some measured points for per unit line profile (scan)?
[11:30:35 PM] yanhua Huang says: offline is OK
[11:31:02 PM] Dan Zwick says: k
[11:32:04 PM] Dan Zwick says: What kind of filter do you want to use?
[11:32:09 PM] yanhua Huang says: steps for per unit line profile xreation-
1) select scan
2) select "per unit" from combo box
3) create
[11:32:23 PM] yanhua Huang says: guass
[11:32:47 PM] yanhua Huang says: gauss
[11:32:56 PM] Dan Zwick says: Gauss will not work for general 3D scans.
[11:33:28 PM] yanhua Huang says: which filter should we use?
[11:33:59 PM] Dan Zwick says: Are you supposed to filter?
[11:34:43 PM] Dan Zwick says: I suppose if you wanted to you could use a Gauss linear filter, but that will affect the straightness. That's for the user to decide.
[11:35:54 PM] Dan Zwick says: Currently the Gauss linear filter for 3D lines just filters orthogonal to the workplane.
[11:37:10 PM] Dan Zwick says: If you really have to filter, I would try a filter width of 3.
[11:37:46 PM] Dan Zwick says: The larger the filter width the more smoothing takes place.
[11:38:34 PM] yanhua Huang says: just use filter to eliminate some measured points when slide per unit window. Compute line profile deviation using all measured points.What do you think?
[11:39:45 PM] Dan Zwick says: The Gauss filter only eliminates points at the ends. Other than that it replaces points with a weighted average of neighboring points.
[11:41:53 PM] yanhua Huang says: if contact measurement, it seems no role when use Gauss filter?
[11:42:51 PM] Dan Zwick says: ?
[11:45:00 PM] Dan Zwick says: Ok, I'm opening the test part program.
[11:47:44 PM] yanhua Huang says: I have to learn more knowledge about filters.
V44 donot use filters to eliminate some measured points for scan.
[11:48:16 PM] Dan Zwick says: Maybe we should discuss filters another time.
[11:48:44 PM] Dan Zwick says: Right now I'm having problems with 4.4B. It just froze up.
[11:52:17 PM] Dan Zwick says: BTW, where is the code that I'm supposed to review?
[11:53:37 PM] yanhua Huang says: Files inserted to server
------------------------
V44B\CONSFEAT\CURVE.CPP
V44B\INCLUDE\CURVE.H
V44B\INCLUDE\DIM_PROF.H
V44B\PCDSFIT\INCLUDE\geometry.h
V44B\PCDSFIT\SOURCE\STRAIGHTNESS2D.CPP
V44B\DIMENS\DIM_PROF.CPP
BOOL CPCDdim_profile::do_math_perunitarea_LineProfile_Curve()
[11:53:59 PM] Dan Zwick says: k
[11:55:32 PM] Dan Zwick says: I thought it was straightness per unit length for a scan, not straightness per unit area for a curve.
[11:57:06 PM] yanhua Huang says: is scan a kind of curve?
[11:57:39 PM] Dan Zwick says: I wouldn't consider it a curve. Not until you fit a curve to it. It's just a set of data.
[12:01:02 AM] yanhua Huang says: OK, change function name from do_math_perunitarea_LineProfile_Curve to
do_math_PerUnitLength_LineProfile_Scan |
|