几何尺寸与公差论坛

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

PR #252820 Construct a curve feature using a Scan feature from an attached pr

[复制链接]
发表于 2008-3-19 10:00:05 | 显示全部楼层 |阅读模式
Construct a curve feature using a Scan feature from an attached program, I get an application error.
<< Don Ruggieri  --  01/22/08  13:04:51>>
data is in 01222008_02a.zip and also in 01222008_02b.zip.  When I try to construct a curve feature using a Scan feature from an attached program, I get an application error.
Steps to reproduce:
In the Constructions part of the v4.3 test plan, instructions indicate -
Test the ability to access features from the Constructed Features dialog of an attached part program.
I had written a larg eprogram called Constructions_07 and then a new small program called Test.prg.  I attached the former to the latter, and tested some constructions.  I can construct many features from individual point features.  I can even construct Circles, lines, spheres. and ellipses from existing scans.
Results:
When I try to construct a curve feature from a single scan feature (SCN_CRV1) in the attached program, I get an application error.
<<END>>
 楼主| 发表于 2008-3-19 10:00:19 | 显示全部楼层

回复: PR #252820 Construct a curve feature using a Scan feature from an attac

<< Andy Roberts  --  02/19/08  13:57:14>>
Reviewed.

<<END>>

<< Changes made by Andy Roberts -- 02/19/08  13:57:20>>
Action:  Andy Roberts to Troy Johnson
<<END>>

<< Dan Zwick  --  01/25/08  16:30:54>>
Uploaded to 4.4B, too.
<<END>>

<< Dan Zwick  --  01/25/08  14:33:01>>
I uploaded the corresponding files to 4.2, 4.2R, and 4.3B.
<<END>>

<< Dan Zwick  --  01/25/08  10:27:55>>
Fixed. The problem was that the features of an attached part program are search ids, so I had to add some code so the test for the validity of inputs to a curve could handle this. Files uploaded so far:
V43R\CONSFEAT\CURVE.CPP
V43R\INCLUDE\BASESCAN.H
V43R\INCLUDE\COMMAND.H
V43R\INCLUDE\SEARCHID.H
V43R\SOURCE\SEARCHID.CPP
<<END>>

<< Changes made by Dan Zwick -- 01/25/08  10:52:17>>
Action:  Dan Zwick to Andy Roberts, Status:  OPEN to REVIEW
<<END>>

<< Dan Zwick  --  01/23/08  13:54:57>>
It looks like the problem occurs when constructions_07.prg is attached to test.prg. In validating the input to the curve it checks a field m_COPID, which is present in scans. But when the scan from the attached part program is used as input, in the form CS1::scan_01, it is not a scan but a search_id. I think the problem is that it is then missing this field and returns a bad pointer when checked, causing a crash. It does not crash if I simply construct the same curve in the original part program (i.e., without attaching). It will be necessary in this case to get the underlying feature if the input is a search_id.
<<END>>

<< Tim Wernicke  --  01/22/08  14:22:25>>
I can reproduce this.
<<END>>

<< Changes made by Tim Wernicke -- 01/22/08  14:22:45>>
Action:  Andy Roberts to Dan Zwick, Assigned:  Andy Roberts to Dan Zwick, Priority:  to Stop Rel.
<<END>>
 楼主| 发表于 2008-3-19 10:20:56 | 显示全部楼层

回复: PR #252820 Construct a curve feature using a Scan feature from an attac

1. V43R\CONSFEAT\CURVE.CPP   
if (!cmd->GetCOPID().IsEmpty())

2.V43R\SOURCE\SEARCHID.CPP
CString CPCDsearch_id::GetCOPID()
{
  search_for_it();
  if (m_cmd)
    return m_cmd->GetCOPID();
  return _T("");
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-22 18:52 , Processed in 0.037367 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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