Преглед на файлове

finished pass on python tutorials

Former-commit-id: c79144f9df4c6e33da52a02ff356daf87c568061
Daniele Panozzo преди 9 години
родител
ревизия
09494afb4b
променени са 3 файла, в които са добавени 16 реда и са изтрити 4 реда
  1. 5 1
      python/tutorial/504_NRosyDesign.py
  2. 5 1
      python/tutorial/505_MIQ.py
  3. 6 2
      python/tutorial/507_PolyVectorField.py

+ 5 - 1
python/tutorial/504_NRosyDesign.py

@@ -1,3 +1,7 @@
+# Add the igl library to the modules search path
+import sys, os
+sys.path.insert(0, os.getcwd() + "/../")
+
 import igl
 from math import atan2,pi,cos,sin
 
@@ -86,7 +90,7 @@ def key_down(viewer, key, modifier):
     return False
 
 # Load a mesh in OFF format
-igl.readOFF("../tutorial/shared/bumpy.off", V, F);
+igl.readOFF("../../tutorial/shared/bumpy.off", V, F);
 
 # Threshold faces with high anisotropy
 b  = igl.eigen.MatrixXi([[0]])

+ 5 - 1
python/tutorial/505_MIQ.py

@@ -1,3 +1,7 @@
+# Add the igl library to the modules search path
+import sys, os
+sys.path.insert(0, os.getcwd() + "/../")
+
 import igl
 from math import pi
 
@@ -181,7 +185,7 @@ def key_down(viewer, key, modifier):
     return False
 
 # Load a mesh in OFF format
-igl.readOFF("../tutorial/shared/3holes.off", V, F)
+igl.readOFF("../../tutorial/shared/3holes.off", V, F)
 
 # Compute face barycenters
 igl.barycenter(V, F, B)

+ 6 - 2
python/tutorial/507_PolyVectorField.py

@@ -1,3 +1,7 @@
+# Add the igl library to the modules search path
+import sys, os
+sys.path.insert(0, os.getcwd() + "/../")
+
 import igl
 import random
 from math import cos,sin,pi
@@ -101,8 +105,8 @@ def key_down(viewer, key, modifier):
 
 
 # Load a mesh in OBJ format
-igl.readOBJ("../tutorial/shared/lilium.obj", V, F)
-samples = readSamples("../tutorial/shared/lilium.samples.0.2")
+igl.readOBJ("../../tutorial/shared/lilium.obj", V, F)
+samples = readSamples("../../tutorial/shared/lilium.samples.0.2")
 
 # Compute local basis for faces
 igl.local_basis(V,F,B1,B2,B3)