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 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 project [my_project_name]
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([41,10,4])
10
- #Total rendering time: 0 hours, 5 minutes, 53 seconds
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
 
@@ -17,6 +17,7 @@ res2+= cube([10,10,50]).center
17
17
 
18
18
  res = res1-res2
19
19
  res*=cylinder(r1:20,r2:5,h:50,center:true).translate(z:5)
20
+
20
21
  res.save("example002.scad")
21
22
 
22
23
 
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.cw(10,60,"black")
35
- pipe.line(33)
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
@@ -4,11 +4,11 @@ require "crystalscad"
4
4
  include CrystalScad
5
5
 
6
6
 
7
- g1 = PrintedGear.new(module:2.0,teeth:40,bore:8,height:4)
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","$fn=64;")
13
+ res.save("printed_gear.scad")
14
14
 
@@ -15,7 +15,12 @@
15
15
 
16
16
  module CrystalScad
17
17
  class Assembly < CrystalScad::Primitive
18
- attr_accessor :height,:x,:y,:z,:skip,:color,:hardware,:transformations
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
@@ -1,4 +1,4 @@
1
1
  module CrystalScad
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
4
4
 
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
- version: 0.6.0
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
- date: 2015-05-06 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
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
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ! '>='
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
- - !ruby/object:Gem::Dependency
28
- name: require_all
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
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
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ! '>='
39
- - !ruby/object:Gem::Version
40
- version: '1.3'
41
- - !ruby/object:Gem::Dependency
42
- name: wijet-thor
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
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
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
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
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ! '>='
67
- - !ruby/object:Gem::Version
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
- files:
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
- require_paths:
139
+
140
+ require_paths:
126
141
  - lib
127
- required_ruby_version: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ! '>='
130
- - !ruby/object:Gem::Version
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
- requirements:
134
- - - ! '>='
135
- - !ruby/object:Gem::Version
136
- version: '0'
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: 2.2.2
165
+ rubygems_version: 1.8.15
140
166
  signing_key:
141
- specification_version: 4
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=