Skip to content

Commit 0e62739

Browse files
committed
black formatting
1 parent d2540f7 commit 0e62739

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

src/compas/geometry/brep/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@
99

1010
class BrepError(Exception):
1111
"""Represents a generic error in the Brep context"""
12+
1213
pass
1314

1415

1516
class BrepInvalidError(BrepError):
1617
"""Raised when the process of re-constructing a Brep has resulted in an invalid Brep"""
18+
1719
pass
1820

1921

2022
class BrepTrimmingError(BrepError):
2123
"""Raised when a trimming operation has failed or had not result"""
24+
2225
pass
2326

2427

@@ -28,10 +31,8 @@ class BrepTrimmingError(BrepError):
2831
"BrepLoop",
2932
"BrepFace",
3033
"BrepVertex",
31-
3234
"BrepOrientation",
3335
"BrepType",
34-
3536
"BrepError",
3637
"BrepInvalidError",
3738
"BrepTrimmingError",

src/compas_rhino/geometry/brep/brep.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ def _create_native_brep(self, faces):
237237
self._add_trim(rhino_2d_curve, rhino_edge, rhino_loop)
238238

239239
self._brep.Repair(TOLERANCE)
240-
self._brep.JoinNakedEdges(TOLERANCE) # without this, Brep.Trim() led to some weird results on de-serialized Breps
240+
self._brep.JoinNakedEdges(
241+
TOLERANCE
242+
) # without this, Brep.Trim() led to some weird results on de-serialized Breps
241243
self._validate_brep()
242244

243245
def _validate_brep(self):
@@ -282,7 +284,9 @@ def _add_trim(self, rhino_trim_curve, rhino_edge, rhino_loop):
282284
trim_curve_index = self._brep.AddTrimCurve(rhino_trim_curve)
283285
# Topology
284286
trim = self._brep.Trims.Add(rhino_edge, True, rhino_loop, trim_curve_index)
285-
trim.IsoStatus = getattr(Rhino.Geometry.IsoStatus, "None") # IsoStatus.None makes lint, IDE and even Python angry
287+
trim.IsoStatus = getattr(
288+
Rhino.Geometry.IsoStatus, "None"
289+
) # IsoStatus.None makes lint, IDE and even Python angry
286290
trim.TrimType = Rhino.Geometry.BrepTrimType.Boundary
287291
trim.SetTolerances(TOLERANCE, TOLERANCE)
288292

src/compas_rhino/geometry/brep/edge.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ def data(self):
6161
else:
6262
type_ = "nurbs"
6363
curve = RhinoNurbsCurve.from_rhino(self._curve)
64-
return {"type": type_, "value": curve.data, "points": [self._start_vertex.point.data, self._end_vertex.point.data]}
64+
return {
65+
"type": type_,
66+
"value": curve.data,
67+
"points": [self._start_vertex.point.data, self._end_vertex.point.data],
68+
}
6569

6670
@data.setter
6771
def data(self, value):

src/compas_rhino/geometry/brep/face.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ def __init__(self, rhino_face=None):
3535
def _set_face(self, native_face):
3636
self._face = native_face
3737
self._loops = [RhinoBrepLoop(loop) for loop in self._face.Loops]
38-
self._surface = RhinoNurbsSurface.from_rhino(self._face.ToNurbsSurface()) # surface in Rhino will always be NURBS
38+
self._surface = RhinoNurbsSurface.from_rhino(
39+
self._face.ToNurbsSurface()
40+
) # surface in Rhino will always be NURBS
3941

4042
# ==============================================================================
4143
# Data

src/compas_rhino/geometry/brep/loop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class LoopType(object):
1818
POINT_ON_SURFACE
1919
2020
"""
21+
2122
UNKNOWN = 0
2223
OUTER = 1
2324
INNTER = 2

0 commit comments

Comments
 (0)