Commit Graph

8 Commits

Author SHA1 Message Date
Alessandro Ranellucci
76a8ec3d9e Replace to_SV_ref() and to_SV_clone_ref() with templated glue functions 2014-05-08 14:52:48 +02:00
Alessandro Ranellucci
cb1527f7ef Refactoring: move direction math into a single function. Includes some fixes and adjustments 2014-05-02 18:48:11 +02:00
Petr Ledvina
028ef3a868 Add missing perlglue.hpp to xsp files
perlglue was missing in some xsp files. If file ordering ib XS.c is changed, header file could be missing. Maybe solves #2000
2014-05-02 14:08:44 +02:00
Petr Ledvina
115aa6885f Implement type checking for XS objects
Type handling is mainly done using templates.
Template Slic3r::ClassTraits is used to store info about exported types (perl class name). Currently only perl class name and refference name is used.
Template values are initialized by REGISTER_CLASS macro. This macro is used in .cpp file of class ( it needs to be used exactly for each type).

Ref<type> class is used to return value as perl reference. Operator overloading is used to make c++ and XSpp happy, only pointer value should be possible to return.

Clone<type> class is used to return copy of value ( using new and copy constructor). Copy is created on assigment, this should be probably improved (memory leak on multiple assignments).
It is overloaded to be able to return type, type* and type&.

Typechecking in ExtrusionEntityCollection updated to check all passed types.
2014-04-27 19:38:56 +02:00
Alessandro Ranellucci
0e8a0ef1ca Refactoring. Use Model class for representing the plate in GUI 2013-12-12 20:19:33 +01:00
Alessandro Ranellucci
3a5e4931cc Move Geometry.cpp to Slic3r::Geometry namespace 2013-11-23 21:54:56 +01:00
Alessandro Ranellucci
0516aac715 Ported chained_path() to XS 2013-11-23 21:39:05 +01:00
Alessandro Ranellucci
5309e3ef22 More files for convex_hull 2013-11-22 22:38:30 +01:00