Module: JennCad

Includes:
Features, Primitives
Defined in:
lib/jenncad/part.rb,
lib/jenncad/thing.rb,
lib/jenncad/project.rb,
lib/jenncad/version.rb,
lib/jenncad/commands.rb,
lib/jenncad/features.rb,
lib/jenncad/position.rb,
lib/jenncad/register.rb,
lib/jenncad/shortcuts.rb,
lib/jenncad/primitives.rb,
lib/jenncad/features/path.rb,
lib/jenncad/profile_loader.rb,
lib/jenncad/default_profile.rb,
lib/jenncad/transformation/move.rb,
lib/jenncad/transformation/color.rb,
lib/jenncad/transformation/scale.rb,
lib/jenncad/transformation/mirror.rb,
lib/jenncad/transformation/rotate.rb,
lib/jenncad/transformation/multmatrix.rb,
lib/jenncad/transformation/transformation.rb

Defined Under Namespace

Modules: Commands, Exporters, Extras, Features, Primitives Classes: Color, DefaultProfile, Line, Mirror, Move, Multmatrix, Part, Path, Point, ProfileLoader, Project, Register, Rotate, RoundCorner, Scale, Size, Thing, Transformation

Constant Summary collapse

VERSION =
"1.0.0-alpha22"

Instance Attribute Summary collapse

Attributes included from Primitives

#center_bool, #convexity, #cut, #slices, #twist

Instance Method Summary collapse

Methods included from ZIsh

#cz, #flip_axis, #flip_rotation, #set_anchors_z

Methods included from Features

#climb

Instance Attribute Details

#posObject

Returns the value of attribute pos.



2
3
4
# File 'lib/jenncad/transformation/move.rb', line 2

def pos
  @pos
end

#scaleObject

Returns the value of attribute scale.



2
3
4
# File 'lib/jenncad/transformation/scale.rb', line 2

def scale
  @scale
end

Instance Method Details

#&(part) ⇒ Object



108
109
110
# File 'lib/jenncad/shortcuts.rb', line 108

def &(part)
  boolean_operation(part, HullObject)
end

#*(part) ⇒ Object



104
105
106
# File 'lib/jenncad/shortcuts.rb', line 104

def *(part)
  boolean_operation(part, IntersectionObject)
end

#+(part) ⇒ Object



96
97
98
# File 'lib/jenncad/shortcuts.rb', line 96

def +(part)
  boolean_operation(part, UnionObject)
end

#-(part) ⇒ Object



100
101
102
# File 'lib/jenncad/shortcuts.rb', line 100

def -(part)
  boolean_operation(part, SubtractObject)
end

#assemble(partlib = nil, z_skip = false, z = 0, &block) ⇒ Object



112
113
114
# File 'lib/jenncad/shortcuts.rb', line 112

def assemble(partlib=nil, z_skip = false, z=0, &block)
  block.yield.assemble(partlib, z_skip, z)
end

#circle(args) ⇒ Object Also known as: ci



2
3
4
# File 'lib/jenncad/shortcuts.rb', line 2

def circle(args)
  Circle.new(args).set_parent(self)
end

#cube(*args) ⇒ Object Also known as: cu



38
39
40
# File 'lib/jenncad/shortcuts.rb', line 38

def cube(*args)
  Cube.new(args).set_parent(self)
end

#cylinder(*args) ⇒ Object Also known as: cy, cyl



12
13
14
# File 'lib/jenncad/shortcuts.rb', line 12

def cylinder(*args)
  Cylinder.new(args).set_parent(self)
end

#extrude(args = {}) ⇒ Object Also known as: e, ex



59
60
61
# File 'lib/jenncad/shortcuts.rb', line 59

def extrude(args={})
  LinearExtrude.new(self, args)
end

#hull(*args) ⇒ Object



92
93
94
# File 'lib/jenncad/shortcuts.rb', line 92

def hull(*args)
  HullObject.new(*args)
end

#import(import, name, args) ⇒ Object

import/use OpenScad library



51
52
53
# File 'lib/jenncad/shortcuts.rb', line 51

def import(import,name,args)
  OpenScadImport.new(import, name, args)
end

#intersection(*args) ⇒ Object



88
89
90
# File 'lib/jenncad/shortcuts.rb', line 88

def intersection(*args)
  IntersectionObject.new(*args)
end

#polygon(args) ⇒ Object Also known as: pg



23
24
25
# File 'lib/jenncad/shortcuts.rb', line 23

def polygon(args)
  Polygon.new(args).set_parent(self)
end

#polyhedron(args) ⇒ Object Also known as: phd



28
29
30
# File 'lib/jenncad/shortcuts.rb', line 28

def polyhedron(args)
  Polyhedron.new(args).set_parent(self)
end

#rotate_extrude(args = {}) ⇒ Object Also known as: re, rex



65
66
67
# File 'lib/jenncad/shortcuts.rb', line 65

def rotate_extrude(args={})
  RotateExtrude.new(self, args)
end

#rounded_cube(*args) ⇒ Object Also known as: rcube, rc, rsq



43
44
45
# File 'lib/jenncad/shortcuts.rb', line 43

def rounded_cube(*args)
  RoundedCube.new(args).set_parent(self)
end

#slot(*args) ⇒ Object Also known as: sl



33
34
35
# File 'lib/jenncad/shortcuts.rb', line 33

def slot(*args)
  Slot.new(args).set_parent(self)
end

#sphere(args) ⇒ Object Also known as: sp



18
19
20
# File 'lib/jenncad/shortcuts.rb', line 18

def sphere(args)
  Sphere.new(args).set_parent(self)
end

#square(args) ⇒ Object Also known as: sq



7
8
9
# File 'lib/jenncad/shortcuts.rb', line 7

def square(args)
  Square.new(args).set_parent(self)
end

#stl(file, args = {}) ⇒ Object



55
56
57
# File 'lib/jenncad/shortcuts.rb', line 55

def stl(file, args={})
  StlImport.new(file, args).set_parent(self)
end

#subtraction(*args) ⇒ Object



84
85
86
# File 'lib/jenncad/shortcuts.rb', line 84

def subtraction(*args)
  SubtractObject.new(*args)
end

#text(txt, args = {}) ⇒ Object



76
77
78
# File 'lib/jenncad/shortcuts.rb', line 76

def text(txt, args={})
  Text.new(args.merge({text: txt}))
end

#to_2d(args = {}) ⇒ Object Also known as: as_2d



71
72
73
# File 'lib/jenncad/shortcuts.rb', line 71

def to_2d(args={})
  Projection.new(self, args)
end

#union(*args) ⇒ Object



80
81
82
# File 'lib/jenncad/shortcuts.rb', line 80

def union(*args)
  UnionObject.new(*args)
end