几何尺寸与公差论坛

 找回密码
 注册
查看: 114|回复: 1

PR 239636 Diminfo not updated after changing nominals on feature and related

[复制链接]
发表于 2009-3-5 00:14:19 | 显示全部楼层 |阅读模式
Diminfo not updated after changing nominals on feature and related dimensions

<< Alessandro Zanetti  --  04/06/06  16:16:15>>
Steps to reproduce:
Load the attached program.
Change the sphere diameter in the feature from 40 to 25.
Answer NO to change measured values.
Click on the Location command.
Answer YES to change nominals on related dimensions.

Results:
Nominal diameter is 25 in the Location but still 40 in the diminfo.
<<END>>


<< Ben Mathews  --  09/26/08  15:32:15>>
reviewed.
<<END>>
<< Changes made by Ben Mathews -- 09/26/08  15:32:25>>
Action:  Reporting Group to Alessandro Zanetti, Status:  REVIEW to RESOLVED
<<END>>
<< Changes made by Neil Kay -- 08/29/08  09:47:02>>
Action:  Matt Gotch to Reporting Group, Assigned:  Woody Anderson to Reporting Group
<<END>>
<< Changes made by Neil Kay -- 07/22/08  18:26:10>>
Action:  Bret Naylor to Matt Gotch
<<END>>
<< Woody Anderson  --  04/12/06  06:27:15>>
I changed update_fields() so that it updates diminfo's for dimensions that have changed as mentioned below
Files inserted to server
------------------------
V41B\EDITORS\EDITWIN.CPP
V42\EDITORS\EDITWIN.CPP
<<END>>
<< Changes made by Woody Anderson -- 04/12/06  06:27:23>>
Action:  Woody Anderson to Bret Naylor, Status:  OPEN to REVIEW
<<END>>
<< Woody Anderson  --  04/11/06  17:14:12>>
Found the cause, and made a fix.  We update dimensions when nominals are changed in a feature, but we don't update diminfo's after the dimensions are changed.
<<END>>
<< Woody Anderson  --  04/10/06  12:13:23>>
I can reproduce this with my own part program and am tracing through the cause now.
<<END>>
<< Changes made by Tim Wernicke -- 04/06/06  09:33:45>>
Priority:  to Critical
<<END>>
 楼主| 发表于 2009-3-5 00:18:57 | 显示全部楼层

回复: PR 239636 Diminfo not updated after changing nominals on feature and re

if (p->type() == DIMENSION_END_LOCATION || p->type() == DIMENSION_TRUE_END_POSITION)
                  {
                    //The only way I know of to find the start dimention command for this dimension is to loop
                    //backwards PR#239636
                    CPCDcommand *startOfDim = p;
                    while(startOfDim->type() != DIMENSION_START_LOCATION && startOfDim->type() !=DIMENSION_TRUE_START_POSITION )
                      startOfDim = startOfDim->prev;

                    //We're done with the dimension, but let's make sure there are no diminfo's associated with
                    //it.  They will need updating as well.
                    //Loop through remaining commands and callCreatetext on them if necessary.PR#239636
                    CPCDcommand *dinfo = p->next;
                    while(dinfo)
                    {
                      if(dinfo->is_dimensionInfo() && dinfo->use_pointer(startOfDim))
                      {
                        dinfo->CallCreateText(EW_LANGUAGE);               //call create text on this object
                        dinfo = NULL;
                      }
                      else
                        dinfo=dinfo->next;
                    }
                    break; // out of while (p)
                  }
                  //if(p->use_pointer(changed)) p->sbit(RECALC_NOMS);  // Done up above for dimensions only if user says it is ok. -- whb
                  if (pline >= 0)
                  {
                    m_EDITDEFAULT.global_grp_ptr = Obj[start_line].global_grp;
                    m_lCurLine = remove_obj_from_win(start_line, start_line);
                    SetCurColumn(0);
                    p->CallCreateText(EW_LANGUAGE);               //call create text on this object
                    end_global_group();
                  }
                  p = p->next;
                }
              }
            }
            else if (p->type() >= DIMENSION_BASIC_START && p->type() <= DIMENSION_BASIC_END)
            {

              if(p->type() == DIMENSION_BASIC_END)
              {
                //The only way I know of to find the start dimention command for this dimension is to loop
                //backwards
                CPCDcommand *startOfDim = p;
                while(startOfDim->type() != DIMENSION_BASIC_START)
                  startOfDim = startOfDim->prev;

                //We're done with the dimension, but let's make sure there are no diminfo's associated with
                //it.  They will need updating as well.
                //Loop through remaining commands and callCreatetext on them if necessary.
                CPCDcommand *dinfo = p->next;
                while(dinfo)
                {
                  if(dinfo->is_dimensionInfo() && dinfo->use_pointer(startOfDim))
                  {
                    dinfo->CallCreateText(EW_LANGUAGE);               //call create text on this object
                    dinfo = NULL;
                  }
                  else
                    dinfo=dinfo->next;
                }

              } // end if DIMENSION_BASIC_END
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-4-29 03:35 , Processed in 0.037692 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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