You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
#include "DrawOperator/CurveEx.h"
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* <EFBFBD>պϼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
*/
|
|
|
|
|
|
class BoundaryDetection {
|
|
|
|
|
|
public:
|
|
|
|
|
|
BoundaryDetection() = default;
|
|
|
|
|
|
~BoundaryDetection() = default;
|
|
|
|
|
|
|
|
|
|
|
|
struct DetectionResult
|
|
|
|
|
|
{
|
|
|
|
|
|
bool isClosed;
|
|
|
|
|
|
CCurveEx* pCurve;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD>պ<EFBFBD>
|
|
|
|
|
|
*
|
|
|
|
|
|
* \param curves <EFBFBD><EFBFBD><EFBFBD>в<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
* \return
|
|
|
|
|
|
*/
|
|
|
|
|
|
std::vector<DetectionResult> CheckClosure(const std::vector<CCurveEx*>& curves) const
|
|
|
|
|
|
{
|
|
|
|
|
|
std::vector<DetectionResult> result;
|
|
|
|
|
|
result.reserve(curves.size());
|
|
|
|
|
|
|
|
|
|
|
|
for (CCurveEx* pCurve : curves)
|
|
|
|
|
|
{
|
|
|
|
|
|
result.push_back({ static_cast<bool>(pCurve->IsClosed()), pCurve });
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|