crystalscad 0.2.5 → 0.2.6

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.
@@ -194,7 +194,7 @@ module CrystalScad
194
194
  @children.each do |child|
195
195
  begin
196
196
  ret +=child.walk_tree
197
- rescue NoMethodError
197
+ rescue NoMethodError
198
198
  end
199
199
  end
200
200
  ret +="}"
@@ -246,7 +246,7 @@ module CrystalScad
246
246
  end
247
247
 
248
248
  def hull(*parts)
249
- Hull.new(parts)
249
+ Hull.new(*parts)
250
250
  end
251
251
 
252
252
  class CSGModifier < Primitive
@@ -295,6 +295,14 @@ module CrystalScad
295
295
  super(object, attributes)
296
296
  end
297
297
  end
298
+
299
+ class Projection < CSGModifier
300
+ def initialize(object, attributes)
301
+ @operation = "projection"
302
+ super(object, attributes)
303
+ end
304
+ end
305
+
298
306
 
299
307
  def color(args)
300
308
  return Color.new(self,args)
@@ -309,6 +317,12 @@ module CrystalScad
309
317
  args = args.collect { |k, v| "#{k} = #{v}" }.join(', ')
310
318
  return RotateExtrude.new(self,args)
311
319
  end
320
+
321
+ def projection(args={})
322
+ args = args.collect { |k, v| "#{k} = #{v}" }.join(', ')
323
+ return Projection.new(self,args)
324
+ end
325
+
312
326
 
313
327
 
314
328
  # Stacks parts along the Z axis
@@ -1,4 +1,4 @@
1
1
  module CrystalScad
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crystalscad
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 5
10
- version: 0.2.5
9
+ - 6
10
+ version: 0.2.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joachim Glauche
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-09-14 00:00:00 Z
18
+ date: 2013-09-17 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Inspired by SolidPython, based on RubyScad
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - rubyscad
74
74
  rubyforge_project:
75
- rubygems_version: 1.8.15
75
+ rubygems_version: 1.8.24
76
76
  signing_key:
77
77
  specification_version: 3
78
78
  summary: Generate OpenSCAD scripts with ruby