几何尺寸与公差论坛

 找回密码
 注册
查看: 64|回复: 0

PR 252641 Vision Slot Feature with Manual Target type, after execute the feat

[复制链接]
发表于 2009-5-6 00:20:04 | 显示全部楼层 |阅读模式
Vision Slot Feature with Manual Target type, after execute the feature, the Theo and Actual angle vector value is totally different
<< Yan Zhou  --  01/14/08  23:09:26>>
As described in Summary. See attached document for more detail.
<<END>>
<< Jared Hess (Development Notes)  --  04/08/09  22:24:38>>
This has been addedtoreadme for v44 (or ignored if internal item).
<<END>>
<< Yan Zhou  --  03/04/08  08:48:54>>
Close.
<<END>>
<< Changes made by Yan Zhou -- 03/04/08  08:49:04>>
Status:  RESOLVED to CLOSED
<<END>>
<< Changes made by Neil Kay -- 03/04/08  09:37:35>>
Action:  Neil Kay to Yan Zhou, Status:  REVIEW to RESOLVED
<<END>>
<< Yan Zhou  --  03/03/08  22:57:11>>
Yes, Dan deletes the array.
<<END>>
<< Changes made by Yan Zhou -- 03/03/08  22:57:23>>
Action:  Yan Zhou to Neil Kay
<<END>>
<< Neil Kay  --  03/03/08  16:54:56>>
Reviewed. I'm assuming Dan deletes the array? If so, I'm ok to close this if you're happy it now works.
<<END>>
<< Changes made by Neil Kay -- 03/03/08  16:55:02>>
Action:  Neil Kay to Yan Zhou
<<END>>
<< Yan Zhou  --  02/26/08  11:09:54>>
Thanks, Neil.
I've added the line of code and uploaded.
Files inserted to server
------------------------
V43B\AUTOFEAT\AFSUPPORTVISION.CPP
V43R\AUTOFEAT\AFSUPPORTVISION.CPP
V44B\AUTOFEAT\AFSUPPORTVISION.CPP
<<END>>
<< Changes made by Yan Zhou -- 02/26/08  11:12:39>>
Action:  Dan Zwick to Neil Kay
<<END>>
<< Changes made by Yan Zhou -- 02/26/08  11:10:21>>
Action:  Yan Zhou to Dan Zwick, Product:  MMRE to PC-DMIS
<<END>>
<< Dan Zwick  --  02/26/08  08:41:11>>
Could you change this back to the appropriate version of PC-DMIS, please? I seem to have screwed it up by mistake.
<<END>>
<< Dan Zwick  --  02/26/08  08:27:00>>
I do free the corners array.
<<END>>
<< Neil Kay  --  02/26/08  14:29:55>>
Reviewed,
I think you are missing an UnlockNominalForm() in AFSUPPORTVISION.CPP, and it seems there may be a memory leak in BEST_SLOT.CPP as it's not freeing up the indices array after use (unless Dan Frees it?)
<<END>>
<< Changes made by Neil Kay -- 02/26/08  14:30:00>>
Action:  Neil Kay to Yan Zhou
<<END>>
<< Yan Zhou  --  02/25/08  16:39:41>>
I've uploaded my changes to V43b, V43R and V44b.
******************************
Mon Feb 25 16:32:54 2008
******************************
Files inserted to server
------------------------
V43B\AUTOFEAT\AFSLOTNOTCHVISION.CPP
V43B\AUTOFEAT\AFSLOTVISION.CPP
V43B\AUTOFEAT\AFSUPPORTVISION.CPP
V43B\CONSFEAT\BEST_SLOT.CPP
V43B\INCLUDE\AFSLOTNOTCHVISION.H
V43B\INCLUDE\AFSLOTVISION.H
V43B\INCLUDE\AFSUPPORTGENERIC.H
V43B\INCLUDE\AFSUPPORTVISION.H
V43B\INCLUDE\COMMAND.H
V43R\AUTOFEAT\AFSLOTNOTCHVISION.CPP
V43R\AUTOFEAT\AFSLOTVISION.CPP
V43R\AUTOFEAT\AFSUPPORTVISION.CPP
V43R\CONSFEAT\BEST_SLOT.CPP
V43R\INCLUDE\AFSLOTNOTCHVISION.H
V43R\INCLUDE\AFSLOTVISION.H
V43R\INCLUDE\AFSUPPORTGENERIC.H
V43R\INCLUDE\AFSUPPORTVISION.H
V43R\INCLUDE\COMMAND.H
V44B\AUTOFEAT\AFSLOTNOTCHVISION.CPP
V44B\AUTOFEAT\AFSLOTVISION.CPP
V44B\AUTOFEAT\AFSUPPORTVISION.CPP
V44B\CONSFEAT\BEST_SLOT.CPP
V44B\INCLUDE\AFSLOTNOTCHVISION.H
V44B\INCLUDE\AFSLOTVISION.H
V44B\INCLUDE\AFSUPPORTGENERIC.H
V44B\INCLUDE\AFSUPPORTVISION.H
V44B\INCLUDE\COMMAND.H
<<END>>
<< Changes made by Yan Zhou -- 02/25/08  16:40:23>>
Action:  Yan Zhou to Neil Kay, Status:  RESOLVED to REVIEW
<<END>>
<< Dan Zwick  --  02/25/08  11:00:22>>
I uploaded to 4.3B as well.
<<END>>
<< Changes made by Dan Zwick -- 02/25/08  11:04:09>>
Category:  AutoFeature to , Action:  Dan Zwick to Yan Zhou, Status:  OPEN to RESOLVED, Product:  PC-DMIS to MMRE
<<END>>
<< Dan Zwick  --  02/22/08  17:26:39>>
I've uploaded to 4.3R (so far).
<<END>>
<< Tim Wernicke  --  02/22/08  11:05:22>>
Yes, please go ahead Dan.  Thanks.
<<END>>
<< Changes made by Tim Wernicke -- 02/22/08  11:05:29>>
Action:  Tim Wernicke to Dan Zwick, Priority:  Critical to Stop Rel.
<<END>>
<< Neil Kay  --  02/22/08  09:17:29>>
Tim, ok to put in the release? Otherwise, our slots measured with crosshairs just don't work anymore.
<<END>>
<< Changes made by Neil Kay -- 02/22/08  09:17:35>>
Action:  Neil Kay to Tim Wernicke
<<END>>
<< Yan Zhou  --  02/21/08  20:50:21>>
Neil,
I've added needed code in V44b to use Dan's new code change to use Corners information. I've tested on both SquareSlot and Notch Slot, they works great.
So can we ask Tim's permission to have Dan merge and upload his changes to both V43b and V43R, so I can download and merge my changes into V43b and V43R and upload?
Yan
<<END>>
<< Changes made by Yan Zhou -- 02/21/08  20:50:48>>
Action:  Yan Zhou to Neil Kay
<<END>>
<< Dan Zwick  --  02/21/08  09:59:33>>
Sorry, I forgot to add the corners argument to DSFit. I've done that and uploaded again.
Files uploaded:
V44B\PCDSFIT\INCLUDE\DSFIT.H
V44B\PCDSFIT\SOURCE\DSFIT.CPP
and dependencies.
<<END>>
<< Changes made by Dan Zwick -- 02/20/08  15:52:53>>
Action:  Dan Zwick to Yan Zhou
<<END>>
<< Dan Zwick  --  02/20/08  15:51:50>>
I uploaded to 4.4B. You will have to allocate an int * array Corners to pass into DSFit via the function Arrays. The first element should be 0 and the last element should be the number of input points. Other than that, each element is the index of the start of a segment. This array will be deleted by DSFit and its address set to NULL (I could change this if it is inconvenient). I have also changed the segmentation tolerance for cases where no corners array is input to recognize corners where the change in direction isn’t so sharp. In case corners are supplied, the function that computes an initial slot now computes the smallest enclosing rectangle, one of whose sides is along the line between the first point and the last point on the first segment (using the corners array), rather than between the first and second points. This should give a better estimate in cases where the first two points are close together (as in a scan).
Files uploaded:
V44B\PCDSFIT\INCLUDE\CDSFIT.H
V44B\PCDSFIT\INCLUDE\DSFITSSLOT2D.H
V44B\PCDSFIT\SOURCE\DSFIT.CPP
V44B\PCDSFIT\SOURCE\DSFITUTIL.CPP
V44B\PCDSFIT\SOURCE\SSLOT2D.CPP
and dependencies for both the debug and release configurations.
<<END>>
<< Dan Zwick  --  02/20/08  13:18:11>>
After consulting with Yan and Neil, I will make some changes to PCDSFit so that the indices of the corners can be input to DSFit. This should solve the problems we've been having in computing the initial slot.
<<END>>
<< Dan Zwick  --  02/18/08  11:31:13>>
Hi Yan, can you send me an example where data segmentation with 2 points on each side fails? One way to guarantee a good segmentation is to pass in hit vectors that are perpendicular to the appropriate sides. Some cases will always be hard to segment. For instance, if points on successive sides are very close to the corner then there won't be a sharp difference on the slope of the piecewise linear curve connecting them so the corner might not be identified until the next point. If in your case you already know where the corners are, we can skip this entire stage. That would be a good solution to this problem.
<<END>>
<< Yan Zhou  --  02/18/08  09:48:40>>
Following comments also sent to Dan via email.
I had worked on PR252641 further on last Friday,  I found the cause of the problem.
In Best_Fit_Slot class, it calls CDSFitSSlot2D::computer_fit() function, inside this function there is a section of code that is used to break points into number of sections, and m_nCorners array is used to store starting point index for each side of the slot feature. There are three conditions for feature with limited number of points: i) only 4 points and it is a notch, ii) 5 points and it is square slot, iii) 6 points and it is a square slot. For all other situations, it will get into a section of code to do the data segmentation. For Vision Square Slot, we have 8 points as default, 2 points for each side of the square slot. For Vision Notch Slot, we have 6 points as default, 2 points for each side of the Notch slot. So with our 8 points manual targets square slot, sometimes the data segmentation end up with m_nCorner[0] = 0, m_nCorner[1] = 3, m_nCorner[2] = 5 and m_nCorner[3] = 7(when it should be m_nCorner[0] = 0, m_nCorner[1] = 2, m_nCorner[2] = 4 and m_nCorner[3] = 6), so that end up with the slot vector difference between theo and measure, as well as width and length difference between theo and measure.
Also as mentioned above, that Vision Square Slot has 8 points by default, Vision Notch Slot has 6 points by default. However, user are allowed to add or delete targets on any side as they see fit. So we may have different number of manual targets on each side of slot feature. With those limited number of points, it is hard for data segmentation to correctly segment the data correctly for every situation. So, how can we solve this problem? Can we pass in data with segmentation information?
<<END>>
<< Changes made by Yan Zhou -- 02/18/08  09:48:59>>
Action:  Yan Zhou to Dan Zwick
<<END>>
<< Dan Zwick  --  02/12/08  09:10:17>>
I can take a look at this, but if this is something that only happens during execution then I will need the debug file so I can run the part program in simulated online mode.
<<END>>
<< Changes made by Neil Kay -- 02/12/08  11:24:12>>
Status:  MOREINFO to OPEN
<<END>>
<< Christian Furnival  --  02/11/08  18:53:36>>
Yan,
This also happens on the Visio with the latest 43RC.
I have attached a PP, PRB file and a screen shot of the slot. Neil requested these for Dan.

