DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0032818

Modeling Algorithms - Result of sweep operation is invalid

CommunityOCCT:Modeling Algorithmsverified17 public notes

Search issues

Description

BRepOffsetAPI_MakePipeShell with the attached path and profile does not build correct on 7.6.0 version.

Steps to reproduce

TopoDS_Shape Sh1;
TopoDS_Shape Sh2;
BRep_Builder B;
bool b1 = BRepTools::Read(Sh1, "D:\\Attachment 1 (BREP)", B);
bool b2 = BRepTools::Read(Sh2, "D:\\Attachment 2 (BREP)", B);

const TopoDS_Wire& path = TopoDS::Wire(Sh1);
const TopoDS_Wire& profile= TopoDS::Wire(Sh2);
BRepOffsetAPI_MakePipeShell shellMaker(path);
shellMaker.SetTransitionMode(static_cast<BRepBuilderAPI_TransitionMode>(2));
shellMaker.Add(profile, /*WithContact*/false, /*WithCorrection*/true);
shellMaker.Build();
const TopoDS_Shape& shape = shellMaker.Shape();


Or
run "test pipe bugs bug32818"

Public activity

17 archived notes

Participants are labeled by their role within this record.

01Author
Attachment 1 (BREP) (1,016 bytes)   
Attachment 2 (BREP) (3,925 bytes)   
02Author
#0032811

CR32811 Round Corner mode also failed due to same reason
03Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: gelin
Date: Wed Feb 9 13:26:39 2022 +0800

    0032818: Modeling Algorithms - Result of sweep operation is invalid
04Author
Dear Commenter 3, please help review the code. CR32809 CR32807 are not reviewed yet
05Commenter 5
I have assigned it for review to the expert in this algorithm. All bugs will be processed in the order of actual priority.
06Commenter 6
Mikhail,
Find, please a reviewer for the issue.
07Commenter 4
Commenter 4, please review and test this patch, and change it if needed.
08Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
09Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
10Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
11Commenter 11
12Commenter 12
I think this
         p11 = P1.Distance(BRep_Tool::Pnt(TopExp::FirstVertex(TopoDS::Edge(fit == 1 ? aE1 : aE2))));
         p22 = P2.Distance(BRep_Tool::Pnt(TopExp::LastVertex(TopoDS::Edge(fit == 1 ? aE1 : aE2))));
         p12 = P1.Distance(BRep_Tool::Pnt(TopExp::LastVertex(TopoDS::Edge(fit == 1 ? aE1 : aE2))));
         p21 = P2.Distance(BRep_Tool::Pnt(TopExp::FirstVertex(TopoDS::Edge(fit == 1 ? aE1 : aE2))));

could be simplified a bit by choosing the ref edge first
         TopoDS_Edge aERef = TopoDS::Edge(fit == 1 ? aE1 : aE2);
         p11 = P1.Distance(BRep_Tool::Pnt(TopExp::FirstVertex(aERef)));
         p22 = P2.Distance(BRep_Tool::Pnt(TopExp::LastVertex(aERef)));
         p12 = P1.Distance(BRep_Tool::Pnt(TopExp::LastVertex(aERef)));
         p21 = P2.Distance(BRep_Tool::Pnt(TopExp::FirstVertex(aERef)));


Indentation of the whole new block seems to be incorrect.

Also huge number of differences in images in test results. Please check if the results are compared with the correct version.
13Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
14Commenter 14
15Commenter 15
No remarks to the code, except probably for the test case - does it make sense to add an image dump?
I wonder, why are there so many differences in images in products? It is unlikely that IFC and OMF are using sweep algo. Wrong refs again?
16Commenter 5
I think, that image is not needed for this case. Checking shape and number of subshapes is quite enough.
Of course, sweep algo is not used in IFC and OMF tests. Now IFC is in process of changing, ask Commenter 5 for details.
For reference I only use branch, which is suggested by jenkins.
17Commenter 17
Ok, Reviewed then.

Please integrate CR32818 into OCCT.

Related records