For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

BRepAlgoAPI_Cut destroys contour

Marco's picture
Forums: 

Hi,

i have a problem with BRepAlgoAPI_Cut. I created a tableboard http://imgur.com/288J.jpg and an other Object which could be for example the way of a mortiser http://imgur.com/2893.jpg.
The result after cutting them (BRepAlgoAPI_Cut(tableboard, mortiserWay)) ist that: http://imgur.com/289N.jpg
You can see that the "BRepAlgoAPI_Cut" destroys the contour of the table around the cut. I have no idea how i can avoid that.
The contour around the table is created out of curve which was built through "GeomAPI_Interpolate(pointsOfTheCurve, Standard_False, Precision::Approximation())".
I Hope somebody can help me, thanks.

arkoala's picture

In some place, I could read about BRepAlgoAPI_Cut strange behaviour, and it suggested to avoid parallel faces between both shapes (or it was only for performance purposes?).

So, I get bigger my solids in order to get good results.
But, it seems you cannot do the same. Try repeating the same process, but putting these two shapes in differente Z values (Without sharing the base face).

If artifacts are solved, you know the right path. If not, wait for a better answer!

Marco's picture

Thank you for your reply. I have tried your hint, but unfortunately it dont solve the problem.

Roman Lygin's picture

Hi Marco,

To make sure this is Open CASCADE bug do the following in DRAW test harness:

>pload ALL
>restore shape
>restore tool
>checkshape shape
>checkshape tool
>bop shape tool
>bopcut result
>checkshape result
>vinit
>vdisplay result
>vfit
>vsetdispmode result 1

There's slim chance that you introduce errors somewhere upstream. How does your result display in a wireframe mode ? Another guess - geometry that has been changed during cut though valid causes some failures in meshing algorithm.

Good luck.
Roman
---
opencascade.blogspot.com - the Open CASCADE blog

Marco's picture

Hi Roman,

i have checked the shapes in the test harness.
The tableboard-shape and the mortiser-shape seems to be valid.
The check of the cut-result throws some faults:

On Shape faulty_1:
BRepCheck_InvalidMultiConnexity
On Shape faulty_2:
BRepCheck_InvalidMultiConnexity
On Shape faulty_3:
BRepCheck_InvalidMultiConnexity
On Shape faulty_4:
BRepCheck_InvalidMultiConnexity

Faulty shapes in variables faulty_1 to faulty_4

I have made a screenshot of the Draw Test Harness Console: http://imgur.com/29XD.jpg
So it is a OCC bug?
Any idea how to avoiding this bug - maybe using an other way to create the contour.
Other type of curves or cutting the contour out of a simple solid and then cutting the
mortiser on it?

Thank you for your help!

Roman Lygin's picture

Hi Marco,
Well, it looks like an Open CASCADE bug :-(.
The error messages mean that connectivity has been set incorrect (if I get correctly from BRepCheck, this means that there are edges that are shared 3 times instead of 2 for a normal solid). Could you upload a picture with wireframe display to see how it looks in that mode ?

No clues upfront. Maybe you could try to extend your cut tool so that it's guaranteed to exceed a workpart boundaries. BOP are known to be sensitive to tangential cases, and if your shapes boundaries coincide this may cause an interference that can lead to various errors. Of course, it's only a guess which may not work in your case.

(By the way, as I already mentioned on this forum, I'm interested in collecting 3d models that demonstrate slow performance of BOPs. I use them to experiment with improving performance with Intel Parallel Amplifier. If your models are not confidential, you may want to send them to me, I could give them a look at my spare time).

Roman
---
opencascade.blogspot.com - the Open CASCADE blog

Marco's picture

Hi Roman,

i have uploaded some screens of the objects without textures.

table:
http://imgur.com/2JN3.jpg

mortiser:
http://imgur.com/2JND.jpg

table + mortiser:
http://imgur.com/2JNN.jpg
http://imgur.com/2JO7.jpg
http://imgur.com/2JOH.jpg

table - mortiser:
http://imgur.com/2JOR.jpg
http://imgur.com/2JP1.jpg
http://imgur.com/2JPB.jpg

The mortiser exceed the table and no parallels existing between the mortiser and the table.

Marco's picture

Hi all,

i have solved my problem.
Up to now i have created the table out of rectangle on which i have added
objects with the contour. With this the result of the cut-operation is not
satisfying.
Now i create a rectangle and do not add object with the contour, but i create
the negative-form of the contour and cutting this form out of the rectangle.
The result shape of this way seems to be more persistend and the cutting of
the mortiser is successful.
The result of this you can see here: http://imgur.com/2KQT.jpg
I hope my explanation is understandable.

Thanks a lot to all who have tried to help me in this thread and via email!

Roman Lygin's picture

Hi Marco,

Glad you have overcome this, congratulations ! Your wireframe screenshots were helpful and the green on 'table-mortiser' indicates your solids got broken. This seems to explain why you got errors in DRAWEXE. As mentioned in Part 3, green color indicates a free edge (i.e. shared by a single face). Thus, you probably resulted having coincident but not shared edges (each in green).

On your new construction algorithm. So are you now creating a table by cutting (Boolean Cut ?) a profile-built tool from the original box ? And previously you used Boolean Fuse ? If so, I'm confused why you need Booleans at all. Why wouldn't you just create a solid from all its faces if you can construct both lateral and top, and bottom ones in a first place ? Just curious...

Roman
---
opencascade.blogspot.com - the Open CASCADE blog

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.