Wed, 02/12/2020 - 13:00
I use OpenCascade V7.4.0 for windows 32bit.
I tryed to get shape difference by BRepAlgoAPI_Cut , but the process of BRepAlgoAPI_Cut constructor is not return. My application memory keep growing from 100MB to 1.5GB and finally my application crashed.
BRepAlgoAPI_Cut cut( shapeBase, shapeCut);
Then, I outputed shapes before cut for decrease shape error.
Thereby, My application memory does not keep growing and cut method is finished.
BRepTools::Write( shapeBase, "C:/@test/shapeBase.brep" );
BRepTools::Write( shapeCut, "C:/@test/shapeCut.brep" );
BRepTools::Read( shapeBase, "C:/@test/shapeBase.brep", bb );
BRepTools::Read( shapeCut, "C:/@test/shapeCut.brep", bb );
BRepAlgoAPI_Cut cut( shapeBase, shapeCut );
But the processing time is too long and I want to Interrupt cut process by processing time or application memory size.
Is there any good way?
Wed, 02/12/2020 - 13:53
The general mechanism for progress indication and interruption in OCCT is provided by Message_ProgressIndicator interface.
If you see this field somewhere in algorithm parameters (default argument value is NULL meaning no progress indication) - then you can pass indicator to see/abort progress.
If you don't see such argument, then you are out of luck and progress indication is not yet implemented, cannot be implemented or doesn't make sense to be implemented for particular algorithm.
In this case, you may consider improving OCCT and contributing patch, of course with some help and advices from Open Cascade developers:
Tue, 02/18/2020 - 05:56
Thank you for your reply.
I could interrupt process of BRepAlgoAPI_Cut class by useing sub class of Message_ProgressIndicator.
Wed, 02/08/2023 - 18:05
How did you do that?
Sat, 02/11/2023 - 20:49
...i have it.