rcad 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/rcad +17 -0
- data/lib/rcad/version.rb +1 -1
- data/pedestal.rb +7 -7
- metadata +4 -2
data/bin/rcad
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rcad'
|
4
|
+
require 'rcad/gears'
|
5
|
+
require 'rcad/nuts'
|
6
|
+
|
7
|
+
ARGV.each do |filename|
|
8
|
+
load(filename, true)
|
9
|
+
|
10
|
+
if $shape
|
11
|
+
output_file = File.basename(filename, ".*") + ".stl"
|
12
|
+
printf("Rendering '%s'\n", output_file)
|
13
|
+
write_stl(output_file)
|
14
|
+
|
15
|
+
clear_shape
|
16
|
+
end
|
17
|
+
end
|
data/lib/rcad/version.rb
CHANGED
data/pedestal.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
|
1
|
+
require 'rcad'
|
2
2
|
|
3
3
|
|
4
4
|
base = box(10.cm, 10.cm, 3.cm)
|
5
5
|
.move(-5.cm, -5.cm, 0)
|
6
6
|
|
7
|
-
pedestal =
|
8
|
-
|
9
|
-
|
7
|
+
pedestal = add do
|
8
|
+
~base
|
9
|
+
~cylinder(8.cm, 7.cm).move_z(3.cm)
|
10
|
+
~base.move_z(3.cm + 7.cm)
|
11
|
+
end
|
10
12
|
|
11
|
-
pedestal
|
12
|
-
.rot_z(45)
|
13
|
-
.write_stl("pedestal.stl")
|
13
|
+
~pedestal.rot_z(45)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -78,7 +78,8 @@ dependencies:
|
|
78
78
|
description: Solid CAD programming library
|
79
79
|
email:
|
80
80
|
- yasapir@gmail.com
|
81
|
-
executables:
|
81
|
+
executables:
|
82
|
+
- rcad
|
82
83
|
extensions:
|
83
84
|
- ext/_rcad/extconf.rb
|
84
85
|
extra_rdoc_files: []
|
@@ -87,6 +88,7 @@ files:
|
|
87
88
|
- Gemfile
|
88
89
|
- README.md
|
89
90
|
- Rakefile
|
91
|
+
- bin/rcad
|
90
92
|
- ext/_rcad/_rcad.cpp
|
91
93
|
- ext/_rcad/extconf.rb
|
92
94
|
- lib/rcad.rb
|