diff --git a/docs/changes.md b/docs/changes.md index cb3787f4..d729e3ba 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -67,8 +67,8 @@ same for cell/face data: `myobj.celldata["arrayname"]` `vedo -r optics_main1` `vedo -r optics_main2` `vedo -r optics_main3` -`vedo -r morphomatics_tube` `vedo -r warp4` `vedo -r voronoi` -`vedo -r chain` +`vedo -r drag_chain` +`vedo -r morphomatics_tube` diff --git a/vedo/cli.py b/vedo/cli.py index 0680c880..a0237362 100644 --- a/vedo/cli.py +++ b/vedo/cli.py @@ -4,15 +4,17 @@ Command Line Interface module ----------------------------- -# Type for help -vedo -h - -# Some useful bash aliases: -alias v='vedo ' -alias vv='vedo -bg blackboard -bg2 gray3 -z 1.05 -k glossy -c blue9 ' -alias vr='vedo --run ' # to search and run examples by name -alias vs='vedo -i --search ' # to search for a string in examples -alias vi='vedo --image -x0 -z 1.2 -n ' # to view multiple images +.. code-block:: python + + # Type for help + vedo -h + + # Some useful bash aliases: + alias v='vedo ' + alias vv='vedo -bg blackboard -bg2 gray3 -z 1.05 -k glossy -c blue9 ' + alias vr='vedo --run ' # to search and run examples by name + alias vs='vedo -i --search ' # to search for a string in examples + alias vi='vedo --image -x0 -z 1.2 -n ' # to view multiple images """ import sys, argparse, os, glob diff --git a/vedo/docs.py b/vedo/docs.py index 3f43d6c3..8142ae49 100644 --- a/vedo/docs.py +++ b/vedo/docs.py @@ -5,7 +5,7 @@ #################################################################################### #################################################################################### ##### To generate documentation you must uncomment this line: -# from vedo.docs_defs import _substitutions_defs as _defs +#from vedo.docs_defs import _substitutions_defs as _defs # Then: # cd vedo/docs diff --git a/vedo/docs_defs.py b/vedo/docs_defs.py index 3c189063..ae752fcd 100644 --- a/vedo/docs_defs.py +++ b/vedo/docs_defs.py @@ -3,13 +3,6 @@ _substitutions_defs = """ -.. |thinplate_grid.py| replace:: thinplate_grid.py -.. _thinplate_grid.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_grid.py -.. |thinplate_grid| image:: https://user-images.githubusercontent.com/32848391/51433540-d188b380-1c4c-11e9-81e7-a1cf4642c54b.png - :width: 200 px - :target: thinplate_grid.py_ - :alt: thinplate_grid.py - .. |gyroscope2.py| replace:: gyroscope2.py .. _gyroscope2.py: https://github.com/marcomusy/vedo/tree/master/examples/simulations/gyroscope2.py .. |gyroscope2| image:: https://user-images.githubusercontent.com/32848391/50738942-687b5780-11d9-11e9-97f0-72bbd63f7d6e.gif @@ -318,12 +311,12 @@ :target: clustering.py_ :alt: clustering.py -.. |thinplate_morphing1.py| replace:: thinplate_morphing1.py -.. _thinplate_morphing1.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_morphing1.py -.. |thinplate_morphing1| image:: https://user-images.githubusercontent.com/32848391/51403917-34495480-1b52-11e9-956c-918c7805a9b5.png +.. |warp1.py| replace:: warp1.py +.. _warp1.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/warp1.py +.. |warp1| image:: https://user-images.githubusercontent.com/32848391/51403917-34495480-1b52-11e9-956c-918c7805a9b5.png :width: 200 px - :target: thinplate_morphing1.py_ - :alt: thinplate_morphing1.py + :target: warp1.py_ + :alt: warp1.py .. |colorcubes.py| replace:: colorcubes.py .. _colorcubes.py: https://github.com/marcomusy/vedo/tree/master/examples/basic/colorcubes.py @@ -493,13 +486,6 @@ :target: splitmesh.py_ :alt: splitmesh.py -.. |thinplate_morphing2.py| replace:: thinplate_morphing2.py -.. _thinplate_morphing2.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_morphing2.py -.. |thinplate_morphing2| image:: https://user-images.githubusercontent.com/32848391/52142303-9927a300-2658-11e9-98db-ebad4883f99f.png - :width: 200 px - :target: thinplate_morphing2.py_ - :alt: thinplate_morphing2.py - .. |projectsphere.py| replace:: projectsphere.py .. _projectsphere.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/projectsphere.py .. |projectsphere| image:: https://user-images.githubusercontent.com/32848391/52144163-c9be0b80-265d-11e9-9ce6-d6f2b919c214.png @@ -924,12 +910,12 @@ .. |fenics_logo| image:: https://user-images.githubusercontent.com/32848391/58764910-3940fa80-856d-11e9-8160-af89a5ab5d02.gif -.. |thinplate_morphing_2d.py| replace:: thinplate_morphing_2d.py -.. _thinplate_morphing_2d.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/thinplate_morphing_2d.py -.. |thinplate_morphing_2d| image:: https://user-images.githubusercontent.com/32848391/59032715-385ae200-8867-11e9-9b07-7f4f8fbfa5bd.png +.. |warp3.py| replace:: warp3.py +.. _warp3.py: https://github.com/marcomusy/vedo/tree/master/examples/advanced/warp3.py +.. |warp3| image:: https://user-images.githubusercontent.com/32848391/59032715-385ae200-8867-11e9-9b07-7f4f8fbfa5bd.png :width: 200 px - :target: thinplate_morphing_2d.py_ - :alt: thinplate_morphing_2d.py + :target: warp3.py_ + :alt: warp3.py .. |interpolateVolume.py| replace:: interpolateVolume.py .. _interpolateVolume.py: https://github.com/marcomusy/vedo/tree/master/examples/volumetric/interpolateVolume.py diff --git a/vedo/dolfin.py b/vedo/dolfin.py index 5feccb17..9622fa6f 100644 --- a/vedo/dolfin.py +++ b/vedo/dolfin.py @@ -852,8 +852,8 @@ def MeshArrows(*inputobj, **options): :param float rescale: apply a rescaling factor to the length """ s = options.pop("s", None) - scale = options.pop("scale", 1) c = options.pop("c", "gray") + scale = options.pop("scale", 1) alpha = options.pop("alpha", 1) res = options.pop("res", 12) @@ -871,14 +871,14 @@ def MeshArrows(*inputobj, **options): printc("\times Error: cannot show Arrows for 1D scalar values!", c='r') raise RuntimeError() - endPoints = startPoints + u_values + endPoints = startPoints + u_values *scale if u_values.shape[1] == 2: # u_values is 2D u_values = np.insert(u_values, 2, 0, axis=1) # make it 3d startPoints = np.insert(startPoints, 2, 0, axis=1) # make it 3d endPoints = np.insert(endPoints, 2, 0, axis=1) # make it 3d actor = shapes.Arrows(startPoints, endPoints, - s=s, scale=scale, alpha=alpha, res=res) + s=s, alpha=alpha, res=res) actor.color(c) actor.mesh = mesh actor.u = u diff --git a/vedo/mesh.py b/vedo/mesh.py index f5f114d8..830f3233 100644 --- a/vedo/mesh.py +++ b/vedo/mesh.py @@ -22,9 +22,9 @@ def merge(*meshs, flag=False): To keep track of the original identities of the input mesh you can set flag. In this case a point array of IDs is added to the merged output mesh. - .. hint:: |thinplate_grid.py|_ |value-iteration.py|_ + .. hint:: |warp1.py|_ |value-iteration.py|_ - |thinplate_grid| |value-iteration| + |warp1| |value-iteration| """ acts = [a for a in flatten(meshs) if a] diff --git a/vedo/pointcloud.py b/vedo/pointcloud.py index ffa64e4f..83ef4400 100644 --- a/vedo/pointcloud.py +++ b/vedo/pointcloud.py @@ -3135,11 +3135,9 @@ def warp(self, sourcePts, targetPts, sigma=1, mode="3d"): :param float sigma: specify the 'stiffness' of the spline. :param str mode: set the basis function to either abs(R) (for 3d) or R2LogR (for 2d meshes) - .. hint:: Examples: |thinplate_morphing1.py|_ |thinplate_morphing2.py|_ - |thinplate_grid.py|_ |thinplate_morphing_2d.py|_ |interpolateField.py|_ + .. hint:: Examples: |warp1.py|_ |warp3.py|_ |interpolateField.py|_ - |thinplate_morphing1| |thinplate_morphing2| |thinplate_grid| - |interpolateField| |thinplate_morphing_2d| + |warp1| |warp3| |interpolateField| """ if isinstance(sourcePts, Points): sourcePts = sourcePts.points() diff --git a/vedo/version.py b/vedo/version.py index 8815115a..9920a7c6 100644 --- a/vedo/version.py +++ b/vedo/version.py @@ -1 +1 @@ -_version='2021.0.5dev7' +_version='2021.0.6'