admesh 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/ext/admesh/admesh/AUTHORS +11 -0
  3. data/ext/admesh/admesh/COPYING +339 -0
  4. data/ext/admesh/admesh/ChangeLog +143 -0
  5. data/ext/admesh/admesh/ChangeLog.old +42 -0
  6. data/ext/admesh/admesh/INSTALL +14 -0
  7. data/ext/admesh/admesh/Makefile.am +62 -0
  8. data/ext/admesh/admesh/Makefile.in +1100 -0
  9. data/ext/admesh/admesh/README.md +115 -0
  10. data/ext/admesh/admesh/aclocal.m4 +1183 -0
  11. data/ext/admesh/admesh/admesh-doc.txt +475 -0
  12. data/ext/admesh/admesh/admesh.1 +173 -0
  13. data/ext/admesh/admesh/block.stl +86 -0
  14. data/ext/admesh/admesh/compile +347 -0
  15. data/ext/admesh/admesh/config.guess +1420 -0
  16. data/ext/admesh/admesh/config.h.in +65 -0
  17. data/ext/admesh/admesh/config.sub +1798 -0
  18. data/ext/admesh/admesh/configure +14671 -0
  19. data/ext/admesh/admesh/configure.ac +90 -0
  20. data/ext/admesh/admesh/depcomp +791 -0
  21. data/ext/admesh/admesh/install-sh +527 -0
  22. data/ext/admesh/admesh/libadmesh.pc.in +11 -0
  23. data/ext/admesh/admesh/ltmain.sh +9655 -0
  24. data/ext/admesh/admesh/m4/libtool.m4 +7992 -0
  25. data/ext/admesh/admesh/m4/ltoptions.m4 +384 -0
  26. data/ext/admesh/admesh/m4/ltsugar.m4 +123 -0
  27. data/ext/admesh/admesh/m4/ltversion.m4 +23 -0
  28. data/ext/admesh/admesh/m4/lt~obsolete.m4 +98 -0
  29. data/ext/admesh/admesh/missing +215 -0
  30. data/ext/admesh/admesh/src/admesh.c +425 -0
  31. data/ext/admesh/admesh/src/connect.c +971 -0
  32. data/ext/admesh/admesh/src/normals.c +333 -0
  33. data/ext/admesh/admesh/src/shared.c +262 -0
  34. data/ext/admesh/admesh/src/stl.h +201 -0
  35. data/ext/admesh/admesh/src/stl_io.c +479 -0
  36. data/ext/admesh/admesh/src/stlinit.c +377 -0
  37. data/ext/admesh/admesh/src/util.c +557 -0
  38. data/ext/admesh/extconf.rb +14 -0
  39. data/lib/admesh.rb +40 -0
  40. metadata +84 -0
@@ -0,0 +1,14 @@
1
+ require "mkmf"
2
+ require "fileutils"
3
+
4
+ find_executable("make")
5
+ source_dir = File.absolute_path(File.join(File.dirname(__FILE__), "admesh"))
6
+
7
+ FileUtils.touch(File.join(Dir.pwd, "admesh." + RbConfig::CONFIG['DLEXT']))
8
+
9
+ Dir.chdir(source_dir) do
10
+ `./configure`
11
+ `make`
12
+ end
13
+
14
+ create_makefile "#{source_dir}/admesh"
@@ -0,0 +1,40 @@
1
+ require "shellwords"
2
+
3
+ class Admesh
4
+ VERSION = "0.1.0"
5
+
6
+ class << self
7
+ def help
8
+ run "#{executable_path} #{format_args(help: true)}"
9
+ end
10
+
11
+ def perform(file, options = {})
12
+ run "#{executable_path} #{format_args(options)} #{file}"
13
+ end
14
+
15
+ private
16
+
17
+ def executable_path
18
+ binary_path = File.join(File.dirname(__FILE__), "..", "ext", "admesh", "admesh", "admesh")
19
+ File.absolute_path(binary_path)
20
+ end
21
+
22
+ def format_args(args)
23
+ args.map do |key, value|
24
+ dasherized_key = key.to_s.gsub(/_/, "-")
25
+
26
+ if value == true
27
+ "--#{dasherized_key}"
28
+ else
29
+ "--#{dasherized_key}=#{Shellwords.escape(value)}"
30
+ end
31
+ end.join(" ")
32
+ end
33
+
34
+ def run(command)
35
+ output = `#{command}`
36
+ success = $?.to_i == 0
37
+ success ? (return output) : (raise output)
38
+ end
39
+ end
40
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: admesh
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Martijn Versluis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-12-11 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: The ruby-admesh gem wraps the Admesh STL mesh manipulation tool CLI in
14
+ a Ruby gem. It has the Admesh software packaged, so installation of Admesh it not
15
+ necessary.
16
+ email: martijn@youmagine.com
17
+ executables: []
18
+ extensions:
19
+ - ext/admesh/extconf.rb
20
+ extra_rdoc_files: []
21
+ files:
22
+ - ext/admesh/admesh/AUTHORS
23
+ - ext/admesh/admesh/COPYING
24
+ - ext/admesh/admesh/ChangeLog
25
+ - ext/admesh/admesh/ChangeLog.old
26
+ - ext/admesh/admesh/INSTALL
27
+ - ext/admesh/admesh/Makefile.am
28
+ - ext/admesh/admesh/Makefile.in
29
+ - ext/admesh/admesh/README.md
30
+ - ext/admesh/admesh/aclocal.m4
31
+ - ext/admesh/admesh/admesh-doc.txt
32
+ - ext/admesh/admesh/admesh.1
33
+ - ext/admesh/admesh/block.stl
34
+ - ext/admesh/admesh/compile
35
+ - ext/admesh/admesh/config.guess
36
+ - ext/admesh/admesh/config.h.in
37
+ - ext/admesh/admesh/config.sub
38
+ - ext/admesh/admesh/configure
39
+ - ext/admesh/admesh/configure.ac
40
+ - ext/admesh/admesh/depcomp
41
+ - ext/admesh/admesh/install-sh
42
+ - ext/admesh/admesh/libadmesh.pc.in
43
+ - ext/admesh/admesh/ltmain.sh
44
+ - ext/admesh/admesh/m4/libtool.m4
45
+ - ext/admesh/admesh/m4/ltoptions.m4
46
+ - ext/admesh/admesh/m4/ltsugar.m4
47
+ - ext/admesh/admesh/m4/ltversion.m4
48
+ - ext/admesh/admesh/m4/lt~obsolete.m4
49
+ - ext/admesh/admesh/missing
50
+ - ext/admesh/admesh/src/admesh.c
51
+ - ext/admesh/admesh/src/connect.c
52
+ - ext/admesh/admesh/src/normals.c
53
+ - ext/admesh/admesh/src/shared.c
54
+ - ext/admesh/admesh/src/stl.h
55
+ - ext/admesh/admesh/src/stl_io.c
56
+ - ext/admesh/admesh/src/stlinit.c
57
+ - ext/admesh/admesh/src/util.c
58
+ - ext/admesh/extconf.rb
59
+ - lib/admesh.rb
60
+ homepage: https://github.com/Ultimaker/ruby-admesh
61
+ licenses:
62
+ - gpl
63
+ metadata: {}
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubyforge_project:
80
+ rubygems_version: 2.4.3
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Ruby wrapper gem for the Admesh library
84
+ test_files: []