Skip to content

Commit 176fad4

Browse files
committed
Merge branch 'master' of https://github.com/compas-dev/compas
2 parents f832b89 + 4069392 commit 176fad4

File tree

12 files changed

+193
-71
lines changed

12 files changed

+193
-71
lines changed

.bumpversion.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ search = __version__ = '{current_version}'
2929
replace = __version__ = '{new_version}'
3030

3131
[bumpversion:file:CHANGELOG.md]
32-
search = [Unreleased]
33-
replace = {new_version}
32+
search = Unreleased
33+
replace = [{new_version}] {now:%Y-%m-%d}
3434

CHANGELOG.md

Lines changed: 78 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,102 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
- Support for relative mesh references in URDF.
12+
### Changed
13+
14+
- Fix exception on Rhino Mac.
15+
- Fix missing import on `compas_rhino.geometry`.
16+
17+
### Removed
18+
19+
## [0.5.0] 2019-03-15
20+
21+
### Added
22+
23+
- Add `Circle` and `Sphere` primitives to `compas.geometry`.
24+
- Add functions to `Plane` and `Box` primitives.
25+
- Add functions to `compas_rhino` curve: `length` and `is_closed`.
26+
- Add functions to `compas_rhino` surface: `kinks`, `closest_point`, `closest_point_on_boundaries`, and functions for mapping/remapping between XYZ and UV(0) spaces based on surface's parametrization (`point_xyz_to_uv`, `point_uv_to_xyz`, `line_uv_to_xyz`, `polyline_uv_to_xyz`, `mesh_uv_to_xyz`)
27+
- Add `is_scalable` to `compas.robots.Joint`.
28+
29+
### Changed
1330

14-
## 0.5.0
31+
- Fix exception in `Plane.transform`.
32+
- Fix installer to remove old symlinks.
33+
- Fix RPC proxy server.
34+
35+
## [0.4.22] 2019-03-05
1536

1637
### Added
1738

39+
- Add pretty print option to JSON formatter.
40+
- Add remeshing based on `triangle`.
41+
- Add compatibility with ETO forms to `compas_rhino` edge modifiers.
42+
43+
## [0.4.21] 2019-03-04
44+
45+
### Changed
46+
47+
- Fix import in `compas_rhino` vertex modifiers.
48+
49+
## [0.4.20] 2019-03-04
50+
51+
### Removed
52+
53+
- Remove `download_image_from_remote` utility function.
54+
55+
## [0.4.12] 2019-03-04
56+
57+
### Changed
58+
59+
- Small fixes on Rhino forms support.
60+
61+
## [0.4.11] 2019-03-03
62+
63+
### Added
64+
65+
- New function to join network edges into polylines: `network_polylines`.
66+
- New mesh functions: `mesh_offset`, `mesh_thicken`, `mesh_weld` and `meshes_join_and_weld`.
67+
- New mesh functions: `face_skewness`, `face_aspect_ratio`, `face_curvature` and `vertex_curvature`.
68+
- New functions to get disconnected elements of `Mesh`: `mesh_disconnected_vertices`, `mesh_disconnected_faces`, `mesh_explode`.
69+
- New functions to get disconnected elements of `Network`: `network_disconnected_vertices`, `network_disconnected_edges`, `network_explode`.
70+
- Add statistics utility functions: `average`, `variance`, `standard_deviation`.
71+
- Add `binomial_coefficient` function.
72+
- Add option to create `Network` and `Mesh` from dictionaries of vertices and faces.
73+
- Add `face_adjacency_vertices` to `Mesh`
74+
- Add optional prefix to the rhino name attribute processor
75+
- Add `mesh_move_vertices` to `compas_rhino`.
76+
- Add support for relative mesh references in URDF.
77+
78+
### Changed
79+
80+
- Fix mesh centroid and mesh normal calculation.
81+
- Refactor of drawing functions in `compas_blender`.
82+
- Fix material creation in `compas_blender`.
83+
- New default for subdivision: `catmullclark`.
84+
85+
## [0.4.9] 2019-02-10
86+
87+
### Added
88+
89+
- New class methods for `Polyhedron`: `from_platonicsolid` and `from_vertices_and_faces`.
1890
- Constrained and conforming Delaunay triangulations based on Triangle.
1991
- Predicate-based filtering of vertices and edges.
2092

2193
### Changed
2294

23-
- Updated Rhino installation merging Win32 and Mac implementations and defaulting the bootstrapper to the active python even if no CONDA environment is active during install.
95+
- Fix exception in `angle_vectors_signed` if vectors aligned
96+
- Fix exception in `Polyline.point`
97+
- Update Rhino installation merging Win32 and Mac implementations and defaulting the bootstrapper to the active python even if no CONDA environment is active during install.
2498

2599
### Removed
26100

27101
- Bound mesh operations.
28102

29-
## [0.4.8] - 2019-01-28
103+
## [0.4.8] 2019-01-28
30104

31105
### Added
32106