<<END>>
<< Changes made by Christian Furnival -- 02/11/08  18:53:59>>
Action:  Christian Furnival to Yan Zhou
<<END>>
<< Changes made by Neil Kay -- 01/29/08  09:38:41>>
Action:  Neil Kay to Christian Furnival
<<END>>
<< Yan Zhou  --  01/28/08  17:00:33>>
Hi Neil,
I spent several hour to test this on both V44b and V43R, it seems that I cannot see problem in offline or MSS. But I still see problem with Onyx, especially with square slots which has Length and Width pretty close. Can you have somebody to test this on a Visio machine? Thanks.
Yan
<<END>>
<< Changes made by Yan Zhou -- 01/28/08  17:00:48>>
Action:  Yan Zhou to Neil Kay
<<END>>
<< Neil Kay  --  01/28/08  10:07:11>>
Yan, please retest, and if you can duplicate, provide Dan with partoprogra/probe etc. Thanks.
<<END>>
<< Changes made by Neil Kay -- 01/28/08  10:07:12>>
Action:  Vision Group to Yan Zhou
<<END>>
<< Dan Zwick  --  01/25/08  15:53:44>>
If you are still having problems of this kind with the latest RC, and the slots are measured as described below, please post a part program, cad file, and probe file and I will take a look.
<<END>>
<< Changes made by Dan Zwick -- 01/25/08  15:53:49>>
Action:  Dan Zwick to Vision Group, Status:  OPEN to MOREINFO
<<END>>
<< Dan Zwick  --  01/21/08  08:59:01>>
Sure. There have been some changes to the slot code recently that affect both round slots and square slots (the hit vectors were being generated incorrectly). Have you tried this with the latest RC? Other than this, please keep in mind that the points must be measured either clockwise or counterclockwise around the sot. If probe comp is used it is important that the hit vectors be approximately normal to the edge. In the case of 5 or 6 points you need to measure 2 points on the first side, then in the pattern 1,1,1 or 1,2,1. Maybe Vision slots have special properties that I am not aware of. I'll try to step through the code and see what's happening.
<<END>>
<< Neil Kay  --  01/19/08  19:13:09>>
Hi Dan, any chance you can take a look?
<<END>>
<< Changes made by Neil Kay -- 01/19/08  19:13:10>>
Action:  Neil Kay to Dan Zwick
<<END>>
<< Yan Zhou  --  01/18/08  15:53:43>>
Hi Neil,
I've investigated this PR. It seems to me, the CPCDbest_fit_slot code we use in CPCDAFSlotVision::do_math(int theo_or_meas, int search) doesn't work well when we only have two points on each side of slot for manual target. I also see the same CPCDbest_fit_slot is used in CPCDAFSlotSquareContact::do_math(), if those contact slot feature has very few points(such as 2) on each side, I image it should happen there to. So it maybe better for programmer who is familiar with the CPCDbest_fit_slot code to look into it.
Note: it doesn't happen to V42r since V42R doesn't use CPCDbest_fit_clot.
Yan
<<END>>
<< Changes made by Yan Zhou -- 01/18/08  15:54:24>>
Action:  Vision Group to Neil Kay
<<END>>
<< Changes made by Neil Kay -- 01/15/08  10:36:45>>
Priority:  to Critical
<<END>>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2025-1-3 10:30 , Processed in 0.039743 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表