Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomusy committed Aug 24, 2022
1 parent a94b3c1 commit f0254ff
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 8 deletions.
18 changes: 15 additions & 3 deletions docs/changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Main changes

- pep8 parsing with pylint and general cleanup of the code.
- `pep8` parsing with pylint and general cleanup of the code.
- `Volume(np_array)` does not need array to be transposed anymore. **Warning: this may cause flipping of the x-z axes!**

---
Expand All @@ -14,7 +14,8 @@
### `pointcloud.py`
- bug fix in `clone()`
- added `labels2D()`
- added logscale for `cmap(..., logscale=True)`
- added logscale for colormapping in method `cmap(..., logscale=True)`
- added explicit label formatting for scalarbars, @XushanLu

---
### `mesh.py`
Expand Down Expand Up @@ -56,13 +57,24 @@
## Examples

### New/Revised
examples/basic/input_box.py
examples/basic/pca_ellipse.py
examples/advanced/capping_mesh.py
examples/volumetric/numpy2volume2.py
examples/volumetric/numpy2volume1.py
examples/pyplot/fourier_epicycles.py
examples/pyplot/histo_pca.py
examples/pyplot/histo_1d_b.py
examples/other/flag_labels.py
examples/other/remesh_tetgen.py
examples/other/pymeshlab2.py

### Deleted

### Broken
examples/basic/multiwindows2.py
examples/simulations/lorenz.py

examples/simulations/orbitals.py



Expand Down
4 changes: 2 additions & 2 deletions examples/other/pymeshlab2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""pymeshlab interoperability example:
Surface reconstruction by ball pivoting"""
import pymeshlab # pip install pymeshlab==2021.10
import vedo
import vedo

pts = vedo.Mesh(vedo.dataurl+'cow.vtk').points() # numpy array of vertices

Expand All @@ -11,7 +11,7 @@
ms.add_mesh(m)

p = pymeshlab.Percentage(2)
ms.surface_reconstruction_ball_pivoting(ballradius=p)
ms.generate_surface_reconstruction_ball_pivoting(ballradius=p)
# ms.compute_normals_for_point_sets()

mlab_mesh = ms.current_mesh()
Expand Down
23 changes: 21 additions & 2 deletions vedo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1735,10 +1735,29 @@ def vtkCameraToK3D(vtkcam):


def makeTicks(x0, x1, N=None, labels=None, digits=None, logscale=False, useformat=""):
"""Internal use."""
# useformat eg: ":.2f", check out https://mkaz.blog/code/python-string-format-cookbook/
"""
Generate numeric labels for the [x0, x1] range.
The format specifier could be in the format:
:[[fill]align][sign][#][0][width][,][.precision][type]
where, the options are:
fill = any character
align = < | > | = | ^
sign = + | - | " "
width = integer
precision = integer
type = b | c | d | e | E | f | F | g | G | n | o | s | x | X | %
E.g.: useformat=":.2f"
"""
# Copyright M. Musy, 2021, license: MIT.
#
# useformat eg: ":.2f", check out:
# https://mkaz.blog/code/python-string-format-cookbook/
# https://www.programiz.com/python-programming/methods/built-in/format

if x1 <= x0:
# vedo.printc("Error in makeTicks(): x0 >= x1", x0,x1, c='r')
Expand Down
2 changes: 1 addition & 1 deletion vedo/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
_version='2022.2.3.dev14'
_version='2022.3.0'

0 comments on commit f0254ff

Please sign in to comment.