33107
- Curve tangent at parameter.
34108
- Box shape.
35109
- Numpy-based mesh transformations.
36110
- Option to share axes among plotters.
37-
38-
### Changed
39-
40-
### Removed
41-

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ If you find a bug, please help us solve it by [filing a report](https://github.c
6161
If you want to contribute, check out the [contribution guidelines](https://compas-dev.github.io/main/contributions.html).
6262

6363

64+
## Changelog
65+
66+
See changes between releases on the [changelog](https://compas-dev.github.io/main/changelog.html).
67+
68+
6469
## License
6570

6671
The main library of **COMPAS** is [released under the MIT license](https://compas-dev.github.io/main/license.html).

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. mdinclude:: ../CHANGELOG.md

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
'sphinx.ext.mathjax',
4343
'sphinx.ext.napoleon',
4444
'matplotlib.sphinxext.plot_directive',
45+
'm2r',
4546
]
4647

4748
# autodoc options

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ The main library of COMPAS
1313
tutorials
1414
api
1515
contributions
16+
changelog
1617
citing
1718
license

requirements-dev.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
sphinx>=1.6
2-
sphinx_compas_theme>=0.1.10
3-
ipython>=5.8
4-
invoke>=0.14
51
bumpversion>=0.5
62
check-manifest>=0.36
73
flake8
8-
pytest==3.2
4+
invoke>=0.14
5+
ipython>=5.8
96
isort
7+
m2r
8+
pytest==3.2
9+
sphinx_compas_theme>=0.1.10
10+
sphinx>=1.6
1011
twine
1112
-e .

src/compas/numerical/devo/devo_numpy.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ def devo_numpy(fn, bounds, population, generations, limit=0, elites=0.2, F=0.8,
9797

9898
# Population
9999

100-
agents = (rand(k, population) * (ub - lb) + lb)
100+
agents = (rand(k, population) * (ub - lb) + lb)
101+
agents[:, :int(round(population * 0.05))] *= 0
102+
101103
candidates = tile(array(range(population)), (1, population))
102104
candidates = reshape(delete(candidates, where(eye(population).ravel() == 1)), (population, population - 1))
103105

@@ -185,7 +187,7 @@ def devo_numpy(fn, bounds, population, generations, limit=0, elites=0.2, F=0.8,
185187
data[min(fbin), ts, :] = [1, 0, 0]
186188
data[max(fbin), ts, :] = [0, 0, 1]
187189

188-
if ts % 10 == 0:
190+
if ts % printout == 0:
189191
plt.imshow(data, origin='lower', aspect=aspect)
190192
plt.plot([generations * 0.5] * 2, [0, ydiv], ':k')
191193
plt.yticks(yticks, ylabels, rotation='horizontal')

src/compas/numerical/drx/drx_numpy.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,16 +326,26 @@ def _create_arrays(structure):
326326
ind_t = []
327327

328328
uv_i = structure.uv_index()
329+
329330
for ui, vi in structure.edges():
330-
i = uv_i[(ui, vi)]
331-
edge = structure.edge[ui][vi]
332-
E[i] = edge.get('E', 0)
333-
A[i] = edge.get('A', 0)
334-
l0[i] = edge.get('l0', structure.edge_length(ui, vi))
335-
s0[i] = edge.get('s0', 0)
331+
332+
i = uv_i[(ui, vi)]
333+
E[i] = structure.get_edge_attribute(key=(ui, vi), name='E')
334+
A[i] = structure.get_edge_attribute(key=(ui, vi), name='A')
335+
336+
if structure.get_edge_attribute(key=(ui, vi), name='l0'):
337+
l0[i] = structure.get_edge_attribute(key=(ui, vi), name='l0')
338+
else:
339+
l0[i] = structure.edge_length(ui, vi)
340+
341+
if structure.get_edge_attribute(key=(ui, vi), name='s0'):
342+
s0[i] = structure.get_edge_attribute(key=(ui, vi), name='s0')
343+
else:
344+
s0[i] = 0
345+
336346
u[i] = k_i[ui]
337347
v[i] = k_i[vi]
338-
ct = edge.get('ct', None)
348+
ct = structure.get_edge_attribute(key=(ui, vi), name='ct')
339349
if ct == 'c':
340350
ind_c.append(i)
341351
elif ct == 't':

src/compas_blender/utilities/drawing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def xdraw_lines(lines, centroid=True, layer=None):
9494
object.data.fill_mode = 'FULL'
9595
object.data.bevel_depth = data.get('width', 0.05)
9696
object.data.bevel_resolution = 0
97-
object.data.resolution_u = 2
97+
object.data.resolution_u = 20
9898
object.data.materials.append(create_material(color=data.get('color', [1, 1, 1])))
9999
objects[c] = object
100100
return _link_objects(objects=objects, layer=layer)
@@ -273,7 +273,7 @@ def draw_line(start=[0, 0, 0], end=[1, 1, 1], width=0.05, centroid=True, name='l
273273
object.data.fill_mode = 'FULL'
274274
object.data.bevel_depth = width
275275
object.data.bevel_resolution = 0
276-
object.data.resolution_u = 2
276+
object.data.resolution_u = 20
277277
object.data.materials.append(create_material(color=color))
278278
bpy.context.collection.objects.link(object)
279279
if layer:

0 commit comments

Comments
 (0)