View Issue Details

IDProjectCategoryView StatusLast Update
0031031CommunityOCCT:Modeling Algorithmspublic2020-12-02 17:12
Reporterdenix56 Assigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Target Version7.5.0Fixed in Version7.5.0 
Summary0031031: Incorrect result is returned from BRepPrimAPI_MakePrism::Generated()
DescriptionOCCT 7.4.0
When I try to apply BRepPrimAPI_MakePrism on vertex it returns nothing from Generated(), but should return edge.

It was fine on 7.3.0
Steps To Reproducetest case
bugs modalg_7 bug31031
TagsNo tags attached.
Test case numberbugs modalg_7 bug31031

Relationships

related to 0030346 closedbugmaster Open CASCADE Modeling Algorithms - BRepPrimAPI_MakeRevol throws "BRepSweep_Translation::MakeEmptyVertex" 

Activities

emv

2019-10-04 16:03

developer   ~0087820

Hello denix,
Could you please provide the test script to reproduce the problem. I cannot reproduce it on OCCT 7.4.0:
plane p 0 0 0 0 0 1
mkface f p -10 10 -10 10
setfillhistory 1
prism s f 0 0 10
savehistory h
dump h
# 8 Generated shapes
explode f v
generated gv1 h f_1
generated gv2 h f_2
generated gv3 h f_3
generated gv4 h f_4

explode f e
generated ge1 h f_1
generated ge2 h f_2
generated ge3 h f_3
generated ge4 h f_4


As you can see, in this case all vertices and edges have generated shapes.

denix56

2019-10-04 17:20

reporter   ~0087834

Last edited: 2019-10-04 17:22

I have no built script module unfortunately

BRepPrimAPI_MakePrism prism(vertex, dir_norm, Standard_True);
const TopTools_ListOfShape& generated = prism.Generated(vertex);

TopoDS_Vertex vertex
{x=7.5000000000000000 y=0.00000000000000000 z=-5.4000000000000004 }

gp_Vec dir_norm
{coord={x=0.00000000000000000 y=17.0000000000000000 z=0.00000000000000000 } }


generated is empty

denix56

2019-10-04 19:03

reporter   ~0087841

Last edited: 2019-10-04 19:10

I did not make a deep research, but i suppose in BRepSweep_NumLinearRegularSweep::GenIsUsed

should be

return myBuiltShapes(iGenS, 1) || myUsedShapes(iGenS, 1);

instead of

return myBuiltShapes(iGenS, 1) && myUsedShapes(iGenS, 1);

because they never will be both true, according to the logic


After this fix everything works fine

emv

2019-10-07 08:23

developer   ~0087894

It seems the problem is introduced by the fix for the issue 0030346. Dear Igor, could you please check and correct the logic of Generated method?

Draw script for reproducing the problem:
vertex v 7.5 0 -5.4
prism e v 0 17 0
savehistory h
dump h
# 0 Generated shapes

git

2019-10-08 14:46

administrator   ~0087945

Branch CR31031 has been created by ifv.

SHA-1: 9e99371f341d43b433ad55daede073dec4787cf9


Detailed log of new commits:

Author: ifv
Date: Tue Oct 8 14:44:04 2019 +0300

    0031031: Incorrect result is returned from BRepPrimAPI_MakePrism::Generated()
    
    1. src\BRepSweep\BRepSweep_NumLinearRegularSweep.cxx
    
    Fix bug by adding result in list of generated shapes, if initial shape is vertex, edge or face.
    
    2. src\BRepLib\BRepLib.cxx
    
    Add protection against treatment not geometric edge in BRepLib::UpdateInnerTolerances(...)
    
    3. Add test case for bug and correct test for bug 30346 according to new behavior of algorithm

ifv

2019-10-08 17:30

developer   ~0087950

Branch CR31031 is ready for review
Results are CR31031-master-IFV

msv

2019-10-14 10:16

developer   ~0088096

Reviewed.

git

2019-10-23 11:51

administrator   ~0088478

Branch CR31031 has been deleted by kgv.

SHA-1: 9e99371f341d43b433ad55daede073dec4787cf9

Related Changesets

occt: master 44fafc47

2019-10-08 11:44:04

ifv


Committer: apn Details Diff
0031031: Incorrect result is returned from BRepPrimAPI_MakePrism::Generated()

1. src\BRepSweep\BRepSweep_NumLinearRegularSweep.cxx

Fix bug by adding result in list of generated shapes, if initial shape is vertex, edge or face.

2. src\BRepLib\BRepLib.cxx

Add protection against treatment not geometric edge in BRepLib::UpdateInnerTolerances(...)

3. Add test case for bug and correct test for bug 30346 according to new behavior of algorithm
Affected Issues
0031031
mod - src/BRepLib/BRepLib.cxx Diff File
mod - src/BRepSweep/BRepSweep_NumLinearRegularSweep.cxx Diff File
mod - tests/bugs/modalg_7/bug30346_2 Diff File
add - tests/bugs/modalg_7/bug31031 Diff File

Issue History

Date Modified Username Field Change
2019-10-04 14:06 denix56 New Issue
2019-10-04 14:06 denix56 Assigned To => msv
2019-10-04 15:46 abv Assigned To msv => emv
2019-10-04 16:03 emv Note Added: 0087820
2019-10-04 16:03 emv Assigned To emv => denix56
2019-10-04 16:03 emv Status new => feedback
2019-10-04 17:20 denix56 Note Added: 0087834
2019-10-04 17:20 denix56 Note Edited: 0087834
2019-10-04 17:22 denix56 Note Edited: 0087834
2019-10-04 17:24 abv Assigned To denix56 => emv
2019-10-04 19:03 denix56 Note Added: 0087841
2019-10-04 19:08 denix56 Note Edited: 0087841
2019-10-04 19:09 denix56 Note Edited: 0087841
2019-10-04 19:10 denix56 Note Edited: 0087841
2019-10-05 10:32 abv Target Version => 7.5.0
2019-10-07 08:13 emv Relationship added related to 0030346
2019-10-07 08:23 emv Note Added: 0087894
2019-10-07 08:23 emv Assigned To emv => ifv
2019-10-07 08:23 emv Status feedback => assigned
2019-10-08 14:46 git Note Added: 0087945
2019-10-08 17:29 ifv Steps to Reproduce Updated
2019-10-08 17:30 ifv Note Added: 0087950
2019-10-08 17:30 ifv Assigned To ifv => msv
2019-10-08 17:30 ifv Status assigned => resolved
2019-10-14 10:16 msv Note Added: 0088096
2019-10-14 10:16 msv Assigned To msv => bugmaster
2019-10-14 10:16 msv Status resolved => reviewed
2019-10-23 01:07 apn Changeset attached => occt master 44fafc47
2019-10-23 01:07 apn Assigned To bugmaster => apn
2019-10-23 01:07 apn Status reviewed => verified
2019-10-23 01:07 apn Resolution open => fixed
2019-10-23 11:51 git Note Added: 0088478
2019-10-23 16:57 apn Test case number => bugs modalg_7 bug31031
2020-12-02 16:40 emo Fixed in Version => 7.5.0
2020-12-02 17:12 emo Status verified => closed