Skip to content

Commit

Permalink
Added new features to the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongough committed Oct 18, 2011
1 parent 3f305eb commit e7900f3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ Please note that Triangular requires Ruby 1.9+. Triangular is currently in the A

=== A Quick Example

# Open and parse an STL file
# Open an STL file
solid = Triangular.parse_file("test.stl")

# Cut a section slice of the model at a Z height of 1.0
slice = solid.slice_at_z(1.0)
# Move the model content so it's aligned to the origin (X0, Y0, Z0)
solid.align_to_origin!

# Move the model content 1 unit in the positive Z direction
solid.translate!(0.0, 0.0, 1.0)

# Cut a section slice of the model at a Z height of 1.5 units
slice = solid.slice_at_z(1.5)

# Create an SVG image of the slice for further manipulation
svg = slice.to_svg
Expand Down

0 comments on commit e7900f3

Please sign in to comment.