mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 00:01:09 -06:00
Return Surface objects by reference from SurfaceCollection objects and fix a bug in XS code causing some shell options to be ignored
This commit is contained in:
parent
cb677c45de
commit
e02ae0d18a
9 changed files with 68 additions and 47 deletions
18
xs/src/Surface.cpp
Normal file
18
xs/src/Surface.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "Surface.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
SV*
|
||||
Surface::to_SV_ref() {
|
||||
SV* sv = newSV(0);
|
||||
sv_setref_pv( sv, "Slic3r::Surface::Ref", (void*)this );
|
||||
return sv;
|
||||
}
|
||||
|
||||
double
|
||||
Surface::area() const
|
||||
{
|
||||
return this->expolygon.area();
|
||||
}
|
||||
|
||||
}
|
|
@ -16,6 +16,8 @@ class Surface
|
|||
unsigned short thickness_layers; // in layers
|
||||
double bridge_angle;
|
||||
unsigned short extra_perimeters;
|
||||
SV* to_SV_ref();
|
||||
double area() const;
|
||||
};
|
||||
|
||||
typedef std::vector<Surface> Surfaces;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue