-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add automatic scalar range at pointdata.setitem
- Loading branch information
Showing
15 changed files
with
148 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
# Example of usage of the madcad library | ||
"""Convert a vedo mesh to a madcad mesh and vice versa""" | ||
# See https://pymadcad.readthedocs.io/en/latest/index.html | ||
import vedo | ||
import numpy as np | ||
import madcad | ||
|
||
########################################################################## | ||
mesh = vedo.Mesh(vedo.dataurl+"bunny.obj") | ||
mesh.compute_normals() | ||
|
||
############################################################ | ||
madcad_mesh = vedo.utils.vedo2madcad(mesh) | ||
|
||
madcad.thicken(madcad_mesh, thickness=0.1) | ||
madcad.show([madcad_mesh]) | ||
|
||
|
||
########################################################################## | ||
############################################################# | ||
vedo_mesh = vedo.utils.madcad2vedo(madcad_mesh) | ||
|
||
arrs = vedo.Arrows(vedo_mesh.vertices, vedo_mesh.vertices + 0.01 * vedo_mesh.pointdata["Normals"]) | ||
vedo.show(mesh, arrs, axes=1).close() | ||
verts = vedo_mesh.vertices | ||
norms = vedo_mesh.pointdata["Normals"] | ||
arrs = vedo.Arrows(verts, verts + 0.005 * norms) | ||
vedo.show(mesh, arrs, __doc__, axes=1).close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
_version = '2023.5.0+dev11' | ||
_version = '2023.5.0+dev12' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters