几何尺寸与公差论坛

 找回密码
 注册
查看: 120|回复: 2

PR261534 DimInfos do not update as expected if dimension changes

[复制链接]
发表于 2009-6-1 21:08:19 | 显示全部楼层 |阅读模式
DimInfos do not update as expected if dimension changes
<< Markus Steiner  --  05/01/09  17:03:56>>
please see avi clip, the dim info should show the updated value of the location, but it's not.
<<END>>
<< Don Turcotte (Change Sets)  --  05/26/09  15:59:39>>
Merged in V432.
Files inserted to server
------------------------
V432\DIMENS\START_LO.CPP
V432\DIMENS\TP_START.CPP
<<END>>
<< Changes made by Don Turcotte (Field Changes) -- 05/26/09  15:35:59>>
Action:  Don Turcotte to Yanhua Huang, Status:  OPEN to REVIEW
<<END>>
<< Changes made by Don Turcotte (Resolution Data) -- 05/26/09  15:35:49>>
** Bug Fix - Likely Exists in Previous Versions -  -  -  **
<<END>>
<< Don Turcotte (Change Sets)  --  05/26/09  15:35:08>>
Files inserted to server
------------------------
V44B\DIMENS\START_LO.CPP
V44B\DIMENS\TP_START.CPP
<<END>>
<< Don Turcotte (Development Notes)  --  05/26/09  15:34:56>>
I have fixed this in V44B for both Location dimension and legacy true position.  The problem was that the executeprivate method of the dimension did not update its sequence number, so the corresponding diminfo did not know that anything had changed.
I could not test this with FCF true position because the diminfo for FCF TP does not report the X,Y axes.  I filed PR#262113 about this.

<<END>>
<< Changes made by David Petrizze (Field Changes) -- 05/26/09  10:15:37>>
Action:  Reporting Group to Don Turcotte, Assigned:  Reporting Group to Don Turcotte
<<END>>
<< Changes made by Bret Naylor (Field Changes) -- 05/20/09  16:43:05>>
Priority:  Critical to Stop Rel.
<<END>>
<< Changes made by Tim Wernicke (Field Changes) -- 05/04/09  11:29:39>>
Action:  Tim Wernicke to Reporting Group, Assigned:   to Reporting Group, Priority:  to Critical
<<END>>
 楼主| 发表于 2009-6-1 21:12:30 | 显示全部楼层

回复: PR261534 DimInfos do not update as expected if dimension changes

int CPCDstart_location::executeprivate(int step_number, int mode)
{
  global_dimension = this;

  if(global_execute_mode && global_dmis_created_partprogram && featureid) // 225853 only applies to part programs translated from DMIS
  {
    if(!internal_dmis_feat_label.IsEmpty())
      DMISSearchExecList(m_pPartProgram, internal_dmis_feat_label, &featureid);
    else if(featureid)
      DMISSearchExecList(m_pPartProgram, featureid->get_id(), &featureid);
  }

  graphical_analysis();
  PrepareReportResults(); // Task#100972 - dturcotte

  // no need to draw_element here if !global_execute_mode or dimension wasn't updated in read_dialog
  if (global_execute_mode || get_dialog_read())
  {
    draw_element(TRUE);
  }
  set_dialog_read(FALSE);
  sequence = ++global_sequence; // PR261534 - so diminfo will know that it is out-of-date
  return 0;
}
 楼主| 发表于 2009-6-1 21:14:34 | 显示全部楼层

回复: PR261534 DimInfos do not update as expected if dimension changes

int CPCDtp_start_location::executeprivate(int /*step_number*/, int /*mode*/)
{
  global_dimension = this;

  if(global_execute_mode && global_dmis_created_partprogram && featureid) // 225853 only applies to part programs translated from DMIS
  {
    if(!internal_dmis_feat_label.IsEmpty())
      DMISSearchExecList(m_pPartProgram, internal_dmis_feat_label, &featureid);
    else if(featureid)
      DMISSearchExecList(m_pPartProgram, featureid->get_id(), &featureid);
  }

  // PR248672 - force a re-calculation of the XYZDRA etc. if required
  if( m_bRecalculate )
  {
    CPCDcommand * ptr = this->next;
    while (ptr && ptr->is_dim_tp_location_axis())
    {  // force a re-calculation of the XYZDRA etc. // PR258933 - never include nominals
      ptr->sequence = 0;
      ptr = ptr->next;
    }

    m_bRecalculate = FALSE;
  }

  // setup the datum ference object
  do_math();

  /*
  // If AXISBOTHENDS, add a new tp_start_location for STARTPT & ENDPT.
  // This should only happen once, when the text is created, because
  // this changes the use_axis to be AXISSTARTPT.
  if(use_axis == AXISBOTHENDS && featureid &&
  featureid->feature() == F_CYLINDER) {
  use_axis = AXISSTARTPT;
  CPCDcommand *p1,*end;
  end = this;
  while (end) {
  if(end->type() == DIMENSION_TRUE_END_POSITION) break;
  end = end->next;
  }
  p1 = (CPCDcommand *)new CPCDtp_start_location(0L,featureid,NULL,AXISENDPT,use_axis_ref_length);
  p1->next=(CPCDcommand *) new CPCDtp_end_location();
  if(p1->next) p1->next->prev=p1;
  p1->InsertAfter(end,TRUE);
  }
  */

  graphical_analysis();
  PrepareReportResults(); // Task#100972 - dturcotte

  // no need to draw_element here if !global_execute_mode or dimension wasn't updated in read_dialog
  if (global_execute_mode || get_dialog_read())
  {
    draw_element(TRUE);
  }
  set_dialog_read(FALSE);
  sequence = ++global_sequence; // PR261534 - so diminfo will know that it is out-of-date
  return 0;
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-22 18:49 , Processed in 0.036620 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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