Skip to content

Commit

Permalink
v6
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomusy committed Oct 5, 2021
1 parent bbeef78 commit 0403e02
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 46 deletions.
4 changes: 2 additions & 2 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

20 changes: 11 additions & 9 deletions vedo/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vedo/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 10 additions & 24 deletions vedo/docs_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions vedo/dolfin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions vedo/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
6 changes: 2 additions & 4 deletions vedo/pointcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion vedo/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
_version='2021.0.5dev7'
_version='2021.0.6'

0 comments on commit 0403e02

Please sign in to comment.