Skip to content

Commit 867f25e

Browse files
authored
Merge pull request #1281 from compas-dev/bugfix/sphere_intersection
Bugfix Sphere and Sphere Intersection
2 parents 5d87114 + 4427b1f commit 867f25e

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

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

1212
### Changed
1313

14+
* Fixed missing implementation of `Sphere.base`.
15+
* Fixed bug in `intersection_sphere_sphere`.
16+
1417
### Removed
1518

1619
## [2.0.0-beta.4] 2024-01-26

src/compas/geometry/intersections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,8 @@ def intersection_sphere_sphere(sphere1, sphere2):
495495
496496
"""
497497

498-
center1, radius1 = sphere1
499-
center2, radius2 = sphere2
498+
center1, radius1 = sphere1.base, sphere1.radius
499+
center2, radius2 = sphere2.base, sphere2.radius
500500

501501
distance = distance_point_point(center1, center2)
502502

src/compas/geometry/shapes/sphere.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ def __repr__(self):
106106
# Properties
107107
# ==========================================================================
108108

109+
@property
110+
def base(self):
111+
return self.frame.point
112+
109113
@property
110114
def radius(self):
111115
if self._radius is None:

0 commit comments

Comments
 (0)