Skip to content

Commit 15e73fb

Browse files
authored
Merge pull request #1075 from compas-dev/cylinder-conversion-precision
Fix random failure of cylinder conversion from brep
2 parents 92afed0 + a202ca4 commit 15e73fb

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
@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2828
* Based all gltf data classes on `BaseGLTFDataClass`
2929
* Fixed `Color.__get___` AttributeError.
3030
* Fixed `cylinder_to_rhino` conversion to match `compas.geometry.Cylinder` location.
31+
* Changed identification of cylinder brep face to non-zero in `compas_rhino.conversions.cylinder.Cylinder`.
3132
* Changed linter to `black`.
3233
* Automatically trigger `invoke format` during `invoke release`.
3334
* Fixed bug in `intersections.intersection_circle_circle_xy` where the Circle's Plane was accessed instead of the centre.

src/compas_rhino/conversions/cylinder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ def geometry(self, geometry):
4646
faces = geometry.Faces
4747
geometry = None
4848
for face in faces:
49-
if face.IsCylinder():
49+
# being too strict about what is considered a cylinder
50+
# results in cylinders created by Rhino itself
51+
# to not be recognized...
52+
if face.IsCylinder(0.001):
5053
result, geometry = face.TryGetFiniteCylinder(0.001)
5154
if result:
5255
break

0 commit comments

Comments
 (0)