Skip to content

Commit 8221339

Browse files
authored
Merge pull request #1496 from compas-dev/fix-curve-offset
Fix int vs enum bug related to python3 not allowing this syntax anymore
2 parents 587ff27 + 3c3588e commit 8221339

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
* Changed name of YAK package from `bluejay` to `compas`.
1919
* Fixed broken `scaled()` method in `Sphere`, `Cylinder`, and `Capsule` classes by overriding to accept uniform scaling factor.
2020
* Fixed bug in `compas.geometry.PlanarSurface`.
21+
* Fixed bug in `Curve.offset()` in `compas_rhino`.
2122

2223
### Removed
2324

src/compas_rhino/geometry/curves/curve.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from __future__ import division
33
from __future__ import print_function
44

5+
import Rhino.Geometry # type: ignore
6+
57
from compas.geometry import Curve
68
from compas.geometry import Plane
79
from compas_rhino.conversions import box_to_compas
@@ -393,7 +395,8 @@ def offset(self, distance, direction, tolerance=1e-3):
393395
point = self.point_at(self.domain[0]) # type: ignore
394396
plane = Plane(point, direction)
395397
plane = plane_to_rhino(plane)
396-
self.native_curve = self.native_curve.Offset(plane, distance, tolerance, 0)[0] # type: ignore
398+
offset_style = Rhino.Geometry.CurveOffsetCornerStyle.NONE
399+
self.native_curve = self.native_curve.Offset(plane, distance, tolerance, offset_style)[0] # type: ignore
397400

398401
def smooth(self):
399402
raise NotImplementedError

0 commit comments

Comments
 (0)