fix mesh cross-section to respect placement

This commit is contained in:
wmayer
2019-05-13 17:44:56 +02:00
parent 0e86b2a735
commit 0644ed8e64

View File

@@ -986,8 +986,11 @@ std::vector<Base::Vector3d> MeshObject::getPointNormals() const
void MeshObject::crossSections(const std::vector<MeshObject::TPlane>& planes, std::vector<MeshObject::TPolylines> &sections,
float fMinEps, bool bConnectPolygons) const
{
MeshCore::MeshFacetGrid grid(_kernel);
MeshCore::MeshAlgorithm algo(_kernel);
MeshCore::MeshKernel kernel(this->_kernel);
kernel.Transform(this->_Mtrx);
MeshCore::MeshFacetGrid grid(kernel);
MeshCore::MeshAlgorithm algo(kernel);
for (std::vector<MeshObject::TPlane>::const_iterator it = planes.begin(); it != planes.end(); ++it) {
MeshObject::TPolylines polylines;
algo.CutWithPlane(it->first, it->second, grid, polylines, fMinEps, bConnectPolygons);