MantisBT - Community
View Issue Details
0027674Community[OCCT] OCCT:Modeling Algorithmspublic2016-07-13 06:532017-09-29 16:31
Vico Liang 
apn 
normalminor 
closedfixed 
[OCCT] 6.9.1 
[OCCT] 7.2.0[OCCT] 7.2.0 
bugs modalg_6 bug27674
0027674: BRepOffsetAPI_ThruSections make invalid shape if sections are connected at ends
BRepOffsetAPI_ThruSections aLoft(Standard_False, Standard_False, Precision::Confusion());
aLoft.SetParType(Approx_ChordLength);
aLoft.SetContinuity(GeomAbs_C2);
aLoft.SetSmoothing(Standard_True);
aLoft.CheckCompatibility(Standard_True);

// Load the file CircleLineWires.brep to get two wires of aLine and aSemiCircle
aLoft.AddWire(TopoDS::Wire(aLine));
aLoft.AddWire(TopoDS::Wire(aSemiCicle));
aLoft.Build();

BRepCheck_Analyzer aCheck(aLoft.Shape());
if (!aCheck.IsValid())
{
    // Invalid SameParameterFlag
}

restore CircleLineWires.brep a
explode a
wire w a_1 a_2
explode w
wire a1 w_1
wire a2 w_2
thrusections r 0 0 a1 a2
checkshape r
No tags attached.
? CircleLineWires.brep (742) 2016-07-13 06:53
https://tracker.dev.opencascade.org/
png CircleLineWires.png (5,743) 2016-07-13 06:56
https://tracker.dev.opencascade.org/
Issue History
2016-07-13 06:53Vico LiangNew Issue
2016-07-13 06:53Vico LiangAssigned To => msv
2016-07-13 06:53Vico LiangFile Added: CircleLineWires.brep
2016-07-13 06:56Vico LiangFile Added: CircleLineWires.png
2016-07-13 07:00Vico LiangNote Added: 0055876
2016-07-13 07:06Vico LiangProduct Version => 6.9.1
2016-07-13 07:06Vico LiangDescription Updatedbug_revision_view_page.php?rev_id=14166#r14166
2016-07-13 20:21msvNote Added: 0055896
2016-07-13 20:21msvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14174#r14174
2016-07-14 11:15Vico LiangNote Added: 0055902
2016-07-14 18:12msvAssigned Tomsv => aka
2016-07-14 18:12msvStatusnew => assigned
2016-10-28 15:44msvTarget Version7.1.0 => 7.2.0
2016-11-23 11:18gitNote Added: 0060711
2016-11-23 11:18akaAssigned Toaka => msv
2016-11-23 11:18akaStatusassigned => resolved
2016-11-23 15:38gitNote Added: 0060731
2016-11-23 16:23gitNote Added: 0060734
2016-11-23 16:56gitNote Added: 0060737
2016-11-23 16:57msvNote Added: 0060738
2016-11-23 16:57msvAssigned Tomsv => bugmaster
2016-11-23 16:57msvStatusresolved => reviewed
2016-11-25 17:31gitNote Added: 0060782
2016-11-25 18:03mkvAssigned Tobugmaster => mkv
2016-11-28 17:24mkvNote Added: 0060822
2016-11-28 17:25mkvNote Added: 0060823
2016-11-28 17:25gitNote Added: 0060824
2016-11-28 17:26mkvNote Added: 0060825
2016-11-28 17:26mkvAssigned Tomkv => bugmaster
2016-11-28 17:26mkvStatusreviewed => tested
2016-11-28 17:26mkvTest case number => bugs modalg_6 bug27674
2016-12-09 16:46apnChangeset attached => occt master 851f8701
2016-12-09 16:46apnAssigned Tobugmaster => apn
2016-12-09 16:46apnStatustested => verified
2016-12-09 16:46apnResolutionopen => fixed
2016-12-18 10:53gitNote Added: 0061785
2017-09-29 16:21aivFixed in Version => 7.2.0
2017-09-29 16:31aivStatusverified => closed

