【文件属性】:
文件名称:stl-ruby:读写STL文件
文件大小:9KB
文件格式:ZIP
更新时间:2021-06-30 16:47:26
Ruby
STL
读取、写入和操作 ASCII 和二进制
安装
将此行添加到应用程序的 Gemfile 中:
gem 'stl'
然后执行:
$ bundle
或者自己安装:
$ gem install stl
用法
require 'stl'
stl = STL . read ( 'my_awesome.stl' )
stl . faces # => [Face, ...]
要将 ASCII STL 文件转换为二进制文件:
STL . read ( 'ascii.stl' ) . write ( 'binary.stl' , :binary )
写入二进制文件实际上是默认设置,因此如果您愿意,也可以省略要写入的最后一个参数。
STL . read ( 'ascii.stl' ) . write ( 'binary.stl' )
您还可以将二进制文件转换为
【文件预览】:
stl-ruby-master
----lib()
--------stl()
--------stl.rb(4KB)
----Gemfile(88B)
----Rakefile(194B)
----README.markdown(2KB)
----.travis.yml(40B)
----test()
--------fixtures()
--------stl.rb(4KB)
----stl.gemspec(900B)
----.gitignore(517B)