View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0032817 | Open CASCADE | OCCT:Data Exchange | public | 2022-02-05 12:33 | 2023-03-19 18:52 |
| Reporter | dpasukhi | Assigned To | |||
| Priority | normal | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 7.6.0 | ||||
| Target Version | 7.7.0 | Fixed in Version | 7.6.2 | ||
| Summary | 0032817: Data Exchange, Step export - writing untrimmed curve | ||||
| Description | I am trying to export an untrimmed curve and the export process fails. There is a null parameterization reference, i.e. the write process returns an error. Example of the incorrect entity:
# 16 = TRIMMED_CURVE('',# 17,($ /* NUL REF */,PARAMETER_VALUE(
-2.E+100)),($ /* NUL REF */,PARAMETER_VALUE(2.E+100)),.T.,
.PARAMETER.);
| ||||
| Steps To Reproduce | XNewDoc D line l1 0 0 0 0 1 0 mkedge e1 l1 XAddShape D e1 WriteStep D res.stp | ||||
| Tags | No tags attached. | ||||
| Test case number | tests bugs step bug32817_1 bug32817_2 bug32817_3 | ||||
|
|
Branch CR32817 has been created by flatgern. SHA-1: d3e0b716a72247f4626e0226816f7d580acbdc35 Detailed log of new commits: Author: atychini Date: Mon Feb 7 15:57:38 2022 +0300 0032817: Data Exchange - Step export - writing untrimmed Curve Incorrect curve handling. If curve doesn't have trims and vertexes, we handle it such as trimmed curve, but it should be a simple curve. Curves with only one vertex and one trim should handle by another way, such as a curve that has trims but doesn't have vertexes. So I added conditions which handles these cases |
|
|
Branch CR32817 has been updated forcibly by flatgern. SHA-1: ec60bff37d682f912216813d82c664e170474298 |
|
|
Branch CR32817 has been updated forcibly by flatgern. SHA-1: e31dad7c7043d7a78aba3d51f21a16a90787a7ec |
|
|
Dear dpasukhi, please review branch CR32817 All tests are OK, see: http://jenkins-test-08.nnov.opencascade.com/view/CR32817-master-atychini/view/COMPARE/ |
|
|
I have some remarks+ if(aVFirst.IsNull() && aVLast.IsNull() && Precision::IsInfinite(aFirst) && Precision::IsInfinite(aLast)) + if (aVFirst.IsNull() && !Precision::IsNegativeInfinite(aFirst)) + if (aVLast.IsNull() && !Precision::IsPositiveInfinite(aLast)) There are different compression (2e100, 1e100). Please use limitation, that equals with void Bounding Box. + GeomToStep_MakeCartesianPoint aGTSMCP(gp_Pnt(aFirst, aFirst, aFirst)); + GeomToStep_MakeCartesianPoint aGTSMCP(gp_Pnt(aLast, aLast, aLast)); Creation of point is incorrect. You need to project a trim to the curve to get a point. + aSGC = GeomToStep_MakeCurve(aC).Value(); Checking for status(isDone) is necessary.
- Standard_Real First, Last;
- Handle(Geom_Curve) C = BRep_Tool::Curve(anEdge, First, Last);
- if ( ! C.IsNull() ) {
- if (C->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)))
- C = Handle(Geom_TrimmedCurve)::DownCast(C)->BasisCurve();
- GeomToStep_MakeCurve gtpC(C);
I think, that moving conversion to the base curve with creation is the best way.
+ if ( ! aC.IsNull() ) {
+ if (aC->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)))
+ aC = Handle(Geom_TrimmedCurve)::DownCast(aC)->BasisCurve();
+ GeomToStep_MakeCurve gtpC(aC);
Code style.
7 catch {Close D}
8 XNewDoc D
9 line l1 0 0 0 0 1 0
10 mkedge e1 l1
11 XAddShape D e1
12 WriteStep D $imagedir/${casename}.stp
13 file delete $imagedir/${casename}.stp
You need to tests all types of trimmed(create more test cases). Compare the base and written results. |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: 82f410c3950b9bfc7544711397485c2c84e30347 |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: 757ba73650469bcee7c678524eaac2dd8af7dd7b |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: b3ce644cd4e1511a6b63407e2a461ee8ecb1a391 |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: 1dff5555277de50f0e38985cd9713866c68ab08d |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: b3615b15b0582dff513c9059874c8f4eb650bf04 |
|
|
Dear dpasukhi, please review branch CR32817 All tests are OK, see: http://jenkins-test-08.nnov.opencascade.com/view/CR32817-master-atychini/view/COMPARE/ http://jenkins-test-08.nnov.opencascade.com/view/CR32817-master-atychini/view/TESTING/job/CR32817-master-atychini-OCCT-Windows-64-VC14-opt-test-restart/1/HTML_20Report/ http://jenkins-test-08.nnov.opencascade.com/view/CR32817-master-atychini/view/TESTING/job/CR32817-master-atychini-OCCT-Windows-64-VC14-opt-test-restart/2/HTML_20Report/ http://jenkins-test-08.nnov.opencascade.com/view/CR32817-master-atychini/view/TESTING/job/CR32817-master-atychini-OCCT-Debian80-64-opt-test-restart/HTML_20Report/ |
|
|
I have some remarks
aSGC = GeomToStep_MakeCurve(aC).Value();
if (!aSGC.IsNull())
{
theCurveList->Append(aSGC);
return Standard_True;
}
GeomToStep_MakeCurve need to be checked for a result (isDone)
// ---------------------------------------
// Translate 3D representation of the Edge
// ---------------------------------------
// Handle(Geom_Curve) C = CA.Curve().Curve();
// UPDATE FMA 26-02-96
// General remark : this full code should be deaply reworked
// Too many objects are not used !
Code has been moved in the incorrect place. It can be cleared or rewrite too. _ Please remove any tabulations in your code |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: d99f06e29a3e48631c7c651658f2ce571d673725 |
|
|
Dear dpasukhi, please review branch CR32817 All tests are OK, see: http://jenkins-test-occt.nnov.opencascade.com/view/CR32817-master-atychini/view/COMPARE/ |
|
|
aSGC = aGTSML.Value();
aSGC = MakeTrimmedCurve(aGTSML.Value(), aSGCP1, aSGCP2, 0, aLength, Standard_True);
// (anEdge.Orientation() == TopAbs_FORWARD));
}
aSGC = MakeTrimmedCurve(aPMSC, aSGCP1, aSGCP2, aTrim1, aTrim2, Standard_True);
// (anEdge.Orientation() == TopAbs_FORWARD));
}
Please remove the incorrect comment+ tabulations.
Standard_Boolean TopoDSToStep_WireframeBuilder::
GetTrimmedCurveFromEdge(const TopoDS_Edge& theEdge,
const TopoDS_Face& theFace,
MoniTool_DataMapOfShapeTransient& theMap,
Handle(TColStd_HSequenceOfTransient)& theCurveList) const
Please remove tabs |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: 7f92f8503d777c6386fd29a7a19d74c45fa6c6e1 |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: 8480f19ffc2d85d2db74f7dae206d3aaf89a1b95 |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: 45f1640140c4d56f2c813a0173995f67aeb96720 |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: 67a1d4d1133024357ca2c17e0f68d14258273715 |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: 15ddcbcc16bbaa51e7ae757e6c92ae906d073c1d |
|
|
Dear bugmaster, please integrate: OCCT: CR32817 PROD: NO |
|
|
Please split long comments in git commit description. Normally, one sentence per line.
+ TopExp_Explorer anExp;
+ for (anExp.Init(anEdge, TopAbs_VERTEX); anExp.More(); anExp.Next())
+ {
It is undesired declaring iterator outside of the for() header, when it is unused afterwards. + TopoDS_Vertex aVertex = TopoDS::Vertex(anExp.Value()); Redundant shape copy. + GeomToStep_MakeCurve aCurveMaker = GeomToStep_MakeCurve(aC); Redundant assignment.
+ if (theMap.IsBound(anEdge))
+ {
+ aSGC = Handle(StepGeom_Curve)::DownCast ( theMap.Find(anEdge) );
if (Handle(Standard_Transient)* aTransient = theMap.Seek (anEdge)) { aSGC = Handle(StepGeom_Curve)::DownCast (*aTransient); } |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: 54a2d7d19c5d5019bf21686da102f919647fcbda |
|
|
Dear dpasukhi, please review branch CR32817 All tests are OK, see: http://jenkins-test-occt.nnov.opencascade.com/view/CR32817-master-atychini/view/COMPARE/ |
|
|
Branch CR32817 has been updated forcibly by atychini. SHA-1: d19fb02c88294727bc57c314ac0e7e2a9de35aaa |
|
|
Dear bugmaster, please integrate: OCCT: CR32817 PROD: NO |
|
|
Combination - OCCT branch : IR-2022-03-18 master SHA - e720157864e4bb408d607298610b464977491228 49e51745631c52b6c452c65adae4d6dfa21a1b1e Products branch : IR-2022-03-18 SHA - 6db9c4d2fd384d381f9025284eac8b04e33ac8e8 was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 18487.460000000385 / 18395.730000000258 [+0.50%] Products Total CPU difference: 11709.300000000132 / 11708.150000000112 [+0.01%] Windows-64-VC14: OCCT Total CPU difference: 20412.546875 / 20350.609375 [+0.30%] Products Total CPU difference: 13181.25 / 13154.5625 [+0.20%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
|
Branch CR32817 has been deleted by mnt. SHA-1: d19fb02c88294727bc57c314ac0e7e2a9de35aaa |
|
occt: master 452ba192 2022-02-07 15:57:38
Committer: |
0032817: Data Exchange - Step export - writing untrimmed Curve Incorrect curve handling. If curve doesn't have trims and vertexes, we handle it such as trimmed curve, but it should be a simple curve. Curves with only one vertex and one trim should handle by another way, such as a curve that has trims but doesn't have vertexes. So I added conditions which handles these cases |
Affected Issues 0032817 |
|
| mod - src/TopoDSToStep/TopoDSToStep_WireframeBuilder.cxx | Diff File | ||
| add - tests/bugs/step/bug32817_1 | Diff File | ||
| add - tests/bugs/step/bug32817_2 | Diff File | ||
| add - tests/bugs/step/bug32817_3 | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2022-02-05 12:33 | dpasukhi | New Issue | |
| 2022-02-05 12:33 | dpasukhi | Assigned To | => dpasukhi |
| 2022-02-05 12:33 | dpasukhi | Description Updated | |
| 2022-02-07 16:08 | git | Note Added: 0106782 | |
| 2022-02-07 19:43 | git | Note Added: 0106784 | |
| 2022-02-07 19:54 | git | Note Added: 0106786 | |
| 2022-02-08 12:26 | dpasukhi | Assigned To | dpasukhi => AndreyLA |
| 2022-02-08 12:57 | dpasukhi | Assigned To | AndreyLA => user1100 |
| 2022-02-08 13:05 |
|
Assigned To | user1100 => user1110 |
| 2022-02-08 13:11 |
|
Assigned To | user1110 => dpasukhi |
| 2022-02-08 13:11 |
|
Status | new => resolved |
| 2022-02-08 13:11 |
|
Note Added: 0106796 | |
| 2022-02-10 11:23 | dpasukhi | Assigned To | dpasukhi => user1110 |
| 2022-02-10 11:23 | dpasukhi | Status | resolved => assigned |
| 2022-02-10 11:23 | dpasukhi | Note Added: 0106842 | |
| 2022-02-10 11:23 | dpasukhi | Note Edited: 0106842 | |
| 2022-02-11 17:20 | git | Note Added: 0106849 | |
| 2022-02-11 17:29 | git | Note Added: 0106850 | |
| 2022-02-12 09:47 |
|
Time allocated | 11.2.2022: 12 h. => set |
| 2022-02-14 10:59 | git | Note Added: 0106885 | |
| 2022-02-14 13:39 | git | Note Added: 0106889 | |
| 2022-02-14 15:43 | git | Note Added: 0106893 | |
| 2022-02-15 16:09 |
|
Assigned To | user1110 => dpasukhi |
| 2022-02-15 16:09 |
|
Status | assigned => resolved |
| 2022-02-15 16:09 |
|
Note Added: 0106907 | |
| 2022-02-16 15:41 | dpasukhi | Assigned To | dpasukhi => atychini |
| 2022-02-16 15:41 | dpasukhi | Status | resolved => assigned |
| 2022-02-16 15:41 | dpasukhi | Note Added: 0106935 | |
| 2022-02-16 15:41 | dpasukhi | Note Edited: 0106935 | |
| 2022-02-17 15:57 | git | Note Added: 0106948 | |
| 2022-02-17 18:49 |
|
Assigned To | atychini => dpasukhi |
| 2022-02-17 18:49 |
|
Status | assigned => resolved |
| 2022-02-17 18:49 |
|
Note Added: 0106950 | |
| 2022-02-18 17:22 | dpasukhi | Note Added: 0106963 | |
| 2022-02-18 17:23 | dpasukhi | Test case number | => tests bugs step bug32817_1 bug32817_2 bug32817_3 |
| 2022-02-18 17:30 | git | Note Added: 0106968 | |
| 2022-02-18 17:50 | git | Note Added: 0106969 | |
| 2022-02-18 19:09 | git | Note Added: 0106979 | |
| 2022-02-18 19:12 | git | Note Added: 0106980 | |
| 2022-02-20 20:15 |
|
Time allocated | 20.2.2022: 10 h. => set |
| 2022-02-28 17:00 | git | Note Added: 0107105 | |
| 2022-03-03 16:43 | dpasukhi | Assigned To | dpasukhi => bugmaster |
| 2022-03-03 16:43 | dpasukhi | Status | resolved => reviewed |
| 2022-03-03 16:43 | dpasukhi | Note Added: 0107170 | |
| 2022-03-03 21:12 | kgv | Note Added: 0107176 | |
| 2022-03-03 21:19 | dpasukhi | Assigned To | bugmaster => atychini |
| 2022-03-03 21:19 | dpasukhi | Status | reviewed => assigned |
| 2022-03-04 13:13 | git | Note Added: 0107184 | |
| 2022-03-11 14:33 |
|
Assigned To | atychini => dpasukhi |
| 2022-03-11 14:33 |
|
Status | assigned => resolved |
| 2022-03-11 14:33 |
|
Note Added: 0107265 | |
| 2022-03-11 14:38 | kgv | Note Edited: 0107176 | |
| 2022-03-17 15:51 | git | Note Added: 0107333 | |
| 2022-03-17 15:53 | dpasukhi | Assigned To | dpasukhi => bugmaster |
| 2022-03-17 15:53 | dpasukhi | Status | resolved => reviewed |
| 2022-03-17 15:53 | dpasukhi | Note Added: 0107334 | |
| 2022-03-17 19:23 | bugmaster | Project | Internal => Open CASCADE |
| 2022-03-19 10:20 |
|
Status | reviewed => tested |
| 2022-03-19 10:20 |
|
Note Added: 0107362 | |
| 2022-03-19 16:35 |
|
Changeset attached | => occt master 452ba192 |
| 2022-03-19 16:35 |
|
Assigned To | bugmaster => atychini |
| 2022-03-19 16:35 |
|
Status | tested => verified |
| 2022-03-19 16:35 |
|
Resolution | open => fixed |
| 2022-03-19 17:18 | git | Note Added: 0107369 | |
| 2023-03-19 18:52 | vglukhik | Status | verified => closed |
| 2023-03-19 18:52 | vglukhik | Fixed in Version | => 7.6.2 |