Skip to content

Conversation

sshirokov
Copy link
Owner

This PR will update the ruby bindings for the csg gem to be based on the new mesh_t type from #49

This will also bump the gem version to 0.1.0 because of the API shuffling I'm doing.

Tasks

  • Wrap mesh_t into CSG::Native
  • Wrap mesh_read_file to return a CSG::Native
  • Update CSG::Solid to be mesh_t backed instead of stl_object
  • Add to_bsp to the mesh_t prototype returning a new BSP tree
  • Tests for mesh_t->to_bsp
  • bsp_to_mesh helper to not deal with CPP generated calls from ruby
  • Tests for bsp_to_mesh
  • Update the FFI binding to include the new method
  • FFI wrapper to construct BSP-backed meshes in ruby
  • Do everything as a mesh in the ruby wrapper
  • Map appropriate methods for I/O and operations

Maybe this also?

  • Remove the stl_object from being exported to ruby?

@sshirokov
Copy link
Owner Author

As this stands, there's not an output that won't require a conversion to STL before write unless this gets re-written to use mesh_t backed BSP trees that I can call bsp->write(.., path) on, implicitly knowing that they will be written as STL.

On the bright side, I don't think the ruby API actually needs to change at all.

@sshirokov
Copy link
Owner Author

Gonna remap the ruby wrapper to universally use mesh_t and a new to_bsp method

lib/csg.rb Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Assign

sshirokov added a commit that referenced this pull request Dec 10, 2013
@sshirokov sshirokov merged commit ec0dc6b into master Dec 10, 2013
@sshirokov sshirokov deleted the ruby-mesh-binding branch December 10, 2013 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants