View Issue Details

IDProjectCategoryView StatusLast Update
0030461CommunityOCCT:Modeling Algorithmspublic2021-08-29 18:51
ReporterVico Liang Assigned Toemv  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version7.3.0 
Target Version7.7.0 
Summary0030461: Two planar shape cut fail
DescriptionThe uploaded files shape1.brep and shape2.brep cut failed.
Steps To Reproducerestore Shape1.brep s1
restore Shape2.brep s2
fixshape s1 s1
checkshape s1
# valid

# custom options
bnondestructive 1
brunparallel 1

bop s1 s2
bopcut result
checkshape result
# invalid
TagsNo tags attached.
Test case number

Attached Files

  • Shape1.brep (17,992 bytes)
  • Shape2.brep (2,121 bytes)
  • Shape1-Shape2-cut-failed.png (11,270 bytes)

Activities

Vico Liang

2019-01-27 16:54

developer  

Shape1.brep (17,992 bytes)

Vico Liang

2019-01-27 16:54

developer  

Shape2.brep (2,121 bytes)

Vico Liang

2019-01-27 16:54

developer  

Shape1-Shape2-cut-failed.png (11,270 bytes)

emv

2019-01-28 07:47

developer   ~0081888

Dear Vico,
What version of OCCT are you using and what do you mean "cut failed"?
I cannot reproduce the problem in either 7.3.0 or DEV version of OCCT. The results of all boolean operations seem to be correct on these shapes.

Vico Liang

2019-01-28 11:31

developer   ~0081903

Dear emv,
Cut shape1 by shape2 fail, while cut shape2 by shape1 works well.

emv

2019-01-28 12:19

developer   ~0081905

Last edited: 2019-01-28 16:03

I've checked it once again - no problem. Small piece of Shape1 is cut by Shape2. The the following script:
restore Shape1.brep s1
restore Shape2.brep s2
bop s1 s2
bopcommon rcommon
don rcommon
fit
bopcut rcut
don rcut

sprops s1
# Mass: 1721.75

sprops rcut
# Mass: 1719.16
checkshape rcut
# valid


Vico Liang

2019-01-28 15:41

developer   ~0081906

I checked that the result shape can't pass check with method BRepCheck_Analyzer::IsValid.

emv

2019-01-28 16:07

developer   ~0081907

I've checked the validity of the result shape also. I have a valid shape in the result. Could you please specify exactly your OCCT version, platform and provide a reproducible draw script?

Vico Liang

2019-01-28 16:23

developer   ~0081908

Last edited: 2019-01-28 16:25

I'm using OCCT 7.3, running on VS2013 windows 10.
The API is as following:
        BRepAlgoAPI_Cut aMakeCut;
        aMakeCut.SetArguments(aArgumentShapes);
        aMakeCut.SetTools(aToolShapes);
        aMakeCut.SetFuzzyValue(0);
        aMakeCut.SetRunParallel(Standard_True);
    aMakeCut.SetNonDestructive(Standard_True);
        aMakeCut.Build();
        BRepCheck_Analyzer aCheck(aMakeCut.Shape());
        if (!aCheck.IsValid())
        {
        }

emv

2019-01-28 16:49

developer   ~0081909

With NonDestructive option set to true, the problem is reproduced. But note also that the input model is also invalid. Try:
restore Shape1.brep s1
checkshape s1
On Shape faulty_1 :
BRepCheck_UnorientableShape
Shape faulty_2  on shape faulty_1 :
BRepCheck_InvalidCurveOnSurface
Shape faulty_3  on shape faulty_1 :
BRepCheck_InvalidCurveOnSurface
Shape faulty_4  on shape faulty_1 :
BRepCheck_InvalidCurveOnSurface

Faulty shapes in variables faulty_1 to faulty_4


Tolerance of some edges should be increased to heal the model.

But, since the result of boolean CUT operation contains most of the original sub-shapes and the algorithm was disallowed to modify these original sub-shapes, they were passed into result as is. So the result is also invalid.

Healing the model first and then applying the boolean operation doesn't solve the problem. The result is still invalid, and this has to be investigated:
restore Shape1.brep s1
restore Shape2.brep s2
fixshape s1 s1
checkshape s1
# valid

# custom options (as in your code)
bnondestructive 1
brunparallel 1

bop s1 s2
bopcut result
checkshape result
# invalid

Issue History

Date Modified Username Field Change
2019-01-27 16:54 Vico Liang New Issue
2019-01-27 16:54 Vico Liang Assigned To => msv
2019-01-27 16:54 Vico Liang File Added: Shape1.brep
2019-01-27 16:54 Vico Liang File Added: Shape2.brep
2019-01-27 16:54 Vico Liang File Added: Shape1-Shape2-cut-failed.png
2019-01-28 07:47 emv Note Added: 0081888
2019-01-28 07:47 emv Assigned To msv => Vico Liang
2019-01-28 07:47 emv Status new => feedback
2019-01-28 11:28 Vico Liang Product Version => 7.3.0
2019-01-28 11:31 Vico Liang Note Added: 0081903
2019-01-28 11:32 Vico Liang Assigned To Vico Liang => emv
2019-01-28 12:19 emv Note Added: 0081905
2019-01-28 12:20 emv Assigned To emv => Vico Liang
2019-01-28 15:41 Vico Liang Note Added: 0081906
2019-01-28 15:42 Vico Liang Assigned To Vico Liang => emv
2019-01-28 16:03 emv Note Edited: 0081905
2019-01-28 16:07 emv Note Added: 0081907
2019-01-28 16:07 emv Assigned To emv => Vico Liang
2019-01-28 16:23 Vico Liang Note Added: 0081908
2019-01-28 16:25 Vico Liang Note Edited: 0081908
2019-01-28 16:26 Vico Liang Assigned To Vico Liang => emv
2019-01-28 16:49 emv Note Added: 0081909
2019-01-28 16:50 emv Status feedback => assigned
2019-01-28 16:50 emv Steps to Reproduce Updated
2019-08-12 17:56 emv Target Version 7.4.0 => 7.5.0
2020-09-14 22:53 msv Target Version 7.5.0 => 7.6.0
2021-08-29 18:51 msv Target Version 7.6.0 => 7.7.0