Project

ruby3mf

0.01
No commit activity in last 3 years
No release in over 3 years
Parse and validate 3MF files with Ruby easily.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.5

Runtime

>= 1.10.9
>= 1.3.0
 Project Readme

Ruby3mf

Gem Version

The ruby3mf gem provides an API for parsing and validating 3MF files. It includes a logging mechanism that enables developers to programmatically check a 3MF file for warnings or errors and respond in whatever way is appropriate for their application. Ruby3mf checks everything in the 3MF core specification, from making sure that the 3MF package contains all content in the right format needed to print the file, to verifying that the geometry represents a manifold solid without holes or incorrectly oriented triangles.

Installation

Add this line to your application's Gemfile:

gem 'ruby3mf'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruby3mf

Usage

Log3mf.reset_log
Log3mf.context <filename> do |l|
    Document.read(<file>)
end
 
if Log3mf.count_entries(:error, :fatal_error) > 0
    entries = Log3mf.entries
end

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/IPGPTP/ruby3mf. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.