Skip to content

Commit 88761bc

Browse files
committed
Merge branch 'main' into symlinks
2 parents 989b81e + 11b869b commit 88761bc

File tree

15 files changed

+151
-11
lines changed

15 files changed

+151
-11
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.17.0
2+
current_version = 1.17.1
33
message = Bump version to {new_version}
44
commit = True
55
tag = True

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
### Removed
1717

1818

19+
## [1.17.1] 2022-11-06
20+
21+
### Added
22+
23+
* Added `compas_rhino.geometry.RhinoCurve.offset`.
24+
* Added `compas.geometry.Surface.from_plane`.
25+
* Added `compas.geometry.surfaces.surface.new_surface_from_plane` pluggable.
26+
* Added `compas_rhino.geometry.surfaces.new_surface_from_plane` plugin.
27+
* Added `compas_rhino.geometry.RhinoSurface.intersections_with_curve`.
28+
29+
### Changed
30+
31+
* Fixed bug in `compas_rhino.geometry.RhinoCurve.frame_at`.
32+
* Changed implementation of `compas.datastructures.mesh_planarize_faces` to include edge midpoints.
33+
34+
### Removed
35+
36+
1937
## [1.17.0] 2022-10-07
2038

2139
### Added

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def patched_m2r2_setup(app):
4242
copyright = "Block Research Group - ETH Zurich"
4343
author = "Tom Van Mele"
4444

45-
release = "1.17.0"
45+
release = "1.17.1"
4646
version = ".".join(release.split(".")[0:2])
4747

4848
master_doc = "index"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def read(*names, **kwargs):
2424

2525
setup(
2626
name="COMPAS",
27-
version="1.17.0",
27+
version="1.17.1",
2828
description="The COMPAS framework",
2929
long_description=long_description,
3030
long_description_content_type="text/markdown",

src/compas/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
__license__ = "MIT License"
5151
__email__ = "[email protected]"
5252

53-
__version__ = "1.17.0"
53+
__version__ = "1.17.1"
5454

5555
version = LooseVersion(compas.__version__)
5656
versionstring = version.vstring.split("-")[0]

src/compas/datastructures/halfedge/halfedge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ def vertices_where_predicate(self, predicate, data=False):
712712
----------
713713
predicate : callable
714714
The condition you want to evaluate.
715-
The callable takes 2 parameters: the vertex identifier and the vertex attributs,
715+
The callable takes 2 parameters: the vertex identifier and the vertex attributes,
716716
and should return True or False.
717717
data : bool, optional
718718
If True, yield the vertex attributes in addition to the vertex identifiers.

src/compas/datastructures/mesh/planarisation.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
from compas.geometry import project_points_plane
66
from compas.geometry import centroid_points
7+
from compas.geometry import midpoint_point_point
78
from compas.geometry import distance_point_point
89
from compas.geometry import distance_line_line
910
from compas.geometry import bestfit_plane
1011

1112
from compas.utilities import window
13+
from compas.utilities import pairwise
1214

1315

1416
__all__ = [
@@ -98,7 +100,10 @@ def mesh_planarize_faces(mesh, fixed=None, kmax=100, callback=None, callback_arg
98100
for fkey in mesh.faces():
99101
vertices = mesh.face_vertices(fkey)
100102
points = [mesh.vertex_coordinates(key) for key in vertices]
101-
plane = bestfit_plane(points)
103+
midpoints = []
104+
for a, b in pairwise(points + points[:1]):
105+
midpoints.append(midpoint_point_point(a, b))
106+
plane = bestfit_plane(points + midpoints)
102107
projections = project_points_plane(points, plane)
103108

104109
for index, key in enumerate(vertices):

src/compas/geometry/surfaces/surface.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ def new_surface(cls, *args, **kwargs):
1414
raise NotImplementedError
1515

1616

17+
@pluggable(category="factories")
18+
def new_surface_from_plane(cls, *args, **kwargs):
19+
raise NotImplementedError
20+
21+
1722
class Surface(Geometry):
1823
"""Class representing a general surface object.
1924
@@ -107,6 +112,22 @@ def from_obj(cls, filepath):
107112
"""
108113
raise NotImplementedError
109114

115+
@classmethod
116+
def from_plane(cls, plane, *args, **kwargs):
117+
"""Construct a surface from a plane.
118+
119+
Parameters
120+
----------
121+
plane : :class:`compas.geometry.Plane`
122+
The plane.
123+
124+
Returns
125+
-------
126+
:class:`~compas.geometry.Surface`
127+
128+
"""
129+
return new_surface_from_plane(cls, plane, *args, **kwargs)
130+
110131
# ==============================================================================
111132
# Conversions
112133
# ==============================================================================
@@ -393,3 +414,17 @@ def intersections_with_line(self, line):
393414
394415
"""
395416
raise NotImplementedError
417+
418+
def intersections_with_curve(self, curve):
419+
"""Compute the intersections with a curve.
420+
421+
Parameters
422+
----------
423+
line : :class:`~compas.geometry.Curve`
424+
425+
Returns
426+
-------
427+
list[:class:`~compas.geometry.Point`]
428+
429+
"""
430+
raise NotImplementedError

src/compas_blender/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def redraw():
5151
bpy.ops.wm.redraw_timer(type="DRAW_WIN_SWAP", iterations=1)
5252

5353

54-
__version__ = "1.17.0"
54+
__version__ = "1.17.1"
5555

5656

5757
def _check_blender_version(version):

src/compas_ghpython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import compas
2121
import compas_rhino
2222

23-
__version__ = "1.17.0"
23+
__version__ = "1.17.1"
2424

2525
if compas.is_rhino():
2626
from .utilities import * # noqa: F401 F403

0 commit comments

Comments
 (0)