crystalscad 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/examples/knurls.rb +3 -7
- data/examples/openscad_examples/example002.rb +1 -0
- data/examples/pipe.rb +5 -7
- data/examples/printed_gear.rb +4 -4
- data/lib/crystalscad/Assembly.rb +7 -2
- data/lib/crystalscad/version.rb +1 -1
- metadata +96 -69
- checksums.yaml +0 -15
data/README.md
CHANGED
@@ -29,7 +29,7 @@ Getting started
|
|
29
29
|
===========
|
30
30
|
CrystalSCAD comes with a generator that generates project stubs automatically for you. Run this command from a terminal in the directory that you want to create a project:
|
31
31
|
|
32
|
-
### \# crystalgen
|
32
|
+
### \# crystalgen new [my_project_name]
|
33
33
|
Change [my_project_name] to the name of your project
|
34
34
|
|
35
35
|
A project named "my_project" will create those files and directories:
|
data/examples/knurls.rb
CHANGED
@@ -6,14 +6,10 @@ include CrystalScad
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
res = knurled_cube([
|
10
|
-
#Total rendering time: 0 hours,
|
11
|
-
|
12
|
-
#Total rendering time: 0 hours, 1 minutes, 41 seconds
|
13
|
-
|
14
|
-
#res = knurled_cylinder(d:16,h:10)
|
15
|
-
|
9
|
+
res = knurled_cube([22,10,4])
|
10
|
+
#Total rendering time: 0 hours, 1 minutes, 6 seconds
|
16
11
|
|
12
|
+
# Total rendering time: 0 hours, 1 minutes, 1 seconds with render
|
17
13
|
|
18
14
|
res.save("knurls.scad","$fn=64;")
|
19
15
|
|
data/examples/pipe.rb
CHANGED
@@ -28,13 +28,11 @@ pipe.ccw(30,160,"blue")
|
|
28
28
|
pipe.ccw(30,60,"pink")
|
29
29
|
|
30
30
|
|
31
|
-
pipe.cw(30,60,"blue")
|
32
|
-
pipe.cw(20,60,"green")
|
33
|
-
|
34
|
-
pipe.
|
35
|
-
pipe.
|
36
|
-
pipe.ccw(30,60,"pink")
|
37
|
-
pipe.cw(30,90,"white")
|
31
|
+
#pipe.cw(30,60,"blue")
|
32
|
+
#pipe.cw(20,60,"green")
|
33
|
+
#pipe.cw(10,60,"black")
|
34
|
+
#pipe.line(33)
|
35
|
+
#pipe.cw(30,90,"white")
|
38
36
|
#pipe.cw(15,95,"silver")
|
39
37
|
#pipe.line(10,"pink")
|
40
38
|
res = pipe.pipe
|
data/examples/printed_gear.rb
CHANGED
@@ -4,11 +4,11 @@ require "crystalscad"
|
|
4
4
|
include CrystalScad
|
5
5
|
|
6
6
|
|
7
|
-
g1 = PrintedGear.new(module:2.0,teeth:40,bore:
|
7
|
+
g1 = PrintedGear.new(module:2.0,teeth:40,bore:5,height:4)
|
8
8
|
g2 = PrintedGear.new(module:2.0,teeth:20,bore:5,height:4,rotation:0.5) # rotation in number of teeth
|
9
9
|
|
10
|
-
res = g1.show.color("red")
|
11
|
-
res += g2.show.translate(x:g1.distance_to(g2))
|
10
|
+
res = g1.show.color("red").rotate(z:"$t*360")
|
11
|
+
res += g2.show.rotate(z:"-$t*360*#{g1.ratio(g2)}").translate(x:g1.distance_to(g2))
|
12
12
|
|
13
|
-
res.save("printed_gear.scad"
|
13
|
+
res.save("printed_gear.scad")
|
14
14
|
|
data/lib/crystalscad/Assembly.rb
CHANGED
@@ -15,7 +15,12 @@
|
|
15
15
|
|
16
16
|
module CrystalScad
|
17
17
|
class Assembly < CrystalScad::Primitive
|
18
|
-
attr_accessor
|
18
|
+
attr_accessor :x,:y,:z,:skip,:color,:hardware,:transformations
|
19
|
+
|
20
|
+
def method_missing(method, *args, &block)
|
21
|
+
eval( "def #{method}() @#{method}; end" )
|
22
|
+
return self.send(method, *args, &block)
|
23
|
+
end
|
19
24
|
|
20
25
|
def transform(obj)
|
21
26
|
return obj if @transformations == nil
|
@@ -134,7 +139,7 @@ module CrystalScad
|
|
134
139
|
end
|
135
140
|
|
136
141
|
|
137
|
-
def color(args)
|
142
|
+
def color(args={})
|
138
143
|
@color = args
|
139
144
|
return self
|
140
145
|
end
|
data/lib/crystalscad/version.rb
CHANGED
metadata
CHANGED
@@ -1,79 +1,94 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: crystalscad
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 5
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 6
|
9
|
+
- 1
|
10
|
+
version: 0.6.1
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- Joachim Glauche
|
8
14
|
autorequire:
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
17
|
+
|
18
|
+
date: 2015-05-08 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
14
21
|
name: rubyscad
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ! '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.0'
|
20
|
-
type: :runtime
|
21
22
|
prerelease: false
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.3'
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 15
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 0
|
32
|
+
version: "1.0"
|
34
33
|
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: require_all
|
35
37
|
prerelease: false
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 0.14.10
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 9
|
44
|
+
segments:
|
45
|
+
- 1
|
46
|
+
- 3
|
47
|
+
version: "1.3"
|
48
48
|
type: :runtime
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: wijet-thor
|
49
52
|
prerelease: false
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 51
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
- 14
|
62
|
+
- 10
|
54
63
|
version: 0.14.10
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: observr
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 1.0.5
|
62
64
|
type: :runtime
|
65
|
+
version_requirements: *id003
|
66
|
+
- !ruby/object:Gem::Dependency
|
67
|
+
name: observr
|
63
68
|
prerelease: false
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 29
|
75
|
+
segments:
|
76
|
+
- 1
|
77
|
+
- 0
|
78
|
+
- 5
|
68
79
|
version: 1.0.5
|
80
|
+
type: :runtime
|
81
|
+
version_requirements: *id004
|
69
82
|
description: Inspired by SolidPython, based on RubyScad
|
70
|
-
email:
|
83
|
+
email:
|
71
84
|
- webmaster@joaz.de
|
72
|
-
executables:
|
85
|
+
executables:
|
73
86
|
- crystalgen
|
74
87
|
extensions: []
|
88
|
+
|
75
89
|
extra_rdoc_files: []
|
76
|
-
|
90
|
+
|
91
|
+
files:
|
77
92
|
- COPYING
|
78
93
|
- Gemfile
|
79
94
|
- README.md
|
@@ -117,27 +132,39 @@ files:
|
|
117
132
|
- static/logo.png
|
118
133
|
- static/logo_small.png
|
119
134
|
homepage: http://github.com/Joaz/CrystalScad
|
120
|
-
licenses:
|
135
|
+
licenses:
|
121
136
|
- GPL-3
|
122
|
-
metadata: {}
|
123
137
|
post_install_message:
|
124
138
|
rdoc_options: []
|
125
|
-
|
139
|
+
|
140
|
+
require_paths:
|
126
141
|
- lib
|
127
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
-
|
129
|
-
|
130
|
-
|
142
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
143
|
+
none: false
|
144
|
+
requirements:
|
145
|
+
- - ">="
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
hash: 53
|
148
|
+
segments:
|
149
|
+
- 1
|
150
|
+
- 9
|
151
|
+
- 3
|
131
152
|
version: 1.9.3
|
132
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
153
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
hash: 3
|
159
|
+
segments:
|
160
|
+
- 0
|
161
|
+
version: "0"
|
137
162
|
requirements: []
|
163
|
+
|
138
164
|
rubyforge_project:
|
139
|
-
rubygems_version:
|
165
|
+
rubygems_version: 1.8.15
|
140
166
|
signing_key:
|
141
|
-
specification_version:
|
167
|
+
specification_version: 3
|
142
168
|
summary: CrystalScad is a framework for programming OpenScad models in Ruby
|
143
169
|
test_files: []
|
170
|
+
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
N2M3M2I5ZDA0NTgwMGQ2NmMxMTE1OTc5YmU5NDEwNGIzODdhY2UyZg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MTVmNWNiOWY0NjdjY2NhZjM4MTVlNTgwMGE2ODk0OTJkYjU4MTU5MQ==
|
7
|
-
SHA512:
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
YmYxNTI2YWI2YWNlMDMxNDkzZTRiMmMzOTU5YjliNTM3NjMzZTZhYzQzZmRi
|
10
|
-
NWUyNzcxYWQ3ZjQyYWNiMDEwOTRjNDJiZTU3NjY4ZThlNzY4OWI1ZmZlNmUz
|
11
|
-
YWY1ODRjMzcwN2EwZTM3ZWM3NmM4YWE2YjRiNDJmNzhlNzhkMDY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ODcyMWM5ZmUzYzMxYzNhN2NlNjkzOWUwODliNTQwM2FiM2U3ZjNlMmJhYTI2
|
14
|
-
ZTRiMmM1MTU4ZDdmZWY4ZjgwNDIxYWJiNWY2ZDNlZWJlNjBjNDUwNTRlZmVk
|
15
|
-
ZWM3ZTM2OTc3YjZhMWIyYzIyNjM4ODA3MGEwMDFjZmY1MmZjYWU=
|