Skip to content

Commit abf7f1b

Browse files
authored
Merge pull request #1043 from compas-dev/bugfix/box_to_rhino
float to Interval when creating a RhinoBox
2 parents ffa057a + 420fa15 commit abf7f1b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3030
* Rebuild part index after deserialization in `Assembly`.
3131
* Fixed bug in `compas.artists.colordict.ColorDict`.
3232
* Change `Mesh.mesh_dual` with option of including the boundary.
33+
* Fixed type error in `compas_rhino.conversions._shapes.box_to_rhino`.
3334
* Moved from `autopep8` to `black`
3435
* Fixed bug in `compas.utilities.linspace` for number series with high precision start and stop values.
3536

src/compas_rhino/conversions/_shapes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from Rhino.Geometry import Sphere as RhinoSphere
1414
from Rhino.Geometry import Cone as RhinoCone
1515
from Rhino.Geometry import Cylinder as RhinoCylinder
16+
from Rhino.Geometry import Interval
1617

1718
from ._primitives import plane_to_rhino
1819
from ._primitives import circle_to_rhino
@@ -58,7 +59,7 @@ def box_to_rhino(box):
5859
:rhino:`Rhino.Geometry.Box`
5960
6061
"""
61-
return RhinoBox(frame_to_rhino(box.frame), box.xsize, box.ysize, box.zsize)
62+
return RhinoBox(frame_to_rhino(box.frame), Interval(0., box.xsize), Interval(0., box.ysize), Interval(0., box.zsize))
6263

6364

6465
def sphere_to_compas(sphere):

0 commit comments

Comments
 (0)