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

Problem with Boolean Cut (shape vs halfspace)

Davide Canalia's picture
Forums: 

Hi
i have 2 shapes:
1) the object i want to cut (a shape composed by ~40000 surfaces)
2) an halfspace (build by a shell created from a wire)

Using BRepAlgoAPI_Cut i can cut it, but if i change the reference point of the halfspace (to change the side of the matter) i always get the same result.. But i think i should get the "other" side of the orginal shape.

The shell that describe the halfspace starts and ends outside the bounding box of the shape i want to cut.

Any hint?

Christian Allgeier's picture

i had the same problem and solved it as follows:
1) create first half space (build face, build half space)
2) create second half space (reverse the face from the first half space TopoDS_Face aFace2 = aFace.Reverse(), use aFace2 to create second HalfSpace

Hesham Nasif's picture

How do you choose the reference point because i also want to cut a shape to remove the concave edges

Lodyzhensky's picture

Dear Davide Canalia.

Let me drop some remarks and give you some advice.

-"1) the object i want to cut (a shape composed by ~40000 surfaces)."
A shape cannot be composed by surfaces. The term shape means topological type of the object. Q: what kind of shape you want to cut(face, shell, solid, compound of faces, shells, solids)?
-"2) an halfspace (build by a shell created from a wire)"
A shell is just a set of faces. A shell newer can be created from a wire.
- Try to not use a halfspaces as an argument of boolean peration. The treatment of halfspaces uses "semi-infinity" reals for computations.
In most cases it is quite enough to use rectangular face having a plane as underlying surface.
*)To obtain this planar face you could use the information from Bnd_Box of your smart "shape composed by ~40000 surfaces".
*) Having the planar face, you can build a Shell from it and then build a Solid from the Shell. Use this solid as the argument of Cut operation.

Hesham Nasif's picture

Dear Nicolaich
I have a shape composed of 12 faces, some of them are concaves, so i need to split this shape to remove the concavity from the shape. Do you have any idea how can i proceed with this case
Best
Hesham

Hesham Nasif's picture

When i create surface from a sort of vertices and check the bounds i found them umin = 2E-100 and umax = 2E100, vmin = 0.0 and vmax = 0
Is it correct?

Lodyzhensky's picture

Dear Hesham Nasif.

What kind of surface you create (plane, cylinder, sphere, etc)?
What is the algo you've used to create the surface

In any case the fact that
vmin = 0.0 and vmax = 0 (it must never be so) means that there is an error somewhere:
- Data (please, check your points, may be they belong to one line;
- Algo that you've used to create a surface.

I think that umin = 2E-100 is just the misprint. May be umin = -2E100 ?
PS:
My name Evgeny Nicolaich.

Hesham Nasif's picture

Dear Evgeny Nicolaich
Thanks for your kindness and fast reply. I could solve the problem. Actually the system includes planes, cylinderical and conical surfaces. What i had done is as follows.
I pick up 4 vertices and construct a plane, from the constructed plane i automatically construct a bounding box around the part of shape i want to cut and then apply BOP (solid-solid) and now get nice cutting and could seperate the concave faces.
What i am looking for now is to apply BSP tree to have the whole process automatic. Is BSP tree good approach for that, even with a quadrics included
Thanks again

Lodyzhensky's picture

Dear Hesham Nasif.

BSP. If you have in mind binary search to sort Bnd_Box(-es) you can use the class NCollection_UBTreeFiller.

Good luck.

Hesham Nasif's picture

Dear Evgeny Nicolaich
Thanks for your kindness and your nice willing to help, Yes it is the Binary Space Partioning and i would like to use it to eliminate the concave faces from the shape by adding new faces and split the shape into smaller shapes
Thanks again Evgeny. Is it your correct name. Sorry about the first posting because i could not recognize your name exactly
Hesham

Hesham Nasif's picture

One More Question.
If i want to install the simple software i have developed into other machine but it does not include opencascade, is it possible
Thanks for your consideration
Hesham

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.