Skip to content

Commit c7e8434

Browse files
authored
Merge branch 'main' into install-with-pip
2 parents d91c5a4 + 43cb6b6 commit c7e8434

File tree

17 files changed

+261
-9
lines changed

17 files changed

+261
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
* Added `compas_rhino.install_with_pip` with corresponding command line utility `install_in_rhino`.
13+
* Added support for `.stp` file extension in addition to `.step` for `RhinoBrep.from_step()` and `RhinoBrep.to_step()` methods.
1314

1415
### Changed
1516

17+
* Updated minimum library version to `2.14.1` in Rhino8 GH components.
18+
* Changed name of YAK package from `bluejay` to `compas`.
19+
* Fixed broken `scaled()` method in `Sphere`, `Cylinder`, and `Capsule` classes by overriding to accept uniform scaling factor.
20+
1621
### Removed
1722

1823

src/compas/geometry/shapes/cone.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,22 @@ def to_brep(self):
300300
# Transformations
301301
# ==========================================================================
302302

303+
def scale(self, factor):
304+
"""Scale the cone by multiplying the radius and height by a factor.
305+
306+
Parameters
307+
----------
308+
factor : float
309+
The scaling factor.
310+
311+
Returns
312+
-------
313+
None
314+
315+
"""
316+
self.radius *= factor
317+
self.height *= factor
318+
303319
# ==========================================================================
304320
# Methods
305321
# ==========================================================================

src/compas/geometry/shapes/shape.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,13 +432,36 @@ def scale(self, scale):
432432
433433
See Also
434434
--------
435+
scaled
435436
translate
436437
rotate
437438
transform
438439
439440
"""
440441
raise NotImplementedError
441442

443+
def scaled(self, factor):
444+
"""Returns a scaled copy of the shape.
445+
446+
Parameters
447+
----------
448+
factor : float
449+
The scaling factor.
450+
451+
Returns
452+
-------
453+
:class:`compas.geometry.Shape`
454+
The scaled shape.
455+
456+
See Also
457+
--------
458+
scale
459+
460+
"""
461+
shape = self.copy()
462+
shape.scale(factor)
463+
return shape
464+
442465
# =============================================================================
443466
# Methods
444467
# =============================================================================

src/compas/geometry/shapes/torus.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,3 +278,20 @@ def transform(self, transformation):
278278
279279
"""
280280
self.frame.transform(transformation)
281+
282+
def scale(self, factor):
283+
"""Scale the torus by multiplying the axis radius and pipe radius by a factor.
284+
285+
Parameters
286+
----------
287+
factor : float
288+
The scaling factor.
289+
290+
Returns
291+
-------
292+
None
293+
294+
"""
295+
self.radius_axis *= factor
296+
self.radius_pipe *= factor
297+

src/compas_ghpython/components_cpython/Compas_FromJson/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# r: compas>=2.8.1
1+
# r: compas>=2.14.1
22
"""
33
Deserializes JSON into COMPAS objects.
44
"""

src/compas_ghpython/components_cpython/Compas_Info/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# r: compas>=2.8.1
1+
# r: compas>=2.14.1
22
"""
33
Displays information about the active COMPAS environment.
44
"""

src/compas_ghpython/components_cpython/Compas_RpcCall/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# r: compas>=2.8.1
1+
# r: compas>=2.14.1
22
"""
33
Remote Procedure Call: to invoke Python functions outside of Rhino, in the context of the CPython interpreter.
44
"""

src/compas_ghpython/components_cpython/Compas_ToJson/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# r: compas>=2.8.1
1+
# r: compas>=2.14.1
22
"""
33
Serializes COMPAS objects to JSON.
44
"""

src/compas_ghpython/components_cpython/Compas_ToRhinoGeometry/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# r: compas>=2.8.1
1+
# r: compas>=2.14.1
22
"""
33
Draws COMPAS geometry in Grasshopper.
44
"""

src/compas_ghpython/yak_template/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: bluejay
1+
name: compas
22
version: {{ version }}
33
authors:
44
- tom van mele et. al.

0 commit comments

Comments
 (0)