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

### Our Solutions

Need professional assistance?
Consider our:

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

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

# "Local" Boolean operation

Forums:

In some cases I'd like to perform a "local" Boolean operation like cutting a single face in a shell or solid and then rebuilding the shape. Is there a tool for this?

### I guess that you would have

I guess that you would have to program that on your own. When it comes to cutting the face, you might want to look also at this: https://www.opencascade.com/content/how-imprint-face-solid-face-another-one.

### If your are referring to

If your are referring to creation of features, try this library contained in BRepFeat package is necessary for creation and manipulation of form and mechanical
features that go beyond the classical boundary representation of shapes. In that sense, BRepFeat is an extension
of BRepBuilderAPI package.
12.1 Form Features
The form features are depressions or protrusions including the following types:
• Cylinder;
• Draft Prism;
• Prism;
• Revolved feature;
• Pipe.
Depending on whether you wish to make a depression or a protrusion, you can choose either to remove matter
(Boolean cut: Fuse equal to 0) or to add it (Boolean fusion: Fuse equal to 1).
The semantics of form feature creation is based on the construction of shapes:
• for a certain length in a certain direction;
• up to the limiting face;
• from the limiting face at a height;
• above and/or below a plane.
The shape defining the construction of a feature can be either a supporting edge or a concerned area of a face.
In case of supporting edge, this contour can be attached to a face of the basis shape by binding. When the contour
is bound to this face, the information that the contour will slide on the face becomes available to the relevant class
methods. In case of the concerned area of a face, you can, for example, cut it out and move it at a different height,
which defines the limiting face of a protrusion or depression.
Topological definition with local operations of this sort makes calculations simpler and faster than a global operation.
The latter would entail a second phase of removing unwanted matter to get the same result.
The Form from BRepFeat package is a deferred class used as a root for form features. It inherits MakeShape from
BRepBuilderAPI and provides implementation of methods keep track of all sub-shapes.

### Thanks for replies. I was

Thanks for replies. I was trying to use the BRepFeat_Builder at first but couldn't figure it out. A screen shot of a sample shape I'd like to split (split face in red) is shown for reference. For now I think the solution outlined here works:

https://github.com/tpaviot/pythonocc-core/blob/master/examples/core_topo...

Attachments:

### DIGITAL 3D SOLUTIONS

A Capgemini Group Company