View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023881 | Community | OCCT:Modeling Algorithms | public | 2013-04-05 15:55 | 2013-04-29 15:24 |
Reporter | Hayashi | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2010 | ||
Target Version | 6.6.0 | Fixed in Version | 6.6.0 | ||
Summary | 0023881: BRepAlgoAPI_Section HasAncestorFaceOn1 returned False on the boundary(6.6.0 beta) | ||||
Description | Post from the Forum - http://www.opencascade.org/org/forum/thread_24614/?forum=6 6.6.0 beta returned False. 6.5.x returned True. void test1() { TopoDS_Wire w1 = BRepBuilderAPI_MakePolygon(gp_Pnt(0,0,0),gp_Pnt(1,0,0),gp_Pnt(1,1,0),gp_Pnt(0,1,0), 1); TopoDS_Wire w2 = BRepBuilderAPI_MakePolygon(gp_Pnt(0,1,0),gp_Pnt(1,1,0),gp_Pnt(1,2,0),gp_Pnt(0,2,0), 1); TopoDS_Face f1 = BRepBuilderAPI_MakeFace(w1,1); TopoDS_Face f2 = BRepBuilderAPI_MakeFace(w2,1); BRepBuilderAPI_Sewing sew(0.0001); sew.Add(f1); sew.Add(f2); sew.Perform(); TopoDS_Shape s1 = sew.SewedShape(); gp_Pln pl(gp_Pnt(0,1,0), gp_Dir(0,1,0)); TopoDS_Face f3 = BRepBuilderAPI_MakeFace(pl); BRepAlgoAPI_Section sec(s1, f3, 0); sec.ComputePCurveOn1(1); sec.Approximation(1); sec.Build(); TopExp_Explorer exp; exp.Init(sec.Shape(), TopAbs_EDGE); for (exp; exp.More(); exp.Next()){ TopoDS_Shape edge = exp.Current(); TopoDS_Shape face; if (sec.HasAncestorFaceOn1(edge, face)) std::cout << "True "; else std::cout << "False "; } } | ||||
Additional information and documentation updates | Changes: In classes BRepAlgo_Section and BRepAlgoAPI_Section methods HasAncestorFace* now return true only if <E> is a new edge built on intersection curve of the face. Methods PCurveOn1() and PCurveOn2() have been removed; the pcurve can be obtained from the ancestor face by methods of BRep_Tool class. | ||||
Tags | No tags attached. | ||||
Test case number | bugs modalg_5 bug23881 | ||||
|
I believe the current behavior is consistent with documentation of the method HasAncestorFaceOn1(); it says that it returns False if its first argument is common edge (i.e. not intersection curve). In the described case the secant plane goes exactly through the common edge of the two faces of s1, and this edge is returned as result of the section. Eugene, please comment on this (check in the code please; I have checked in DRAW and it seems the same in OCCCT 6.5.x and 6.6.0, see attached test script). |
2013-04-05 17:03 manager |
bug23881 (628 bytes) |
|
test.cpp (6,342 bytes) |
|
Also in other patterns, the result differed in 6.6.0 beta and a previous version. Please check attached test.cpp. If behavior of 6.6.0 beta is specification, I think that I have to return False all patterns in test1() [test.cpp]. |
|
The methods HasAncestorFaceOn1() and HasAncestorFaceOn2() should return true only in the case when the first argument is the new edge built from intersection curve and not an existing common edge. So it is the correct behavior of the method HasAncestorFaceOn1() for the described case. But for the shapes f1 and f2 polyline w1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 0 polyline w2 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0 mkplane f1 w1 mkplane f2 w2 it returns true and should be fixed. |
|
Git branch CR23881 contains fix for the problem. Please review. |
|
I have no remarks on the proposed change; in addition I believe that methods BRepAlgo_Section::PCurveOn1() and BRepAlgoAPI_Section::PCurveOn1() should be removed since the curve they return has meaning only in context of the face, but the face is not returned. If you have face obtained by call to HasAncestorFace...(), you can easily get pcurve from it without any speciel methods in *Section classes. Please give your opinion. P.S. Methods PCurveOn1() seem to be not used anywhere (at least in OCCT code), thus removal should be painless. |
|
I agree with proposed by emv change and with proposal of abv to remove rather useless methods PCurveOn1(2)(), which is only envelop for BRep_Tool::CurveOnSurface(anEdge, aFace, f, l) |
|
I have removed PCurveOn1(),PCurveOn2() methods. Please review. http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commit;h=6840f0808fac74ba305bd411d8034809d3f52c45 |
|
No remarks; I have also removed the methods PCurveOn1,2() in BRepAlgo_Section class. Please test |
|
Just to be sure: will HasAncestorFaceOn2() return true in the reported case? I suppose it should |
|
I understood that HasAncestorFaceOn1 return false when curve(BRep_Tool::Curve()) of section edge and one of edges of first or second argument of BRepAlgoAPI_Section is equal. (return true when section edge built from new intersection curve) BRepAlgoAPI_BooleanOperation SectionEdges() also differs from a previous version. |
|
Dear BugMaster, Branch CR23881 (and products from GIT master) was compiled on Linux and Windows platforms and tested without rebase. SHA-1: 37f276ac0bff60f048c3d693c24ed120f8387746 Number of compiler warnings: occt component : Linux: 2 (2 on master) Windows: 11 (11 on master) products component : Linux: 0 (0 on master) Windows: 50 (50 on master) Regressions: No regressions Improvements: No improvements Testing cases: bugs modalg_5 bug23881 - OK Testing on Linux: Total MEMORY difference: 244104448 / 244820060 Total CPU difference: 13863.009999999735 / 19944.459999999734 Testing on Windows: Total MEMORY difference: 354121656 / 355780572 Total CPU difference: 17640.234375 / 20811.84375 There are not serious differences in images found by testdiff. |
occt: master 7a9d451a 2013-04-15 14:19:01
|
0023881: BRepAlgoAPI_Section HasAncestorFaceOn1 returned False on the boundary(6.6.0 beta). The methods HasAncestorFaceOn1() and HasAncestorFaceOn1() return true only in the case when their first argument is the new edge built from intersection curve and not an existing common edge. PCurveOn1() and PCurveOn2() have been removed. Methods PCurveOn1() and PCurveOn2() removed from BRepAlgo_Section class. Added test case bugs/modalg_5/bug23881 |
Affected Issues 0023881 |
|
mod - src/BRepAlgo/BRepAlgo_Section.cdl | Diff File | ||
mod - src/BRepAlgo/BRepAlgo_Section.cxx | Diff File | ||
mod - src/BRepAlgoAPI/BRepAlgoAPI_Section.cdl | Diff File | ||
mod - src/BRepAlgoAPI/BRepAlgoAPI_Section.cxx | Diff File | ||
add - tests/bugs/modalg_5/bug23881 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-04-05 15:55 | Hayashi | New Issue | |
2013-04-05 15:55 | Hayashi | Assigned To | => jgv |
2013-04-05 17:03 |
|
Note Added: 0024020 | |
2013-04-05 17:03 |
|
Assigned To | jgv => emv |
2013-04-05 17:03 |
|
Status | new => assigned |
2013-04-05 17:03 |
|
File Added: bug23881 | |
2013-04-05 17:07 |
|
Status | assigned => feedback |
2013-04-09 09:27 | Hayashi | File Added: test.cpp | |
2013-04-09 09:28 | Hayashi | Note Added: 0024033 | |
2013-04-09 13:01 |
|
Note Added: 0024039 | |
2013-04-09 13:34 |
|
Note Added: 0024042 | |
2013-04-09 13:34 |
|
Assigned To | emv => abv |
2013-04-09 13:34 |
|
Status | feedback => resolved |
2013-04-09 13:34 |
|
Additional Information Updated | |
2013-04-09 15:32 |
|
Assigned To | abv => ifv |
2013-04-09 15:56 |
|
Note Added: 0024053 | |
2013-04-09 15:58 |
|
Note Edited: 0024053 | |
2013-04-09 17:17 |
|
Note Added: 0024056 | |
2013-04-09 17:17 |
|
Assigned To | ifv => emv |
2013-04-09 17:17 |
|
Status | resolved => reviewed |
2013-04-10 10:23 |
|
Status | reviewed => assigned |
2013-04-10 10:25 |
|
Note Added: 0024065 | |
2013-04-10 10:25 |
|
Assigned To | emv => abv |
2013-04-10 10:25 |
|
Status | assigned => resolved |
2013-04-10 10:25 |
|
Additional Information Updated | |
2013-04-11 18:22 |
|
Note Added: 0024095 | |
2013-04-11 18:22 |
|
Assigned To | abv => bugmaster |
2013-04-11 18:22 |
|
Status | resolved => reviewed |
2013-04-11 18:25 |
|
Additional Information Updated | |
2013-04-11 18:27 |
|
Note Added: 0024096 | |
2013-04-12 04:35 | Hayashi | Note Added: 0024102 | |
2013-04-12 15:43 | apn | Assigned To | bugmaster => apn |
2013-04-15 15:10 | apn | Test case number | => bugs modalg_5 bug23881 |
2013-04-15 16:06 | apn | Note Added: 0024139 | |
2013-04-15 16:07 | apn | Assigned To | apn => bugmaster |
2013-04-15 16:07 | apn | Status | reviewed => tested |
2013-04-15 18:01 | bugmaster | Target Version | => 6.6.0 |
2013-04-16 15:16 |
|
Changeset attached | => occt master 7a9d451a |
2013-04-16 15:16 |
|
Assigned To | bugmaster => emv |
2013-04-16 15:16 |
|
Status | tested => verified |
2013-04-16 15:16 |
|
Resolution | open => fixed |
2013-04-23 13:35 |
|
Status | verified => closed |
2013-04-29 15:24 |
|
Fixed in Version | => 6.6.0 |