3D object positioning

This commit is contained in:
Alessandro Ranellucci 2014-12-16 01:12:37 +01:00
parent a82f95e903
commit fcfb3b98bc
16 changed files with 217 additions and 91 deletions

View file

@ -83,6 +83,7 @@ new_from_points(CLASS, points)
Clone<BoundingBoxf3> clone()
%code{% RETVAL = THIS; %};
void merge(BoundingBoxf3* bb) %code{% THIS->merge(*bb); %};
void merge_point(Pointf3* point) %code{% THIS->merge(*point); %};
void scale(double factor);
void translate(double x, double y, double z);
Clone<Pointf3> size();

View file

@ -66,3 +66,17 @@ Line::coincides_with(line_sv)
%}
};
%name{Slic3r::Linef3} class Linef3 {
Linef3(Pointf3* a, Pointf3* b)
%code{% RETVAL = new Linef3(*a, *b); %};
~Linef3();
Clone<Linef3> clone()
%code{% RETVAL = THIS; %};
Ref<Pointf3> a()
%code{% RETVAL = &THIS->a; %};
Ref<Pointf3> b()
%code{% RETVAL = &THIS->b; %};
Clone<Pointf3> intersect_plane(double z);
};

View file

@ -125,6 +125,7 @@ Point::coincides_with(point_sv)
void set_z(double val)
%code{% THIS->z = val; %};
void translate(double x, double y, double z);
void scale(double factor);
double distance_to(Pointf3* point)
%code{% RETVAL = THIS->distance_to(*point); %};
Clone<Pointf3> negative()

View file

@ -73,6 +73,10 @@ 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

View file

@ -60,6 +60,9 @@
%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};