MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030461Community[OCCT] OCCT:Modeling Algorithmspublic2019-01-27 16:542019-01-28 16:50
ReporterVico Liang 
Assigned Toemv 
PrioritynormalSeverityminor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
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? file icon Shape1.brep (17,992 bytes) 2019-01-27 16:54
? file icon Shape2.brep (2,121 bytes) 2019-01-27 16:54
png file icon Shape1-Shape2-cut-failed.png (11,270 bytes) 2019-01-27 16:54

- Relationships

-  Notes
(0081888)
emv (developer)
2019-01-28 07:47

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.
(0081903)
Vico Liang (developer)
2019-01-28 11:31

Dear emv,
Cut shape1 by shape2 fail, while cut shape2 by shape1 works well.
(0081905)
emv (developer)
2019-01-28 12:19
edited on: 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


(0081906)
Vico Liang (developer)
2019-01-28 15:41

I checked that the result shape can't pass check with method BRepCheck_Analyzer::IsValid.
(0081907)
emv (developer)
2019-01-28 16:07

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?
(0081908)
Vico Liang (developer)
2019-01-28 16:23
edited on: 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())
        {
        }

(0081909)
emv (developer)
2019-01-28 16:49

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 View Revisions
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 View Revisions
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 View Revisions


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker