This file contains hidden or 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
from __future__ import print_function | |
import sys | |
import vtk | |
reader = vtk.vtkOBJReader() | |
reader.SetFileName(sys.argv[1]) | |
reader.Update() | |
featureEdges = vtk.vtkFeatureEdges() | |
featureEdges.BoundaryEdgesOn(); |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
template<typename T, typename N> | |
class Test | |
{ | |
public: | |
Test( T i, N j ) : a(i), b(j) | |
{ | |
cout<<"普通模板类"<< a <<' ' << b << endl; |
This file contains hidden or 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
svn -R propset svn:ignore Folder -F Folder/ignore-these | |
*.fl and paraview vertex id starts from zero. |
This file contains hidden or 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
import sys | |
if(len(sys.argv)!=4): | |
print('Usage: ', sys.argv[0], 'input1.obj input2.obj output.obj') | |
sys.exit() | |
import vtk | |
def read(f): | |
reader = vtk.vtkOBJReader() |
This file contains hidden or 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
from __future__ import print_function | |
import sys | |
if(len(sys.argv)!=3): | |
print('Usage: ', sys.argv[0], 'input.vtk output.obj') | |
sys.exit() | |
import vtk | |
reader = vtk.vtkUnstructuredGridReader() |
This file contains hidden or 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
from __future__ import print_function | |
import sys | |
import vtk | |
if(len(sys.argv) < 3): | |
print('Usage: ', sys.argv[0], 'input.obj', 'output.obj') | |
reader = vtk.vtkOBJReader() | |
reader.SetFileName(sys.argv[1]) | |
reader.Update() |
This file contains hidden or 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
//!Makefile, replace $USER with your name | |
//INC=-I/home/$USER/libs/libigl/include -I/home/$USER/libs/eigen3 | |
//all: | |
// g++ -std=c++11 $(INC) voxel.cpp -o voxel.out | |
#include <igl/bounding_box.h> | |
#include <igl/readOBJ.h> | |
#include <igl/writeOFF.h> | |
#include <string> | |
#include <vector> |
This file contains hidden or 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
sed -e 's,^,^,' -e 's,$,$,' filelist > newfilelist | |
cd your_directory | |
ls | egrep -vf newfilelist | xargs -n 1 echo rm > rmscript | |
#If the files have spaces in their name (if the files have the " in the name that will not works) : | |
ls | egrep -vf newfilelist | sed 's,^\(.*\)$,rm "\1",' > rmscript |
This file contains hidden or 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
find . -name "*.zip" | while read filename; do unzip -o -d "`dirname "$filename"`" "$filename"; done; |
This file contains hidden or 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
import keyboard | |
import time | |
from tkinter import * | |
class Clock(Tk): | |
def __init__(self, master=None): | |
Tk.__init__(self, master) | |
self.wm_attributes("-topmost", 1) | |
self.createWidgets() |