Mon, 07/08/2024 - 06:18
Forums:
I use BOPAlgo_Builder to cut one TopoDS_Face by another TopoDS_Face.
You will see that in picture1.png
I use intersectedFaces[5_0_0].brep cut inputFacePieces[5_0_0].brep
The version of occ is 7.6
Nothing changed
I want to know what is wrong with that result
So I wanna debug OCC sources in Visual Studio in windows to see data changing in runtime of BOPAlgo_Builder
But I do not know how to do that,I know how to build OCC sources,I also know how to install occ products.
My question is how to see the data of runtime in BOPAlgo_Builder when breakpointing it.
Why nothing changed?
Mon, 07/08/2024 - 09:16
Hello, you would like to debug OCCT project itself from DRAW?
For debugging DRAW you need to specify build type to Debug or ReleaseWitgDebInfo. And start with debugging DRAWEXE, or attach to process.
In case of you want to debug your own application, you need to install occt with previous types (debug/relwithdebinfo).
After installing you need to connect installed CMake project. Need to link debug lins with your debug configuration. One of the available samples for CMake:
https://github.com/dpasukhi/DE_Wrapper-Sample
https://github.com/dpasukhi/DE_Wrapper-Sample/blob/main/src/CoreDE/CMake...
Best regards, Dmitrii.
Tue, 07/09/2024 - 10:00
Thank you I have done this myself already.
My question now is changed to why BOPAlgo_Builder can not work.
Tue, 07/09/2024 - 10:53
For helping you, we need to have DRAW script to reproduce or the c++ code sample. The reason mainly for that type of issue is tolerance, try to increase tolerance for your operation.
Additionally, it will be better, if you will check on the latest version (it can be a old bug).
Best regards, Dmitrii.
Tue, 07/09/2024 - 11:57
Tools::readShapeFromBRep
is a custom function I wrote,for reading TopoDS_Shape from file.You can read file in your way
Tue, 07/09/2024 - 12:01
SPDLOG_DEBUG
is a third library for printing log,you can std::cout instead.Tue, 07/09/2024 - 11:36
Here is the code above
Tue, 07/09/2024 - 15:59
Anytime you get unexpected or no results from an algorithm, you should verify your input shapes. You can do that with BRepCheck_Analyzer. When you do that with 'inputFacePieces[5_0_0]' you will see a bunch of errors. Once those are fixed the boolean operation will probably work ... at least it did for me.
Wed, 07/10/2024 - 06:07
I got it done in your way
And fix the invalid TopoDS_Face using ShapeFix_Face
Thank you very much