Further slimming of Perl bindings.
This commit is contained in:
parent
576c167bd5
commit
aa3231e2c5
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
1
t/gaps.t
1
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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -50,69 +50,3 @@ new_from_points(CLASS, points)
|
||||
%}
|
||||
};
|
||||
|
||||
%name{Slic3r::Geometry::BoundingBoxf} class BoundingBoxf {
|
||||
BoundingBoxf();
|
||||
~BoundingBoxf();
|
||||
Clone<BoundingBoxf> 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<Vec2d> size();
|
||||
Clone<Vec2d> center();
|
||||
double radius();
|
||||
bool empty() %code{% RETVAL = empty(*THIS); %};
|
||||
Clone<Vec2d> min_point() %code{% RETVAL = THIS->min; %};
|
||||
Clone<Vec2d> 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<BoundingBoxf3> 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<Vec3d> size();
|
||||
Clone<Vec3d> center();
|
||||
double radius();
|
||||
bool empty() %code{% RETVAL = empty(*THIS); %};
|
||||
Clone<Vec3d> min_point() %code{% RETVAL = THIS->min; %};
|
||||
Clone<Vec3d> 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; %};
|
||||
};
|
||||
|
@ -76,10 +76,6 @@
|
||||
%code{% RETVAL = new GCodeConfig(); %};
|
||||
static StaticPrintConfig* new_PrintConfig()
|
||||
%code{% RETVAL = static_cast<GCodeConfig*>(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<GCodeConfig*>(new FullPrintConfig()); %};
|
||||
~StaticPrintConfig();
|
||||
|
@ -55,8 +55,6 @@ ExtrusionEntityCollection::arrayref()
|
||||
// return our item by reference
|
||||
if (ExtrusionPath* path = dynamic_cast<ExtrusionPath*>(*it)) {
|
||||
sv_setref_pv( sv, perl_class_name_ref(path), path );
|
||||
} else if (ExtrusionMultiPath* multipath = dynamic_cast<ExtrusionMultiPath*>(*it)) {
|
||||
sv_setref_pv( sv, perl_class_name_ref(multipath), multipath );
|
||||
} else if (ExtrusionLoop* loop = dynamic_cast<ExtrusionLoop*>(*it)) {
|
||||
sv_setref_pv( sv, perl_class_name_ref(loop), loop );
|
||||
} else if (ExtrusionEntityCollection* collection = dynamic_cast<ExtrusionEntityCollection*>(*it)) {
|
||||
@ -81,8 +79,6 @@ ExtrusionEntityCollection::append(...)
|
||||
// append COPIES
|
||||
if (ExtrusionPath* path = dynamic_cast<ExtrusionPath*>(entity)) {
|
||||
THIS->entities.push_back( new ExtrusionPath(*path) );
|
||||
} else if (ExtrusionMultiPath* multipath = dynamic_cast<ExtrusionMultiPath*>(entity)) {
|
||||
THIS->entities.push_back( new ExtrusionMultiPath(*multipath) );
|
||||
} else if (ExtrusionLoop* loop = dynamic_cast<ExtrusionLoop*>(entity)) {
|
||||
THIS->entities.push_back( new ExtrusionLoop(*loop) );
|
||||
} else if(ExtrusionEntityCollection* collection = dynamic_cast<ExtrusionEntityCollection*>(entity)) {
|
||||
|
@ -1,38 +0,0 @@
|
||||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <xsinit.h>
|
||||
#include "libslic3r/ExtrusionEntity.hpp"
|
||||
%}
|
||||
|
||||
%name{Slic3r::ExtrusionMultiPath} class ExtrusionMultiPath {
|
||||
ExtrusionMultiPath();
|
||||
~ExtrusionMultiPath();
|
||||
Clone<ExtrusionMultiPath> clone()
|
||||
%code{% RETVAL = THIS; %};
|
||||
void reverse();
|
||||
Clone<Point> first_point();
|
||||
Clone<Point> 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> 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
|
||||
|
||||
%}
|
||||
};
|
@ -1,60 +0,0 @@
|
||||
%module{Slic3r::XS};
|
||||
|
||||
%{
|
||||
#include <xsinit.h>
|
||||
#include "libslic3r/Flow.hpp"
|
||||
%}
|
||||
|
||||
%name{Slic3r::Flow} class Flow {
|
||||
~Flow();
|
||||
%name{_new} Flow(float width, float height, float nozzle_diameter);
|
||||
Clone<Flow> 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
|
||||
|
||||
%}
|
||||
|
@ -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<Polygon>
|
||||
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:
|
||||
|
@ -23,8 +23,6 @@
|
||||
Ref<ExtrusionEntityCollection> fills()
|
||||
%code%{ RETVAL = &THIS->fills; %};
|
||||
|
||||
Clone<Flow> 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); %};
|
||||
|
@ -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<Linef3> clone()
|
||||
%code{% RETVAL = THIS; %};
|
||||
Ref<Vec3d> a()
|
||||
%code{% RETVAL = &THIS->a; %};
|
||||
Ref<Vec3d> b()
|
||||
%code{% RETVAL = &THIS->b; %};
|
||||
Clone<Vec3d> intersect_plane(double z);
|
||||
void scale(double factor);
|
||||
};
|
||||
|
@ -71,7 +71,6 @@
|
||||
%code%{ RETVAL = THIS->materials.size(); %};
|
||||
|
||||
bool add_default_instances();
|
||||
Clone<BoundingBoxf3> 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<TriangleMesh> mesh();
|
||||
Clone<TriangleMesh> raw_mesh();
|
||||
Clone<BoundingBoxf3> instance_bounding_box(int idx)
|
||||
%code%{ RETVAL = THIS->instance_bounding_box(idx, true); %};
|
||||
Clone<BoundingBoxf3> bounding_box();
|
||||
|
||||
%name{_add_volume} Ref<ModelVolume> 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;
|
||||
};
|
||||
|
@ -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<Point> centroid();
|
||||
Clone<BoundingBox> bounding_box();
|
||||
Clone<Point> point_projection(Point* point)
|
||||
%code{% RETVAL = THIS->point_projection(*point); %};
|
||||
Clone<Point> first_intersection(Line* line)
|
||||
%code{%
|
||||
Point p;
|
||||
|
@ -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:
|
||||
|
@ -28,7 +28,6 @@
|
||||
void merge(TriangleMesh* mesh)
|
||||
%code{% THIS->merge(*mesh); %};
|
||||
Clone<Polygon> convex_hull();
|
||||
Clone<BoundingBoxf3> bounding_box();
|
||||
Clone<Vec3d> center()
|
||||
%code{% RETVAL = THIS->bounding_box().center(); %};
|
||||
int facets_count();
|
||||
|
@ -18,14 +18,6 @@ BoundingBox* O_OBJECT_SLIC3R
|
||||
Ref<BoundingBox> O_OBJECT_SLIC3R_T
|
||||
Clone<BoundingBox> O_OBJECT_SLIC3R_T
|
||||
|
||||
BoundingBoxf* O_OBJECT_SLIC3R
|
||||
Ref<BoundingBoxf> O_OBJECT_SLIC3R_T
|
||||
Clone<BoundingBoxf> O_OBJECT_SLIC3R_T
|
||||
|
||||
BoundingBoxf3* O_OBJECT_SLIC3R
|
||||
Ref<BoundingBoxf3> O_OBJECT_SLIC3R_T
|
||||
Clone<BoundingBoxf3> O_OBJECT_SLIC3R_T
|
||||
|
||||
DynamicPrintConfig* O_OBJECT_SLIC3R
|
||||
Ref<DynamicPrintConfig> O_OBJECT_SLIC3R_T
|
||||
Clone<DynamicPrintConfig> O_OBJECT_SLIC3R_T
|
||||
@ -33,12 +25,6 @@ Clone<DynamicPrintConfig> O_OBJECT_SLIC3R_T
|
||||
StaticPrintConfig* O_OBJECT_SLIC3R
|
||||
Ref<StaticPrintConfig> O_OBJECT_SLIC3R_T
|
||||
|
||||
PrintObjectConfig* O_OBJECT_SLIC3R
|
||||
Ref<PrintObjectConfig> O_OBJECT_SLIC3R_T
|
||||
|
||||
PrintRegionConfig* O_OBJECT_SLIC3R
|
||||
Ref<PrintRegionConfig> O_OBJECT_SLIC3R_T
|
||||
|
||||
GCodeConfig* O_OBJECT_SLIC3R
|
||||
Ref<GCodeConfig> O_OBJECT_SLIC3R_T
|
||||
|
||||
@ -72,10 +58,6 @@ Line* O_OBJECT_SLIC3R
|
||||
Ref<Line> O_OBJECT_SLIC3R_T
|
||||
Clone<Line> O_OBJECT_SLIC3R_T
|
||||
|
||||
Linef3* O_OBJECT_SLIC3R
|
||||
Ref<Linef3> O_OBJECT_SLIC3R_T
|
||||
Clone<Linef3> O_OBJECT_SLIC3R_T
|
||||
|
||||
Polyline* O_OBJECT_SLIC3R
|
||||
Ref<Polyline> O_OBJECT_SLIC3R_T
|
||||
Clone<Polyline> O_OBJECT_SLIC3R_T
|
||||
@ -92,10 +74,6 @@ ExtrusionEntityCollection* O_OBJECT_SLIC3R
|
||||
Ref<ExtrusionEntityCollection> O_OBJECT_SLIC3R_T
|
||||
Clone<ExtrusionEntityCollection> O_OBJECT_SLIC3R_T
|
||||
|
||||
ExtrusionMultiPath* O_OBJECT_SLIC3R
|
||||
Ref<ExtrusionMultiPath> O_OBJECT_SLIC3R_T
|
||||
Clone<ExtrusionMultiPath> O_OBJECT_SLIC3R_T
|
||||
|
||||
ExtrusionPath* O_OBJECT_SLIC3R
|
||||
Ref<ExtrusionPath> O_OBJECT_SLIC3R_T
|
||||
Clone<ExtrusionPath> O_OBJECT_SLIC3R_T
|
||||
@ -104,10 +82,6 @@ ExtrusionLoop* O_OBJECT_SLIC3R
|
||||
Ref<ExtrusionLoop> O_OBJECT_SLIC3R_T
|
||||
Clone<ExtrusionLoop> O_OBJECT_SLIC3R_T
|
||||
|
||||
Flow* O_OBJECT_SLIC3R
|
||||
Ref<Flow> O_OBJECT_SLIC3R_T
|
||||
Clone<Flow> O_OBJECT_SLIC3R_T
|
||||
|
||||
Surface* O_OBJECT_SLIC3R
|
||||
Ref<Surface> O_OBJECT_SLIC3R_T
|
||||
Clone<Surface> 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
|
||||
|
@ -30,21 +30,11 @@
|
||||
%typemap{BoundingBox*};
|
||||
%typemap{Ref<BoundingBox>}{simple};
|
||||
%typemap{Clone<BoundingBox>}{simple};
|
||||
%typemap{BoundingBoxf*};
|
||||
%typemap{Ref<BoundingBoxf>}{simple};
|
||||
%typemap{Clone<BoundingBoxf>}{simple};
|
||||
%typemap{BoundingBoxf3*};
|
||||
%typemap{Ref<BoundingBoxf3>}{simple};
|
||||
%typemap{Clone<BoundingBoxf3>}{simple};
|
||||
%typemap{DynamicPrintConfig*};
|
||||
%typemap{Ref<DynamicPrintConfig>}{simple};
|
||||
%typemap{Clone<DynamicPrintConfig>}{simple};
|
||||
%typemap{StaticPrintConfig*};
|
||||
%typemap{Ref<StaticPrintConfig>}{simple};
|
||||
%typemap{PrintObjectConfig*};
|
||||
%typemap{Ref<PrintObjectConfig>}{simple};
|
||||
%typemap{PrintRegionConfig*};
|
||||
%typemap{Ref<PrintRegionConfig>}{simple};
|
||||
%typemap{GCodeConfig*};
|
||||
%typemap{Ref<GCodeConfig>}{simple};
|
||||
%typemap{PrintConfig*};
|
||||
@ -54,15 +44,9 @@
|
||||
%typemap{ExPolygon*};
|
||||
%typemap{Ref<ExPolygon>}{simple};
|
||||
%typemap{Clone<ExPolygon>}{simple};
|
||||
%typemap{Flow*};
|
||||
%typemap{Ref<Flow>}{simple};
|
||||
%typemap{Clone<Flow>}{simple};
|
||||
%typemap{Line*};
|
||||
%typemap{Ref<Line>}{simple};
|
||||
%typemap{Clone<Line>}{simple};
|
||||
%typemap{Linef3*};
|
||||
%typemap{Ref<Linef3>}{simple};
|
||||
%typemap{Clone<Linef3>}{simple};
|
||||
%typemap{Polyline*};
|
||||
%typemap{Ref<Polyline>}{simple};
|
||||
%typemap{Clone<Polyline>}{simple};
|
||||
@ -72,9 +56,6 @@
|
||||
%typemap{ExtrusionEntityCollection*};
|
||||
%typemap{Ref<ExtrusionEntityCollection>}{simple};
|
||||
%typemap{Clone<ExtrusionEntityCollection>}{simple};
|
||||
%typemap{ExtrusionMultiPath*};
|
||||
%typemap{Ref<ExtrusionMultiPath>}{simple};
|
||||
%typemap{Clone<ExtrusionMultiPath>}{simple};
|
||||
%typemap{ExtrusionPath*};
|
||||
%typemap{Ref<ExtrusionPath>}{simple};
|
||||
%typemap{Clone<ExtrusionPath>}{simple};
|
||||
|
Loading…
Reference in New Issue
Block a user