|
Profiles are reporting in original alignment and not the alignment created from the results of the simultaneous evaluation
<< David Petrizze -- 07/06/07 11:50:53>>
Profiles are reporting in original alignment and not the alignment created from the results of the simultaneous evaluation
Results:
From Chad:
In the program, jump to “LAT_SAG” or “MED_SAG”. This is the portion of the program that contains what we discussed.
Also, look at the variables being assigned from the simultaneous evaluation. I have turned the rotation off via your supplied variable, yet the “ADEV” variable is being assigned a value other than zero. Give me a call if you need anything.
<<END>>
<< Changes made by Don Turcotte (Field Changes) -- 06/30/09 11:20:12>>
QA Team: Don Turcotte to *Yanhua Huang,*David Petrizze,*Don Ruggieri,*Wenfeng Shao,*Ping Fang, Status: OPEN to QA
<<END>>
<< Don Turcotte (Development Notes) -- 06/30/09 11:19:51>>
I have uploaded a fix to suppress "do not use search_id..." error messages when loading program in debug build.
<<END>>
<< Mercurial Server (Change Sets) -- 06-30-09 09:17:28>>
Repo: ReportingGroup
ID: 60850:d49106382485
User: Donald Turcotte <Donald.Turcotte@HexagonMetrology.com>
Date: Tue Jun 30 11:11:39 2009 -0400
<<END>>
<< Changes made by Don Turcotte (Field Changes) -- 06/23/09 10:26:00>>
Status: REVIEW to OPEN
<<END>>
<< Changes made by Don Turcotte (Field Changes) -- 06/23/09 10:23:57>>
Action: Yanhua Huang to Don Turcotte
<<END>>
<< Don Turcotte (Development Notes) -- 06/18/09 11:49:08>>
I have a fix for the issue of the messages when loading this program in debug mode. I have not uploaded since this PR is not Stop Release.
This PR should be added to backlog list.
<<END>>
<< Don Turcotte (Development Notes) -- 05/20/09 15:37:27>>
Regarding the issue of the messages when loading this program…
The following is the call stack that occurs when loading this program with FCF profile formonly (OPTIMIZED) commands. The basic issue is that CPCDdim_profile::Serialize(…) calls create_internal_alignment(…).
PCDLRN.exe!search_id(CPCDpart_program * ref_program=0x13f86088, const ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > & In_IdToFind="OPTIMIZETRANSONLY", int search_all=1, int search_all_mode=0, CPCDcommand * refcmd=0x00000000, int create_search_id=1, int is_sbl_owned=0) Line 2448 C++
PCDLRN.exe!CPCDcalc_feature::CreatesOrModifiesVar(const ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > & VarToTest="OPTIMIZETRANSONLY", int UseArrayPart=0, ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > & OutVar="", int & bIsStartPoint=-858993460, int & bIsValid=-858993460) Line 1473 + 0x1d bytes C++
PCDLRN.exe!CParseTree::CheckVar(CPCDcommand * refcmd=0x21059ec8) Line 2679 + 0x27 bytes C++
PCDLRN.exe!CheckStringForExpression(CPCDpart_program * m_pPartProgram=0x13f86088, const ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > & str="OPTIMIZETRANSONLY", const ATL::CStringT<wchar_t,StrTraitMFC_DLL<wchar_t,ATL::ChTraitsCRT<wchar_t> > > & default_str="0", CPCDcommand * pCmd=0x21059ec8) Line 24079 + 0x26 bytes C++
PCDLRN.exe!CPCDbf2d_align::Optimize(int nNumFeatsUsed=45, CBFItem * * & pBFFeats=0x2106a700, CTransform & matrix={...}) Line 2120 + 0x6a bytes C++
PCDLRN.exe!CPCDbf2d_align::do_math() Line 1364 + 0x1d bytes C++
PCDLRN.exe!CPCDbf2d_align::executeprivate(int step_number=1, int mode=0) Line 319 + 0x8 bytes C++
PCDLRN.exe!CPCDcommand::execute(int step_number=1, int mode=0) Line 1106 + 0x17 bytes C++
PCDLRN.exe!CPCDstart_align::do_math() Line 1940 + 0x17 bytes C++
PCDLRN.exe!CPCDdim_profile::create_internal_alignment(int set_as_global_align=0) Line 5649 + 0xe bytes C++
> PCDLRN.exe!CPCDdim_profile::Serialize(CArchive & archive={...}) Line 464 C++
PCDLRN.exe!CPCDFeatCtrlFrm::Serialize(CArchive & archive={...}) Line 849 + 0x13 bytes C++
PCDLRN.exe!CPCDpart_program::SerializeCommandIn(CPCDcommand * i_pCommand=0x21059ec8, CArchive & i_Archive={...}) Line 2551 + 0x16 bytes C++
PCDLRN.exe!CPCDpart_program::deserialize_objects(int DoNotCreateCADColl=0, int prbData=0) Line 4322 C++
The error message during loading in debug mode can be avoided by the following code changes in CPCDbf2d_align::Optimize(…):
BOOL bForceEvaluations = FALSE; // PR249040
BOOL bDeSerializeOp = FALSE;
if( m_pPartProgram )
{
bForceEvaluations = m_pPartProgram->m_bForceEvaluations; // PR249040
bDeSerializeOp = m_pPartProgram->m_DeSerializeOp;
m_pPartProgram->m_DeSerializeOp = FALSE; // suppress "do not use search_id..." error messages when calling CheckStringForExpression(...)
m_pPartProgram->m_bForceEvaluations = TRUE; // PR249040
}
if(_ttoi(CheckStringForExpression(m_pPartProgram, _T("OPTIMIZETRANSONLY"), _T("0"), m_pParent))>0) // PR249040
{
// this effectively forces the rotation domain to zero width
alpha = 0.0;
m_rotati = 0.0; // PR249040 - make sure the initial seed starts with no rotation
}
if( m_pPartProgram )
{
m_pPartProgram->m_DeSerializeOp = bDeSerializeOp;
m_pPartProgram->m_bForceEvaluations = bForceEvaluations; // PR249040
}
<<END>>
<< Don Turcotte (Review Notes) -- 05/20/09 09:47:37>>
Responded to Yanhua's e-mail questions:
"Yanhua,
Q1: The CheckStringForExpression function checks for an ASSIGN statement in the user's program that defines OPTIMIZETRANSONLY. The m_pPartProgram->m_bForceEvaluations flag is used to ensure that the ASSIGN statement expression is evaluated at the time of the call since expressions are normally evaluated only during program execution.
ASSIGN/OPTIMIZETRANSONLY=1
Q2: The method of serializing command pointers was changed several years ago to use SerializeCmdPtrAsUID. The error message is given only in debug mode. In this program, the messages are coming from CPCDcalc_feature::CreatesOrModifiesVar(…) so I don't think this is an issue (from CheckStringForExpression which is evaluating the ASSIGN statements). Dave could provide more info here.
Q3: The ADEV variable refers to the
ASSIGN/ADEV=GETTEXT(149, 1, {MED_SAG})
In the user's program. The 149 refers to a DTYPE (Dtypes.h file). This is ANGLE_OFFSET in the BF2D_Ali.cpp. The GETTEXT(…) will call get_data(…) in the CPCDbf2d_align_ali command. The other GETEXT(74…) calls refer to F_OFFSET.
"
<<END>>
<< Yanhua Huang (Development Notes) -- 05/20/09 21:16:24>>
Fixed the crash.
if (tip && tip->IsNCSensor()) // PR249040 - yanhua - 05-20-2009
******************************
Wed May 20 21:12:41 2009
******************************
Files inserted to server
------------------------
V44B\INTERFAC\INTERFAC.CPP
<<END>>
<< Yanhua Huang (Review Notes) -- 05/20/09 21:15:20>>
Found a crash.
1. open 5764_016_51_GRND.PRG in V44B & offline without probe
2. only mark "LAT_SAG "
LAT_SAG =SIMULTANEOUS/FCFPROF4,FCFPROF5,FCFPROF6,,
3. put cursor in the line of 'LAT_SAG' (edit window)
4. Ctrl+E
result: got a crash because call tip->IsNCSensor(), but tip = NULL
<<END>>
<< Changes made by Yanhua Huang (Field Changes) -- 05/19/09 16:22:28>>
Action: Wade Burton to Yanhua Huang
<<END>>
<< Changes made by Neil Kay -- 07/23/08 12:00:30>>
Action: David Petrizze to Wade Burton
<<END>>
<< Don Turcotte -- 07/09/07 15:49:52>>
I have resolved the issue with OPTIMIZETRANSONLY=1 but the ADEV variable is being assigned a value other than zero. The call to CheckStringForExpression was not seeing the ASSIGN so the fit was being evaluated without rotations being constrained. This is now fixed in V42beta and V43B.
Files inserted to server
------------------------
V42\ALIGNMNT\BF2D_ALI.CPP
V42\DIMENS\DIM_PROF.CPP
V42\DIMENS\FEATCTRLFRM.CPP
V42\DIMENS\SIMULTANEOUS_EVALUATION.CPP
V42\INCLUDE\BF2D_ALI.H
V42\INCLUDE\DIM_PROF.H
V43B\ALIGNMNT\BF2D_ALI.CPP
V43B\DIMENS\DIM_PROF.CPP
V43B\DIMENS\FEATCTRLFRM.CPP
V43B\DIMENS\SIMULTANEOUS_EVALUATION.CPP
V43B\INCLUDE\BF2D_ALI.H
V43B\INCLUDE\DIM_PROF.H
<<END>>
<< Changes made by Don Turcotte -- 07/09/07 15:50:11>>
Action: Don Turcotte to David Petrizze, Status: OPEN to REVIEW
<<END>>
<< Don Turcotte -- 07/06/07 17:27:17>>
The issue with the alignment that uses the Simultaneous XDEV, YDEV, not affecting the profile results is that the alignment cad2parts and machine2parts are both modified by the alignment translation, so this has no net effect on the legacy profile formandlocation. If you create a generic point with nominal value 0,0,0 and measured value XDEV, YDEV, ZDEV (from the simultaneous evaluation), then create a new alignment and translate to this point, the legacy profile dimension formandlocation will now show a difference.
The issue with the ADEV not being 0 seems to be a sequencing problem. When the program is loaded, the simultaneous evalution does not de-serialize the angle value. This is done when do_math is finally called, but do_math is not called until create_text(...) is called on the simultaneous evaluation command. At this point the current command is the last command in the program (not the simultaneous evaluation command) so the call to CheckStringForExpression to find OPTIMIZETRANSONLY fails.
<<END>> |
|