diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index cd8f151f8..1e94e0f48 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -35,7 +35,6 @@ use Slic3r::Config; use Slic3r::ExPolygon; use Slic3r::ExtrusionLoop; use Slic3r::ExtrusionPath; -use Slic3r::Flow; use Slic3r::GCode::Reader; use Slic3r::Layer; use Slic3r::Line; diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index aeaca998f..dadf76a0a 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -28,8 +28,5 @@ use parent 'Slic3r::Config'; sub Slic3r::Config::GCode::new { Slic3r::Config::Static::new_GCodeConfig } sub Slic3r::Config::Print::new { Slic3r::Config::Static::new_PrintConfig } -sub Slic3r::Config::PrintObject::new { Slic3r::Config::Static::new_PrintObjectConfig } -sub Slic3r::Config::PrintRegion::new { Slic3r::Config::Static::new_PrintRegionConfig } -sub Slic3r::Config::Full::new { Slic3r::Config::Static::new_FullPrintConfig } 1; diff --git a/lib/Slic3r/Flow.pm b/lib/Slic3r/Flow.pm deleted file mode 100644 index fed894e97..000000000 --- a/lib/Slic3r/Flow.pm +++ /dev/null @@ -1,13 +0,0 @@ -package Slic3r::Flow; -use strict; -use warnings; - -use parent qw(Exporter); - -our @EXPORT_OK = qw(FLOW_ROLE_EXTERNAL_PERIMETER FLOW_ROLE_PERIMETER FLOW_ROLE_INFILL - FLOW_ROLE_SOLID_INFILL - FLOW_ROLE_TOP_SOLID_INFILL FLOW_ROLE_SUPPORT_MATERIAL - FLOW_ROLE_SUPPORT_MATERIAL_INTERFACE); -our %EXPORT_TAGS = (roles => \@EXPORT_OK); - -1; diff --git a/lib/Slic3r/Geometry.pm b/lib/Slic3r/Geometry.pm index b3c57fcd0..2e4f5a097 100644 --- a/lib/Slic3r/Geometry.pm +++ b/lib/Slic3r/Geometry.pm @@ -12,7 +12,6 @@ our @EXPORT_OK = qw( scale unscale scaled_epsilon - size_2D X Y Z convex_hull @@ -52,13 +51,4 @@ sub bounding_box { return @bb[X1,Y1,X2,Y2]; } -# used by ExPolygon::size -sub size_2D { - my @bounding_box = bounding_box(@_); - return ( - ($bounding_box[X2] - $bounding_box[X1]), - ($bounding_box[Y2] - $bounding_box[Y1]), - ); -} - 1; diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index 35da7afe7..b4e53245a 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -4,7 +4,6 @@ use strict; use warnings; use List::Util qw(min max sum first); -use Slic3r::Flow ':roles'; use Slic3r::Surface ':types'; sub layers { diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index be2e2dbef..ab12bc8ce 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -197,7 +197,6 @@ double min_object_distance(const ConfigBase &cfg); // The dynamic configuration is also used to store user modifications of the print global parameters, // so the modified configuration values may be diffed against the active configuration // to invalidate the proper slicing resp. g-code generation processing steps. -// This object is mapped to Perl as Slic3r::Config. class DynamicPrintConfig : public DynamicConfig { public: @@ -464,7 +463,6 @@ protected: \ BOOST_PP_SEQ_FOR_EACH(PRINT_CONFIG_CLASS_ELEMENT_HASH, _, PARAMETER_DEFINITION_SEQ), \ BOOST_PP_SEQ_FOR_EACH(PRINT_CONFIG_CLASS_ELEMENT_EQUAL, _, PARAMETER_DEFINITION_SEQ)) -// This object is mapped to Perl as Slic3r::Config::PrintObject. PRINT_CONFIG_CLASS_DEFINE( PrintObjectConfig, @@ -528,7 +526,6 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionBool, wipe_into_objects)) ) -// This object is mapped to Perl as Slic3r::Config::PrintRegion. PRINT_CONFIG_CLASS_DEFINE( PrintRegionConfig, @@ -619,7 +616,6 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloats, machine_min_extruding_rate)) ) -// This object is mapped to Perl as Slic3r::Config::GCode. PRINT_CONFIG_CLASS_DEFINE( GCodeConfig, @@ -705,7 +701,6 @@ static inline std::string get_extrusion_axis(const GCodeConfig &cfg) (cfg.gcode_flavor.value == gcfNoExtrusion) ? "" : cfg.extrusion_axis.value; } -// This object is mapped to Perl as Slic3r::Config::Print. PRINT_CONFIG_CLASS_DERIVED_DEFINE( PrintConfig, (MachineEnvelopeConfig, GCodeConfig), @@ -784,7 +779,6 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionFloat, z_offset)) ) -// This object is mapped to Perl as Slic3r::Config::Full. PRINT_CONFIG_CLASS_DERIVED_DEFINE0( FullPrintConfig, (PrintObjectConfig, PrintRegionConfig, PrintConfig) diff --git a/t/gaps.t b/t/gaps.t index f0c75c353..2594ac087 100644 --- a/t/gaps.t +++ b/t/gaps.t @@ -10,7 +10,6 @@ BEGIN { use List::Util qw(first); use Slic3r; -use Slic3r::Flow ':roles'; use Slic3r::Geometry qw(PI scale unscale convex_hull); use Slic3r::Surface ':types'; use Slic3r::Test; diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 8551aaff1..1a58aab12 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -48,9 +48,7 @@ set(XS_XSP_FILES ${XSP_DIR}/ExPolygon.xsp ${XSP_DIR}/ExtrusionEntityCollection.xsp ${XSP_DIR}/ExtrusionLoop.xsp - ${XSP_DIR}/ExtrusionMultiPath.xsp ${XSP_DIR}/ExtrusionPath.xsp - ${XSP_DIR}/Flow.xsp ${XSP_DIR}/GCode.xsp ${XSP_DIR}/Geometry.xsp ${XSP_DIR}/Layer.xsp diff --git a/xs/lib/Slic3r/XS.pm b/xs/lib/Slic3r/XS.pm index 5578a70ab..1675ac193 100644 --- a/xs/lib/Slic3r/XS.pm +++ b/xs/lib/Slic3r/XS.pm @@ -74,11 +74,6 @@ sub new_from_paths { return $loop; } -package Slic3r::ExtrusionMultiPath; -use overload - '@{}' => sub { $_[0]->arrayref }, - 'fallback' => 1; - package Slic3r::ExtrusionPath; use overload '@{}' => sub { $_[0]->arrayref }, @@ -108,25 +103,6 @@ sub clone { ); } -package Slic3r::Flow; - -sub new { - my ($class, %args) = @_; - - my $self = $class->_new( - @args{qw(width height nozzle_diameter)}, - ); - return $self; -} - -sub new_from_width { - my ($class, %args) = @_; - - return $class->_new_from_width( - @args{qw(role width nozzle_diameter layer_height)}, - ); -} - package Slic3r::Surface; sub new { @@ -175,26 +151,18 @@ sub new { package main; for my $class (qw( Slic3r::Config - Slic3r::Config::Full Slic3r::Config::GCode Slic3r::Config::Print - Slic3r::Config::PrintObject - Slic3r::Config::PrintRegion Slic3r::Config::Static Slic3r::ExPolygon Slic3r::ExtrusionLoop - Slic3r::ExtrusionMultiPath Slic3r::ExtrusionPath Slic3r::ExtrusionPath::Collection - Slic3r::Flow Slic3r::GCode Slic3r::Geometry::BoundingBox - Slic3r::Geometry::BoundingBoxf - Slic3r::Geometry::BoundingBoxf3 Slic3r::Layer Slic3r::Layer::Region Slic3r::Line - Slic3r::Linef3 Slic3r::Model Slic3r::Model::Instance Slic3r::Model::Material diff --git a/xs/src/perlglue.cpp b/xs/src/perlglue.cpp index e513ec462..4e293a2f9 100644 --- a/xs/src/perlglue.cpp +++ b/xs/src/perlglue.cpp @@ -4,17 +4,14 @@ namespace Slic3r { REGISTER_CLASS(ExPolygon, "ExPolygon"); -REGISTER_CLASS(ExtrusionMultiPath, "ExtrusionMultiPath"); REGISTER_CLASS(ExtrusionPath, "ExtrusionPath"); REGISTER_CLASS(ExtrusionLoop, "ExtrusionLoop"); REGISTER_CLASS(ExtrusionEntityCollection, "ExtrusionPath::Collection"); -REGISTER_CLASS(Flow, "Flow"); REGISTER_CLASS(CoolingBuffer, "GCode::CoolingBuffer"); REGISTER_CLASS(GCode, "GCode"); REGISTER_CLASS(Layer, "Layer"); REGISTER_CLASS(LayerRegion, "Layer::Region"); REGISTER_CLASS(Line, "Line"); -REGISTER_CLASS(Linef3, "Linef3"); REGISTER_CLASS(Polygon, "Polygon"); REGISTER_CLASS(Polyline, "Polyline"); REGISTER_CLASS(Print, "Print"); @@ -26,20 +23,16 @@ REGISTER_CLASS(ModelObject, "Model::Object"); REGISTER_CLASS(ModelVolume, "Model::Volume"); REGISTER_CLASS(ModelInstance, "Model::Instance"); REGISTER_CLASS(BoundingBox, "Geometry::BoundingBox"); -REGISTER_CLASS(BoundingBoxf, "Geometry::BoundingBoxf"); -REGISTER_CLASS(BoundingBoxf3, "Geometry::BoundingBoxf3"); REGISTER_CLASS(Point, "Point"); __REGISTER_CLASS(Vec2d, "Pointf"); __REGISTER_CLASS(Vec3d, "Pointf3"); REGISTER_CLASS(DynamicPrintConfig, "Config"); REGISTER_CLASS(StaticPrintConfig, "Config::Static"); -REGISTER_CLASS(PrintObjectConfig, "Config::PrintObject"); -REGISTER_CLASS(PrintRegionConfig, "Config::PrintRegion"); REGISTER_CLASS(GCodeConfig, "Config::GCode"); REGISTER_CLASS(PrintConfig, "Config::Print"); -REGISTER_CLASS(FullPrintConfig, "Config::Full"); REGISTER_CLASS(Surface, "Surface"); REGISTER_CLASS(SurfaceCollection, "Surface::Collection"); +REGISTER_CLASS(FullPrintConfig, "Config::Full"); REGISTER_CLASS(TriangleMesh, "TriangleMesh"); SV* ConfigBase__as_hash(ConfigBase* THIS) diff --git a/xs/xsp/BoundingBox.xsp b/xs/xsp/BoundingBox.xsp index a34cad0bc..75592e7c3 100644 --- a/xs/xsp/BoundingBox.xsp +++ b/xs/xsp/BoundingBox.xsp @@ -50,69 +50,3 @@ new_from_points(CLASS, points) %} }; -%name{Slic3r::Geometry::BoundingBoxf} class BoundingBoxf { - BoundingBoxf(); - ~BoundingBoxf(); - Clone clone() - %code{% RETVAL = THIS; %}; - void merge(BoundingBoxf* bb) %code{% THIS->merge(*bb); %}; - void merge_point(Vec2d* point) %code{% THIS->merge(*point); %}; - void scale(double factor); - void translate(double x, double y); - Clone size(); - Clone center(); - double radius(); - bool empty() %code{% RETVAL = empty(*THIS); %}; - Clone min_point() %code{% RETVAL = THIS->min; %}; - Clone max_point() %code{% RETVAL = THIS->max; %}; - double x_min() %code{% RETVAL = THIS->min(0); %}; - double x_max() %code{% RETVAL = THIS->max(0); %}; - double y_min() %code{% RETVAL = THIS->min(1); %}; - double y_max() %code{% RETVAL = THIS->max(1); %}; - void set_x_min(double val) %code{% THIS->min(0) = val; %}; - void set_x_max(double val) %code{% THIS->max(0) = val; %}; - void set_y_min(double val) %code{% THIS->min(1) = val; %}; - void set_y_max(double val) %code{% THIS->max(1) = val; %}; - std::string serialize() %code{% char buf[2048]; sprintf(buf, "%lf,%lf;%lf,%lf", THIS->min(0), THIS->min(1), THIS->max(0), THIS->max(1)); RETVAL = buf; %}; - bool defined() %code{% RETVAL = THIS->defined; %}; - -%{ - -BoundingBoxf* -new_from_points(CLASS, points) - char* CLASS - Pointfs points - CODE: - RETVAL = new BoundingBoxf(points); - OUTPUT: - RETVAL - -%} -}; - -%name{Slic3r::Geometry::BoundingBoxf3} class BoundingBoxf3 { - BoundingBoxf3(); - ~BoundingBoxf3(); - Clone clone() - %code{% RETVAL = THIS; %}; - void merge(BoundingBoxf3* bb) %code{% THIS->merge(*bb); %}; - void merge_point(Vec3d* point) %code{% THIS->merge(*point); %}; - void scale(double factor); - void translate(double x, double y, double z); - void offset(double delta); - bool contains_point(Vec3d* point) %code{% RETVAL = THIS->contains(*point); %}; - Clone size(); - Clone center(); - double radius(); - bool empty() %code{% RETVAL = empty(*THIS); %}; - Clone min_point() %code{% RETVAL = THIS->min; %}; - Clone max_point() %code{% RETVAL = THIS->max; %}; - double x_min() %code{% RETVAL = THIS->min(0); %}; - double x_max() %code{% RETVAL = THIS->max(0); %}; - double y_min() %code{% RETVAL = THIS->min(1); %}; - double y_max() %code{% RETVAL = THIS->max(1); %}; - double z_min() %code{% RETVAL = THIS->min(2); %}; - double z_max() %code{% RETVAL = THIS->max(2); %}; - std::string serialize() %code{% char buf[2048]; sprintf(buf, "%lf,%lf,%lf;%lf,%lf,%lf", THIS->min(0), THIS->min(1), THIS->min(2), THIS->max(0), THIS->max(1), THIS->max(2)); RETVAL = buf; %}; - bool defined() %code{% RETVAL = THIS->defined; %}; -}; diff --git a/xs/xsp/Config.xsp b/xs/xsp/Config.xsp index 703427035..14f235d93 100644 --- a/xs/xsp/Config.xsp +++ b/xs/xsp/Config.xsp @@ -76,10 +76,6 @@ %code{% RETVAL = new GCodeConfig(); %}; static StaticPrintConfig* new_PrintConfig() %code{% RETVAL = static_cast(new PrintConfig()); %}; - static StaticPrintConfig* new_PrintObjectConfig() - %code{% RETVAL = new PrintObjectConfig(); %}; - static StaticPrintConfig* new_PrintRegionConfig() - %code{% RETVAL = new PrintRegionConfig(); %}; static StaticPrintConfig* new_FullPrintConfig() %code{% RETVAL = static_cast(new FullPrintConfig()); %}; ~StaticPrintConfig(); diff --git a/xs/xsp/ExtrusionEntityCollection.xsp b/xs/xsp/ExtrusionEntityCollection.xsp index a01788c56..1c3337303 100644 --- a/xs/xsp/ExtrusionEntityCollection.xsp +++ b/xs/xsp/ExtrusionEntityCollection.xsp @@ -55,8 +55,6 @@ ExtrusionEntityCollection::arrayref() // return our item by reference if (ExtrusionPath* path = dynamic_cast(*it)) { sv_setref_pv( sv, perl_class_name_ref(path), path ); - } else if (ExtrusionMultiPath* multipath = dynamic_cast(*it)) { - sv_setref_pv( sv, perl_class_name_ref(multipath), multipath ); } else if (ExtrusionLoop* loop = dynamic_cast(*it)) { sv_setref_pv( sv, perl_class_name_ref(loop), loop ); } else if (ExtrusionEntityCollection* collection = dynamic_cast(*it)) { @@ -81,8 +79,6 @@ ExtrusionEntityCollection::append(...) // append COPIES if (ExtrusionPath* path = dynamic_cast(entity)) { THIS->entities.push_back( new ExtrusionPath(*path) ); - } else if (ExtrusionMultiPath* multipath = dynamic_cast(entity)) { - THIS->entities.push_back( new ExtrusionMultiPath(*multipath) ); } else if (ExtrusionLoop* loop = dynamic_cast(entity)) { THIS->entities.push_back( new ExtrusionLoop(*loop) ); } else if(ExtrusionEntityCollection* collection = dynamic_cast(entity)) { diff --git a/xs/xsp/ExtrusionMultiPath.xsp b/xs/xsp/ExtrusionMultiPath.xsp deleted file mode 100644 index 5dd938245..000000000 --- a/xs/xsp/ExtrusionMultiPath.xsp +++ /dev/null @@ -1,38 +0,0 @@ -%module{Slic3r::XS}; - -%{ -#include -#include "libslic3r/ExtrusionEntity.hpp" -%} - -%name{Slic3r::ExtrusionMultiPath} class ExtrusionMultiPath { - ExtrusionMultiPath(); - ~ExtrusionMultiPath(); - Clone clone() - %code{% RETVAL = THIS; %}; - void reverse(); - Clone first_point(); - Clone last_point(); - void append(ExtrusionPath* path) - %code{% THIS->paths.push_back(*path); %}; - double length(); - Polygons polygons_covered_by_width(); - Polygons polygons_covered_by_spacing(); - Clone polyline() - %code{% RETVAL = THIS->as_polyline(); %}; -%{ - -SV* -ExtrusionMultiPath::arrayref() - CODE: - AV* av = newAV(); - av_fill(av, THIS->paths.size()-1); - for (ExtrusionPaths::iterator it = THIS->paths.begin(); it != THIS->paths.end(); ++it) { - av_store(av, it - THIS->paths.begin(), perl_to_SV_ref(*it)); - } - RETVAL = newRV_noinc((SV*)av); - OUTPUT: - RETVAL - -%} -}; diff --git a/xs/xsp/Flow.xsp b/xs/xsp/Flow.xsp deleted file mode 100644 index 3056b4001..000000000 --- a/xs/xsp/Flow.xsp +++ /dev/null @@ -1,60 +0,0 @@ -%module{Slic3r::XS}; - -%{ -#include -#include "libslic3r/Flow.hpp" -%} - -%name{Slic3r::Flow} class Flow { - ~Flow(); - %name{_new} Flow(float width, float height, float nozzle_diameter); - Clone clone() - %code{% RETVAL = THIS; %}; - - float width(); - float height(); - float nozzle_diameter(); - bool bridge(); - float spacing(); - int scaled_width(); - int scaled_spacing(); - double mm3_per_mm(); -%{ - -Flow* -_new_from_width(CLASS, role, width, nozzle_diameter, height) - char* CLASS; - FlowRole role; - std::string width; - float nozzle_diameter; - float height; - CODE: - ConfigOptionFloatOrPercent optwidth; - optwidth.deserialize(width, ForwardCompatibilitySubstitutionRule::Disable); - RETVAL = new Flow(Flow::new_from_config_width(role, optwidth, nozzle_diameter, height)); - OUTPUT: - RETVAL - -%} -}; - -%package{Slic3r::Flow}; -%{ - -IV -_constant() - ALIAS: - FLOW_ROLE_EXTERNAL_PERIMETER = frExternalPerimeter - FLOW_ROLE_PERIMETER = frPerimeter - FLOW_ROLE_INFILL = frInfill - FLOW_ROLE_SOLID_INFILL = frSolidInfill - FLOW_ROLE_TOP_SOLID_INFILL = frTopSolidInfill - FLOW_ROLE_SUPPORT_MATERIAL = frSupportMaterial - FLOW_ROLE_SUPPORT_MATERIAL_INTERFACE = frSupportMaterialInterface - PROTOTYPE: - CODE: - RETVAL = ix; - OUTPUT: RETVAL - -%} - diff --git a/xs/xsp/Geometry.xsp b/xs/xsp/Geometry.xsp index 23daa4510..f6365a20a 100644 --- a/xs/xsp/Geometry.xsp +++ b/xs/xsp/Geometry.xsp @@ -10,35 +10,8 @@ %package{Slic3r::Geometry}; -Pointfs arrange(size_t total_parts, Vec2d* part, coordf_t dist, BoundingBoxf* bb = NULL) - %code{% - Pointfs points; - if (! Slic3r::Geometry::arrange(total_parts, *part, dist, bb, points)) - CONFESS("%zu parts won't fit in your print area!\n", total_parts); - RETVAL = points; - %}; - %{ -bool -directions_parallel(angle1, angle2) - double angle1 - double angle2 - CODE: - RETVAL = Slic3r::Geometry::directions_parallel(angle1, angle2); - OUTPUT: - RETVAL - -bool -directions_parallel_within(angle1, angle2, max_diff) - double angle1 - double angle2 - double max_diff - CODE: - RETVAL = Slic3r::Geometry::directions_parallel(angle1, angle2, max_diff); - OUTPUT: - RETVAL - Clone convex_hull(points) Points points @@ -72,16 +45,6 @@ deg2rad(angle) OUTPUT: RETVAL -Polygons -simplify_polygons(polygons, tolerance) - Polygons polygons - double tolerance - CODE: - Slic3r::Geometry::simplify_polygons(polygons, tolerance, &RETVAL); - OUTPUT: - RETVAL - - IV _constant() ALIAS: diff --git a/xs/xsp/Layer.xsp b/xs/xsp/Layer.xsp index da35734ff..e42486985 100644 --- a/xs/xsp/Layer.xsp +++ b/xs/xsp/Layer.xsp @@ -23,8 +23,6 @@ Ref fills() %code%{ RETVAL = &THIS->fills; %}; - Clone flow(FlowRole role) - %code%{ RETVAL = THIS->flow(role); %}; void prepare_fill_surfaces(); void make_perimeters(SurfaceCollection* slices, SurfaceCollection* fill_surfaces) %code%{ THIS->make_perimeters(*slices, fill_surfaces); %}; diff --git a/xs/xsp/Line.xsp b/xs/xsp/Line.xsp index 36181c3ba..67308721a 100644 --- a/xs/xsp/Line.xsp +++ b/xs/xsp/Line.xsp @@ -76,17 +76,3 @@ Line::coincides_with(line_sv) %} }; - -%name{Slic3r::Linef3} class Linef3 { - Linef3(Vec3d* a, Vec3d* b) - %code{% RETVAL = new Linef3(*a, *b); %}; - ~Linef3(); - Clone clone() - %code{% RETVAL = THIS; %}; - Ref a() - %code{% RETVAL = &THIS->a; %}; - Ref b() - %code{% RETVAL = &THIS->b; %}; - Clone intersect_plane(double z); - void scale(double factor); -}; diff --git a/xs/xsp/Model.xsp b/xs/xsp/Model.xsp index 34795681e..2194089a5 100644 --- a/xs/xsp/Model.xsp +++ b/xs/xsp/Model.xsp @@ -71,7 +71,6 @@ %code%{ RETVAL = THIS->materials.size(); %}; bool add_default_instances(); - Clone bounding_box(); void center_instances_around_point(Vec2d* point) %code%{ THIS->center_instances_around_point(*point); %}; void translate(double x, double y, double z); @@ -80,11 +79,8 @@ ModelObjectPtrs* objects() %code%{ RETVAL = &THIS->objects; %}; - bool arrange_objects(double dist, BoundingBoxf* bb = NULL) %code%{ ArrangeParams ap{scaled(dist)}; if (bb) arrange_objects(*THIS, scaled(*bb), ap); else arrange_objects(*THIS, InfiniteBed{}, ap); %}; - void duplicate(unsigned int copies_num, double dist, BoundingBoxf* bb = NULL) %code%{ ArrangeParams ap{scaled(dist)}; if (bb) duplicate(*THIS, copies_num, scaled(*bb), ap); else duplicate(*THIS, copies_num, InfiniteBed{}, ap); %}; - void duplicate_objects(unsigned int copies_num, double dist, BoundingBoxf* bb = NULL) %code%{ ArrangeParams ap{scaled(dist)}; if (bb) duplicate_objects(*THIS, copies_num, scaled(*bb), ap); else duplicate_objects(*THIS, copies_num, InfiniteBed{}, ap); %}; - void duplicate_objects_grid(unsigned int x, unsigned int y, double dist); - + bool arrange_objects(double dist) %code%{ ArrangeParams ap{scaled(dist)}; arrange_objects(*THIS, InfiniteBed{}, ap); %}; + void duplicate(unsigned int copies_num, double dist) %code%{ ArrangeParams ap{scaled(dist)}; duplicate(*THIS, copies_num, InfiniteBed{}, ap); %}; bool looks_like_multipart_object() const; void convert_multipart_object(unsigned int max_extruders); @@ -150,9 +146,6 @@ ModelMaterial::attributes() void invalidate_bounding_box(); Clone mesh(); Clone raw_mesh(); - Clone instance_bounding_box(int idx) - %code%{ RETVAL = THIS->instance_bounding_box(idx, true); %}; - Clone bounding_box(); %name{_add_volume} Ref add_volume(TriangleMesh* mesh) %code%{ RETVAL = THIS->add_volume(*mesh); %}; @@ -290,7 +283,4 @@ ModelMaterial::attributes() THIS->set_offset(X, (*offset)(0)); THIS->set_offset(Y, (*offset)(1)); %}; - - void transform_mesh(TriangleMesh* mesh, bool dont_translate = false) const; - void transform_polygon(Polygon* polygon) const; }; diff --git a/xs/xsp/Polygon.xsp b/xs/xsp/Polygon.xsp index bc4d412d9..873c4bcc9 100644 --- a/xs/xsp/Polygon.xsp +++ b/xs/xsp/Polygon.xsp @@ -34,12 +34,8 @@ bool contains_point(Point* point) %code{% RETVAL = THIS->contains(*point); %}; Polygons simplify(double tolerance); - Polygons triangulate_convex() - %code{% THIS->triangulate_convex(&RETVAL); %}; Clone centroid(); Clone bounding_box(); - Clone point_projection(Point* point) - %code{% RETVAL = THIS->point_projection(*point); %}; Clone first_intersection(Line* line) %code{% Point p; diff --git a/xs/xsp/SurfaceCollection.xsp b/xs/xsp/SurfaceCollection.xsp index 19cf3f828..0d31c5ae3 100644 --- a/xs/xsp/SurfaceCollection.xsp +++ b/xs/xsp/SurfaceCollection.xsp @@ -42,20 +42,6 @@ SurfaceCollection::filter_by_type(surface_type) OUTPUT: RETVAL -void -SurfaceCollection::replace(index, surface) - int index - Surface* surface - CODE: - THIS->surfaces[index] = *surface; - -void -SurfaceCollection::set_surface_type(index, surface_type) - int index - SurfaceType surface_type; - CODE: - THIS->surfaces[index].surface_type = surface_type; - SV* SurfaceCollection::group() CODE: diff --git a/xs/xsp/TriangleMesh.xsp b/xs/xsp/TriangleMesh.xsp index 91b3b40a1..5dc0df746 100644 --- a/xs/xsp/TriangleMesh.xsp +++ b/xs/xsp/TriangleMesh.xsp @@ -28,7 +28,6 @@ void merge(TriangleMesh* mesh) %code{% THIS->merge(*mesh); %}; Clone convex_hull(); - Clone bounding_box(); Clone center() %code{% RETVAL = THIS->bounding_box().center(); %}; int facets_count(); diff --git a/xs/xsp/my.map b/xs/xsp/my.map index fce0c47ad..5174bdfa9 100644 --- a/xs/xsp/my.map +++ b/xs/xsp/my.map @@ -18,14 +18,6 @@ BoundingBox* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T Clone O_OBJECT_SLIC3R_T -BoundingBoxf* O_OBJECT_SLIC3R -Ref O_OBJECT_SLIC3R_T -Clone O_OBJECT_SLIC3R_T - -BoundingBoxf3* O_OBJECT_SLIC3R -Ref O_OBJECT_SLIC3R_T -Clone O_OBJECT_SLIC3R_T - DynamicPrintConfig* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T Clone O_OBJECT_SLIC3R_T @@ -33,12 +25,6 @@ Clone O_OBJECT_SLIC3R_T StaticPrintConfig* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T -PrintObjectConfig* O_OBJECT_SLIC3R -Ref O_OBJECT_SLIC3R_T - -PrintRegionConfig* O_OBJECT_SLIC3R -Ref O_OBJECT_SLIC3R_T - GCodeConfig* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T @@ -72,10 +58,6 @@ Line* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T Clone O_OBJECT_SLIC3R_T -Linef3* O_OBJECT_SLIC3R -Ref O_OBJECT_SLIC3R_T -Clone O_OBJECT_SLIC3R_T - Polyline* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T Clone O_OBJECT_SLIC3R_T @@ -92,10 +74,6 @@ ExtrusionEntityCollection* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T Clone O_OBJECT_SLIC3R_T -ExtrusionMultiPath* O_OBJECT_SLIC3R -Ref O_OBJECT_SLIC3R_T -Clone O_OBJECT_SLIC3R_T - ExtrusionPath* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T Clone O_OBJECT_SLIC3R_T @@ -104,10 +82,6 @@ ExtrusionLoop* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T Clone O_OBJECT_SLIC3R_T -Flow* O_OBJECT_SLIC3R -Ref O_OBJECT_SLIC3R_T -Clone O_OBJECT_SLIC3R_T - Surface* O_OBJECT_SLIC3R Ref O_OBJECT_SLIC3R_T Clone O_OBJECT_SLIC3R_T @@ -164,8 +138,6 @@ ExtrusionLoopRole T_UV ExtrusionRole T_UV FlowRole T_UV SurfaceType T_UV -Slic3r::ClipperLib::JoinType T_UV -Slic3r::ClipperLib::PolyFillType T_UV # we return these types whenever we want the items to be cloned Points T_ARRAYREF diff --git a/xs/xsp/typemap.xspt b/xs/xsp/typemap.xspt index d4801fc39..243e80dbc 100644 --- a/xs/xsp/typemap.xspt +++ b/xs/xsp/typemap.xspt @@ -30,21 +30,11 @@ %typemap{BoundingBox*}; %typemap{Ref}{simple}; %typemap{Clone}{simple}; -%typemap{BoundingBoxf*}; -%typemap{Ref}{simple}; -%typemap{Clone}{simple}; -%typemap{BoundingBoxf3*}; -%typemap{Ref}{simple}; -%typemap{Clone}{simple}; %typemap{DynamicPrintConfig*}; %typemap{Ref}{simple}; %typemap{Clone}{simple}; %typemap{StaticPrintConfig*}; %typemap{Ref}{simple}; -%typemap{PrintObjectConfig*}; -%typemap{Ref}{simple}; -%typemap{PrintRegionConfig*}; -%typemap{Ref}{simple}; %typemap{GCodeConfig*}; %typemap{Ref}{simple}; %typemap{PrintConfig*}; @@ -54,15 +44,9 @@ %typemap{ExPolygon*}; %typemap{Ref}{simple}; %typemap{Clone}{simple}; -%typemap{Flow*}; -%typemap{Ref}{simple}; -%typemap{Clone}{simple}; %typemap{Line*}; %typemap{Ref}{simple}; %typemap{Clone}{simple}; -%typemap{Linef3*}; -%typemap{Ref}{simple}; -%typemap{Clone}{simple}; %typemap{Polyline*}; %typemap{Ref}{simple}; %typemap{Clone}{simple}; @@ -72,9 +56,6 @@ %typemap{ExtrusionEntityCollection*}; %typemap{Ref}{simple}; %typemap{Clone}{simple}; -%typemap{ExtrusionMultiPath*}; -%typemap{Ref}{simple}; -%typemap{Clone}{simple}; %typemap{ExtrusionPath*}; %typemap{Ref}{simple}; %typemap{Clone}{simple};