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> | |
#include <string> | |
#include <vector> | |
#include <fstream> | |
int vol2tet(const std::string& filename, | |
std::vector<size_t>& tet, | |
std::vector<double>& verts) | |
{ | |
std::ifstream ifs(filename.c_str()); |
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
# 拷贝字体到 /usr/share/fonts | |
mkfontscale | |
mkfontdir | |
# 查看到刚安装的字体了 | |
fc-list :lang=zh |
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
''' | |
# blender-mtl-exporter | |
This addons can export all custom properties of all materials in the *.blend file | |
# Usage | |
Just open the "File > Export > Material (.mtl)" | |
''' | |
import bpy |
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
#!/usr/bin/env python | |
"""Convert UnstructuredGrid in .vtk files to STL files.""" | |
import sys | |
import vtk | |
if len(sys.argv) < 2 or sys.argv[1] == '-h' or sys.argv[1] == '--help': | |
print('Usage: vtk-unstructuredgrid-to-stl.py <input.vtk> <output.stl>') | |
sys.exit(1) |
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)!=3): | |
print('Usage: ', sys.argv[0], 'input.vtk output.obj') | |
sys.exit() | |
import vtk | |
reader = vtk.vtkUnstructuredGridReader() | |
reader.SetFileName(sys.argv[1]) |
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 | |
from paraview.simple import * | |
import sys | |
import vtk | |
if(len(sys.argv) < 3): | |
print('Usage: ', sys.argv[0], 'input.obj', 'output.png', '[camera.pvcc]') | |
reader = WavefrontOBJReader(FileName=sys.argv[1]) | |
Show(reader) |
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 | |
ren = vtk.vtkRenderer() | |
renWin = vtk.vtkRenderWindow() | |
renWin.AddRenderer(ren) | |
renWin.SetSize(512,512) | |
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
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
'use strict'; | |
var dict = []; | |
var dict2 = {}; | |
var i, j, t0, t1; | |
var ICNT = 1000; | |
var JCNT = 1000; | |
t0 = performance.now(); | |
for (i = 0; i <= ICNT; i += 2) { |
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
content = JSON.stringify(SOMETHING); | |
blob = new Blob([content],{type:"octet/stream"}); | |
url = window.URL.createObjectURL(blob); | |
console.log(url); |
OlderNewer