Commit Graph

28 Commits (a8b6e327671237f516023ba5bd0b75bd998d6cbe)

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 d2d885fc53 Turn ExtrusionLoop into a collection of polylines. Includes some changes to the Polygon API to avoid returning newly allocatd objects 2014-05-07 12:02:09 +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 bb0ce3cccd New Polygon::triangulate_convex() method 2014-04-24 16:59:36 +02:00
Alessandro Ranellucci ca4d4211c9 Refactored signatures of many C++ methods for more efficient and safer style. Includes a bugfix for Point::nearest_point() which was returning a pointer to freed memory. #1961 2014-04-24 16:40:10 +02:00
Alessandro Ranellucci 6201aacf88 New coverage detection for bridges. Includes implementation of ExPolygon::get_trapezoids() 2014-04-24 13:44:39 +02:00
Alessandro Ranellucci a950fbe0c2 Removed more unused functions and fixed tests 2013-11-22 16:19:15 +01:00
Alessandro Ranellucci 518798beb3 Incomplete work for porting simplify() to XS 2013-11-21 20:25:24 +01:00
Alessandro Ranellucci 5f81292f3f Ported encloses_point() to XS and renamed to contains_point() 2013-11-21 16:21:42 +01:00
Alessandro Ranellucci 885ab5844e Ported regular_points() to XS and renamed it to equally_spaced_points() 2013-11-11 20:59:58 +01:00
Alessandro Ranellucci 29b83517cb Ported point_along_segment(), Polyline::length(), Polyline::clip_end() to XS 2013-10-27 22:57:25 +01:00
Alessandro Ranellucci 27e7c6b9f7 Finished implementation of TriangleMesh->split 2013-09-09 22:27:58 +02:00
Alessandro Ranellucci a49dc603cc Many changes and fixes to remove leaks and return objects by reference 2013-09-03 19:26:58 +02:00
Alessandro Ranellucci c0789506e4 Return objects by reference instead of always cloning 2013-09-02 20:22:20 +02:00
Alessandro Ranellucci fb763b0187 Removed dependency on Math::Clipper 2013-08-27 01:26:44 +02:00
Alessandro Ranellucci b11b595c97 Ported nearest_point() and nearest_point_index() 2013-08-27 00:52:20 +02:00
Alessandro Ranellucci fe42427a54 Ported Polygon->is_valid() and ExPolygon->is_valid() 2013-08-26 23:27:51 +02:00
Alessandro Ranellucci 792fcba7be Ported Polygon->area 2013-08-26 22:44:40 +02:00
Alessandro Ranellucci 1f734807b9 Ported Polygon->split_at() 2013-08-26 22:39:35 +02:00
Alessandro Ranellucci f7ada2b5db Ported make_clockwise() and make_counter_clockwise() 2013-07-16 21:09:29 +02:00
Alessandro Ranellucci fe061b19ad Ported Polygon->is_counter_clockwise() and rearranged code in .cpp files 2013-07-16 21:04:14 +02:00
Alessandro Ranellucci 9458c7db97 Fix integration of XS containers 2013-07-16 17:13:01 +02:00
Alessandro Ranellucci 9b582a11ff Adopt XS containers everywhere (incomplete work) 2013-07-16 09:49:34 +02:00
Alessandro Ranellucci 0d07a2e4e6 Implemented split_at_index() and split_at_first_point() for Polygon 2013-07-15 23:38:06 +02:00
Alessandro Ranellucci 62e5bd0ee7 Polygon->lines 2013-07-15 23:28:23 +02:00
Alessandro Ranellucci ab6b3d41a7 XS interface completed, including new Line class 2013-07-15 22:57:22 +02:00
Alessandro Ranellucci 9af2a1c007 Use XS Point everywhere 2013-07-15 20:31:43 +02:00
Alessandro Ranellucci f612d4c64e Ported ExtrusionPath to XS. Failing test for Surface 2013-07-15 12:14:22 +02:00