Skip to content

Commit 3f8dc5f

Browse files
committed
log the meshgrid
1 parent b7e3b0d commit 3f8dc5f

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2929
* Added `Graph.node_sample`, `Graph.edge_sample`.
3030
* Added `Halfedge.vertex_sample`, `Halfedge.edge_sample`, `Halfedge.face_sample`.
3131
* Added `Halfface.vertex_sample`, `Halfface.edge_sample`, `Halfface.face_sample`, `Halfface.cell_sample`.
32+
* Added `Mesh.from_meshgrid`.
3233

3334
### Changed
3435

src/compas/datastructures/mesh/mesh.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,24 @@ def to_polygons(self):
618618

619619
@classmethod
620620
def from_meshgrid(cls, dx, nx, dy=None, ny=None):
621+
"""Create a mesh from faces and vertices on a regular grid.
622+
623+
Parameters
624+
----------
625+
dx : float
626+
The size of the grid in the X direction.
627+
nx : int
628+
The number of faces in the X direction.
629+
dy : float, optional
630+
The size of the grid in the Y direction, if different form X.
631+
ny : int, optional
632+
The number of faces in the Y direction, if different from Y.
633+
634+
Returns
635+
-------
636+
Mesh
637+
A mesh object.
638+
"""
621639
dy = dy or dx
622640
ny = ny or nx
623641

src/compas_plotters/artists/circleartist.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def draw(self) -> None:
6868
facecolor=self.facecolor,
6969
edgecolor=self.edgecolor,
7070
fill=self.fill,
71+
alpha=self.alpha,
7172
zorder=self.zorder
7273
)
7374
self._mpl_circle = self.plotter.axes.add_artist(circle)

src/compas_plotters/artists/ellipseartist.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def draw(self) -> None:
6767
facecolor=self.facecolor,
6868
edgecolor=self.edgecolor,
6969
fill=self.fill,
70+
alpha=self.alpha,
7071
zorder=self.zorder)
7172
self._mpl_ellipse = self.plotter.axes.add_artist(ellipse)
7273

0 commit comments

Comments
 (0)