资源简介
matlab读取stl文件,stl是3D 打印技术
代码片段和文件信息
function stlwrite(filename varargin)
%STLWRITE Write STL file from patch or surface data.
%
% STLWRITE(FILE FV) writes a stereolithography (STL) file to FILE for a
% triangulated patch defined by FV (a structure with fields ‘vertices‘
% and ‘faces‘).
%
% STLWRITE(FILE FACES VERTICES) takes faces and vertices separately
% rather than in an FV struct
%
% STLWRITE(FILE X Y Z) creates an STL file from surface data in X Y
% and Z. STLWRITE triangulates this gridded data into a triangulated
% surface using triangulations options specified below. X Y and Z can be
% two-dimensional arrays with the same size. If X and Y are vectors with
% length equal to SIZE(Z2) and SIZE(Z1) respectively they are passed
% through MESHGRID to create gridded data. If X or Y are scalar values
% they are used to specify the X and Y spacing between grid points.
%
% STLWRITE(...‘PropertyName‘VALUE‘PropertyName‘VALUE...) writes an STL file using the
% following property values:
%
% MODE - File is written using ‘binary‘ (default) or ‘ascii‘.
%
% title - Header text (max 80 characters) written to the STL file.
%
% TRIANGULATION - When used with gridded data TRIANGULATION is either:
% ‘delaunay‘ - (default) Delaunay triangulation of X Y
% ‘f‘ - Forward slash division of grid quadrilaterals
% ‘b‘ - Back slash division of quadrilaterals
% ‘x‘ - Cross division of quadrilaterals
% Note that ‘f‘ ‘b‘ or ‘t‘ triangulations require FEX entry 28327 “mesh2tri“.
%
% FACECOLOR - Single colour (1-by-3) or one-colour-per-face (N-by-3) vector of RGB colours
% for face/vertex input. RGB range is 5 bits (0:31) stored in VisCAM/SolidView
% format (http://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL)
%
% Example 1:
% % Write binary STL from face/vertex data
% tmpvol = zeros(202020); % Empty voxel volume
% tmpvol(8:128:125:15) = 1; % Turn some voxels on
% fv = isosurface(tmpvol 0.99); % Create the patch object
% stlwrite(‘test.stl‘fv) % Save to binary .stl
%
% Example 2:
% % Write ascii STL from gridded data
% [XY] = deal(1:40); % Create grid reference
% Z = peaks(40); % Create grid height
% stlwrite(‘test.stl‘XYZ‘mode‘‘ascii‘)
% Original idea adapted from surf2stl by Bill McDonald. Huge speed
% improvements implemented by Oliver Woodford. Non-Delaunay triangulation
% of quadrilateral surface input requires mesh2tri by Kevin Moerman.
% FaceColor implementation by Grant Lohsen.
%
% Author: Sven Holcombe 11-24-11
% Check valid filename path
path = fileparts(filename);
if ~isempty(path) && ~exist(path‘dir‘)
error(‘Directory “%s“ does not exist.‘
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1334 2012-08-20 02:14 license.txt
文件 8302 2012-08-20 02:14 stlwrite.m
相关资源
- 单一图像去雾
- 声纹识别
- 视频背景提取
- 图像裂纹提取
- tfristft 令x(n)=5exp(j*0.15*n*n)+6exp(
- CT图像三维体绘制
- 视频监控阴影去除
- 手写体数字识别的训练数据库
- 数字水印参考代码
- 提取瑞雷面波的频散曲线
- matlab颜色直方图算法
- retinex图像增强
- HOG 根据Dalal提出的HOG特征算法编写
- MATLAB图像去雾处理
- Bregman图像处理
- 车桥耦合振动的相关学术论文
- 帧间差分法检测运动目标
- 一维距离像(HRRP)及FFT成像对比
- knn matting 国外写的knn-matting
- Matlab UDP 主机间的数据通讯
- 随机子空间集成分类器
- 检测ECG信号的R波
- 基于sift算法的图像拼接
- 基于遗传算法的配送中心选址
- 车牌识别系统
-
simuli
nk仿真spwm逆变器 - 多尺度LBP
- matlab ransac 此ransac为图像匹配的一个重
- 将2D图像转换为红蓝3D效果
- 车流量检测
评论
共有 条评论