Notes
(0055876)
Vico Liang   
2016-07-13 07:00   
There are two very small edges generated at two ends and they can be treated as degenerated edges. The issue is that the two small edges IsSameParameterFlag are invalid.
(0055896)
msv   
2016-07-13 20:21   
In master version checkshape does not find any faulty in the result.
However, the result is not good.
Indeed, small edges, 3d curve of which have length much less than 1e-7, are needed to be degenerated. I.e., if we remove 3d curves from them and declare them degenerated the result would be OK... but each of these edges is constructed on two different vertices having the same coordinates.
So, in order to make the result good it is needed to provide merging of coinciding vertices. I think it must do the calling algorithm. I.e., before call to thrusections, it is needed to merge coinciding vertices. E.g., it can be done with BRepBuilderAPI_MakeWire (or draw command wire).
(0055902)
Vico Liang   
2016-07-14 11:15   
Dear msv, i agree with your solution. I think Merging coincident vertices should be done inside thrusections algorithm. Caller does no need such preprocessing.
(0060711)
git   
2016-11-23 11:18   
Branch CR27674 has been created by aka.

SHA-1: 1191724c908f481ca6a9c3fb642463c3a6aafcbd


Detailed log of new commits:

Author: aka
Date: Tue Nov 22 15:32:55 2016 +0300

    0027674: BRepOffsetAPI_ThruSections make invalid shape if sections are connected at ends
    
    The edges which has length much less than 1e-7 will be created as degenerated and without 3d curve.
(0060731)
git   
2016-11-23 15:38   
Branch CR27674 has been updated by aka.

SHA-1: 4114939ef65cca044d65a66b780878bbc287aea0


Detailed log of new commits:

Author: aka
Date: Wed Nov 23 15:38:00 2016 +0300

    Some changes were made in the fix

(0060734)
git   
2016-11-23 16:23   
Branch CR27674 has been updated forcibly by aka.

SHA-1: 30a6cf44fe906e075cba3ec602843c85b7df6357
(0060737)
git   
2016-11-23 16:56   
Branch CR27674 has been updated forcibly by msv.

SHA-1: 189000c33a4c77bfcee1c4a484db43e264ecd401
(0060738)
msv   
2016-11-23 16:57   
Reviewed.
(0060782)
git   
2016-11-25 17:31   
Branch CR27674 has been updated forcibly by mkv.

SHA-1: de3d036777296bc7a151cb986227ca70c011d948
(0060822)
mkv   
2016-11-28 17:24   
Dear BugMaster,
Branch CR27674 was rebased on current master of occt git-repository.
SHA-1: de3d036777296bc7a151cb986227ca70c011d948
(0060823)
mkv   
2016-11-28 17:25   
Dear BugMaster,
Branch CR27674 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: de3d036777296bc7a151cb986227ca70c011d948

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1133

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR27674-master-OCCT/Debian70-64/bugs/modalg_6/bug27674.html [^]
http://occt-tests/CR27674-master-OCCT/Windows-64-VC10/bugs/modalg_6/bug27674.html [^]
bugs modalg_6 bug27674: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91008062 / 91874472 [-0.94%]
Total CPU difference: 21745.73000000018 / 21686.28000000021 [+0.27%]
products component :
Total MEMORY difference: 30007155 / 29987174 [+0.07%]
Total CPU difference: 5341.849999999974 / 5306.77999999998 [+0.66%]

Testing on Windows:
occt component :
Total MEMORY difference: 56921172 / 56927644 [-0.01%]
Total CPU difference: 20349.98724779853 / 19742.815755698448 [+3.08%]
products component :
Total MEMORY difference: 20841231 / 20807990 [+0.16%]
Total CPU difference: 5294.658339899981 / 5163.945101999975 [+2.53%]

There are no differences in images found by testdiff.
(0060824)
git   
2016-11-28 17:25   
Branch CR27674 has been updated by mkv.

SHA-1: 9dbcf51543a2789b4c0cf356da41ecb462eacc94


Detailed log of new commits:

Author: mkv
Date: Mon Nov 28 17:23:43 2016 +0300

    Small correction of test case for issue CR27674

(0060825)
mkv   
2016-11-28 17:26   
Dear BugMaster,
Branch CR27674 is TESTED.
(0061785)
git   
2016-12-18 10:53   
Branch CR27674 has been deleted by kgv.

SHA-1: 9dbcf51543a2789b4c0cf356da41ecb462eacc94