Skip to content

Commit e1c7983

Browse files
committed
all triangle and tetgen
1 parent f08c6f1 commit e1c7983

2 files changed

Lines changed: 29 additions & 29 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ function(pyigl_include prefix name)
9595
endif()
9696
file(GLOB sources "${CMAKE_CURRENT_SOURCE_DIR}/src/${subpath}/*.cpp")
9797

98-
# Just compile a single file
99-
list(FILTER sources EXCLUDE REGEX ".*/module\\.cpp$")
100-
list(GET sources 0 sources)
101-
list(APPEND sources "${CMAKE_CURRENT_SOURCE_DIR}/src/${subpath}/module.cpp")
98+
## Just compile a single file
99+
#list(FILTER sources EXCLUDE REGEX ".*/module\\.cpp$")
100+
#list(GET sources 0 sources)
101+
#list(APPEND sources "${CMAKE_CURRENT_SOURCE_DIR}/src/${subpath}/module.cpp")
102102

103103
message(STATUS "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
104104
message(STATUS "${prefix} ${name} sources: ${sources}")

tests/test_all.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ def test_version():
1010
version = igl.__version__
1111
pass
1212

13+
import igl.triangle
1314
import igl.copyleft
1415
import igl.copyleft.tetgen
1516
#import igl.copyleft.cgal
1617
#import igl.embree
17-
import igl.triangle
1818
#
1919
#
2020
##def rand_sparse(n,density):
@@ -513,30 +513,30 @@ def test_version():
513513
# hits = ei.intersectRay(origin,direction)
514514
# hits = ei.intersectRay(origin,direction,tnear=0,tfar=1)
515515
# I,C = igl.embree.reorient_facets_raycast(V,F)
516-
#
517-
#def test_tetgen():
518-
# # octahedron
519-
# V = np.array([[1,0,0],[0,1,0],[0,0,1],[-1,0,0],[0,-1,0],[0,0,-1]],dtype=np.float64)
520-
# F = np.array([[0,1,2], [0,2,4], [0,4,5], [0,5,1], [1,3,2], [1,5,3], [2,3,4], [3,5,4]],dtype=np.int64)
521-
# V,T,F,_,_,_,_,_,_ = igl.copyleft.tetgen.tetrahedralize(V,F,flags="Q")
522-
#
523-
#def test_triangle():
524-
# V = np.array([[0,0],[1,0],[1,1],[0,1]],dtype=np.float64)
525-
# E = np.array([[0,1],[1,2],[2,3],[3,0]],dtype=np.int64)
526-
# V,F,_,_,_ = igl.triangle.triangulate(V,E,flags="Qc")
527-
# V,F,_,_,_ = igl.triangle.triangulate(V,E,flags="Q")
528-
# V,F,_,_,_ = igl.triangle.triangulate(V,E,flags="Qqa0.1")
529-
# V = np.array([[0,0,0],[1,0,0],[0,1,0],[0,0,1]],dtype=np.float64)
530-
# F = np.array([[1,3,0],[3,2,0],[2,3,1]],dtype=np.int64)
531-
# scaf_data = igl.triangle.SCAFData()
532-
# b = np.array([0,1,2],dtype=np.int64)
533-
# bc = np.array([[0,0],[1,0],[0,1]],dtype=np.float64)
534-
# V_init = np.array([[0,0],[1,0],[0,1],[0.1,0.1]],dtype=np.float64)
535-
# soft_p = 0;
536-
# igl.triangle.scaf_precompute(V,F,V_init,igl.ARAP,b,bc,soft_p,scaf_data)
537-
# L,rhs = igl.triangle.scaf_system(scaf_data)
538-
# U = igl.triangle.scaf_solve(1,scaf_data)
539-
#
516+
517+
def test_tetgen():
518+
# octahedron
519+
V = np.array([[1,0,0],[0,1,0],[0,0,1],[-1,0,0],[0,-1,0],[0,0,-1]],dtype=np.float64)
520+
F = np.array([[0,1,2], [0,2,4], [0,4,5], [0,5,1], [1,3,2], [1,5,3], [2,3,4], [3,5,4]],dtype=np.int64)
521+
V,T,F,_,_,_,_,_,_ = igl.copyleft.tetgen.tetrahedralize(V,F,flags="Q")
522+
523+
def test_triangle():
524+
V = np.array([[0,0],[1,0],[1,1],[0,1]],dtype=np.float64)
525+
E = np.array([[0,1],[1,2],[2,3],[3,0]],dtype=np.int64)
526+
V,F,_,_,_ = igl.triangle.triangulate(V,E,flags="Qc")
527+
V,F,_,_,_ = igl.triangle.triangulate(V,E,flags="Q")
528+
V,F,_,_,_ = igl.triangle.triangulate(V,E,flags="Qqa0.1")
529+
V = np.array([[0,0,0],[1,0,0],[0,1,0],[0,0,1]],dtype=np.float64)
530+
F = np.array([[1,3,0],[3,2,0],[2,3,1]],dtype=np.int64)
531+
scaf_data = igl.triangle.SCAFData()
532+
b = np.array([0,1,2],dtype=np.int64)
533+
bc = np.array([[0,0],[1,0],[0,1]],dtype=np.float64)
534+
V_init = np.array([[0,0],[1,0],[0,1],[0.1,0.1]],dtype=np.float64)
535+
soft_p = 0;
536+
igl.triangle.scaf_precompute(V,F,V_init,igl.ARAP,b,bc,soft_p,scaf_data)
537+
L,rhs = igl.triangle.scaf_system(scaf_data)
538+
U = igl.triangle.scaf_solve(1,scaf_data)
539+
540540
#def test_misc():
541541
# V,F = igl.icosahedron()
542542
# BV,BF = igl.bounding_box(V,pad=1.0)

0 commit comments

Comments
 (0)