Skip to content

Commit 186afed

Browse files
authored
Merge pull request #1442 from compas-dev/flip_brep
Flip brep
2 parents 9548b6e + 8bc3457 commit 186afed

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## Unreleased
9-
* Fixed unexpected behavior for method `Plane.is_parallel` for opposite normals.
109

1110
### Added
1211

12+
* Added `flip` to `compas.geometry.Brep`.
13+
* Added implementation of `flip` to `compas_rhino.geometry.RhinoBrep`.
14+
1315
### Changed
1416

17+
* Fixed unexpected behavior for method `Plane.is_parallel` for opposite normals.
18+
1519
### Removed
1620

1721

src/compas/geometry/brep/brep.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,16 @@ def filleted(self, radius, edges=None):
10801080
"""
10811081
raise NotImplementedError
10821082

1083+
def flip(self):
1084+
"""Flip the orientation of all faces of the Brep.
1085+
1086+
Returns
1087+
-------
1088+
None
1089+
1090+
"""
1091+
raise NotImplementedError
1092+
10831093
def slice(self, plane):
10841094
"""Slice through the BRep with a plane.
10851095

src/compas_rhino/geometry/brep/brep.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,3 +664,13 @@ def filleted(self, radius, edges=None):
664664
if not resulting_breps:
665665
raise BrepFilletError("Fillet operation ended with no result")
666666
return RhinoBrep.from_native(resulting_breps[0])
667+
668+
def flip(self):
669+
"""Flip the orientation of all faces of the Brep.
670+
671+
Returns
672+
-------
673+
None
674+
675+
"""
676+
self._brep.Flip()

0 commit comments

Comments
 (0)