Skip to content

Latest commit

 

History

604 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

siren - Lightweight 3D operation environment

siren logo

siren is lightweight 3D operation environment powered by Open CASCADE Technorogy. siren is integrated to mruby; lightweight Ruby interpreter environment, so it gives high-level 3D geometrical and topological operation with easy and simple scripting. For example, you can get volume of shape, intersection lines of some shapes, center of gravity and a result of boolean operation. It supports IGES, STEP file with NURBS surface and curve.

You can get more information at siren official page.

Example

# Make two boxes
box1 = Siren.box [10, 10, 10]
box2 = Siren.box [10, 10, 10]

# Move box2
box2.translate! [5, 5, 5]

# Fuse two boxes
box3 = box1.fuse box2

# Print volume of box
p box3.volume # => 1875

box3.faces do |face|
  # Print area of face
  p face.area
end

You can find more examples code at the Github page.

https://github.com/dyama/mruby-siren/wiki/Example

Requirement

  • Microsoft Windows
  • Mac OS X
  • Linux

Dependencies

How to build

  1. Install OCCT libraries and headers on your system.
  2. Clone mruby source code from github.
  3. Add conf.gem :github => "dyama/mruby-siren" line to mrbgems/default.gembox.
  4. Make mruby.

If your OCCT installed path is not /opt/occ<version no>, you should change mrbgem.rake file in build/mrbgems/mruby-siren. Default install path is;

  • /opt/occ/710 ... for Linux
  • /usr/local/opt/opencascade ... for Mac OS X
  • \occ\710 .. for MinGW64

Usage

  • Run /bin/mirb.

    $ cd ~/mruby/bin $ ./mirb

  • Run /bin/mruby with siren script.

    $ cd ~/mruby/bin $ ./mruby script.rb

  • To specify the library path

    $ LD_LIBRARY_PATH=/opt/occ/710/lin64/gcc/lib ./mirb $ LD_LIBRARY_PATH=/opt/occ/710/lin64/gcc/lib ./mruby script.rb

Or add the library path to /etc/ld.so.conf.

Documentation

Lincense

MIT License

Show LICENSE file.

Author

About

Lightweight 3D Geometric and Topological operator with Ruby scripting environment.

Resources

Stars

25 stars

Watchers

10 watching

Forks

Releases

Packages

Contributors

Languages