37 lines
807 B
C
37 lines
807 B
C
|
#pragma once
|
|||
|
#include "MetaData.h"
|
|||
|
#include <clipper.hpp>
|
|||
|
|
|||
|
using namespace ClipperLib;
|
|||
|
|
|||
|
class CalcVar {
|
|||
|
|
|||
|
public:
|
|||
|
float difx;
|
|||
|
float dify;
|
|||
|
float a;
|
|||
|
float b;
|
|||
|
float c;
|
|||
|
};
|
|||
|
|
|||
|
class VolumeCalc
|
|||
|
{
|
|||
|
public:
|
|||
|
VolumeCalc():m_Volume(0), m_SupportVolume(0) {}
|
|||
|
void CalcLayerVolume(MetaData* pmd, unsigned int layer);
|
|||
|
double GetVolume(void) { return m_Volume; }
|
|||
|
double GetSupportVolume(void) { return m_SupportVolume; }
|
|||
|
void GetLayerBorders(MetaData* metadata, unsigned int layer, PolyTree& pt, bool isSupport);
|
|||
|
void GetBlockSupport(MetaData* metadata, unsigned int layer, PolyTree& pt, double& spotSize);
|
|||
|
void BuildTree(PolyTree* node);
|
|||
|
bool isBetween(IntPoint a, IntPoint b, IntPoint c);
|
|||
|
double Dist(IntPoint a, IntPoint b);
|
|||
|
double Len(Path& p);
|
|||
|
|
|||
|
private:
|
|||
|
double m_Volume;
|
|||
|
double m_SupportVolume;
|
|||
|
|
|||
|
};
|
|||
|
|