diff --git a/algoim/organizer/organizer.hpp b/algoim/organizer/organizer.hpp index 0aff8fd..1bface6 100644 --- a/algoim/organizer/organizer.hpp +++ b/algoim/organizer/organizer.hpp @@ -344,7 +344,7 @@ void buildOcTreeV0(const Scene& scene, int bbb = 1; } const std::vector& polyIntersectIndices = node.polyIntersectIndices; - if (polyIntersectIndices.size() <= 8) { + if (polyIntersectIndices.size() <= 7) { leaves.emplace_back(node); return; } @@ -545,7 +545,7 @@ BasicTaskRes basicTask(const Scene& scene, const OcTreeNode& node, int q = 10) uvector3i numSamples(50, 50, 50); // if (false) { - if (node.polyIntersectIndices.size() > 0) { + if (node.polyIntersectIndices.size() > 8) { // TODO: 蒙特卡洛 std::cout << "Monte Carlo 1" << std::endl; ; diff --git a/algoim/organizer/primitive.hpp b/algoim/organizer/primitive.hpp index 2c7b4cb..60503b5 100644 --- a/algoim/organizer/primitive.hpp +++ b/algoim/organizer/primitive.hpp @@ -801,6 +801,28 @@ void makeHalfPlane(const HalfPlaneDesc& halfPlaneDesc, VisiblePrimitiveRep& visi buildNearBalancedBlobTree(visiblePrimitive.subBlobTree, 1); } +uvector3 getFaceNorm(const std::vector& points, const std::vector& indices, int faceBias, int faceStride) +{ + // 注意任意三点可能共线! + + assert(faceStride >= 3); + + // 遍历点集,寻找不共线的三个点 + for (size_t i = 0; i < faceStride - 2; ++i) { + for (size_t j = i + 1; j < faceStride - 1; ++j) { + for (size_t k = j + 1; k < faceStride; ++k) { + uvector3 v1 = points[indices[faceBias + j]] - points[indices[faceBias + i]]; + uvector3 v2 = points[indices[faceBias + k]] - points[indices[faceBias + i]]; + uvector3 N = cross(v1, v2); + if (!isnan(N) && norm(N) > std::numeric_limits::epsilon()) { + return N; // 返回归一化后的法向量 + } + } + } + } + throw std::runtime_error("所有点都共线,无法计算法向量"); +} + void makeMesh(const MeshDesc& mesh, VisiblePrimitiveRep& visiblePrimitive) { assert(visiblePrimitive.tensors.size() == mesh.indexInclusiveScan.size()); @@ -814,7 +836,7 @@ void makeMesh(const MeshDesc& mesh, VisiblePrimitiveRep& visiblePrimitive) auto& indices = mesh.indices; uvector3 V01 = vertices[indices[indexBeg + 1]] - mesh.vertices[indices[indexBeg]]; uvector3 V02 = vertices[indices[indexBeg + 2]] - mesh.vertices[indices[indexBeg]]; - uvector3 N = cross(V01, V02); + uvector3 N = getFaceNorm(vertices, indices, indexBeg, indexSize); N /= norm(N); real d = -dot(N, vertices[indices[indexBeg]]); // 法线所指方向为>0区域 diff --git a/algoim/quadrature_multipoly.hpp b/algoim/quadrature_multipoly.hpp index 04e6ced..5d69ed0 100644 --- a/algoim/quadrature_multipoly.hpp +++ b/algoim/quadrature_multipoly.hpp @@ -36,7 +36,7 @@ #include "tanhsinh.hpp" #include "bernstein.hpp" -#define STOP_WHEN_BLOCKED true +#define STOP_WHEN_BLOCKED false #if STOP_WHEN_BLOCKED #include diff --git a/algoim/uvector.hpp b/algoim/uvector.hpp index dc6c832..dbf6712 100644 --- a/algoim/uvector.hpp +++ b/algoim/uvector.hpp @@ -349,6 +349,14 @@ auto norm(const T& u) return sqrt(sqrnorm(u)); } +template +bool isnan(const uvector& u) +{ + for (int i = 0; i < N; ++i) + if (std::isnan(u(i))) return true; + return false; +} + // alter the extent of a uvector by truncation or zero backfill template uvector alter_extent(const uvector& u) diff --git a/examples/example_loader.cpp b/examples/example_loader.cpp index 5c8752e..2b1cd98 100644 --- a/examples/example_loader.cpp +++ b/examples/example_loader.cpp @@ -15,7 +15,7 @@ void loaderTest1() std::pair before, after; - /* 1 */ + /* ��1 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -27,7 +27,7 @@ void loaderTest1() loader.getAreaAndVolume(tag1); - /* 2 */ + /* ��2 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -43,7 +43,7 @@ void loaderTest1() loader.getAreaAndVolume(tag2); - /* 3 */ + /* ��3 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -59,7 +59,7 @@ void loaderTest1() loader.getAreaAndVolume(tag3); - /* 4 */ + /* ��4 */ topPoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 0.0000000000000000}; bottomPoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 3300.0000000000000000}; radius1 = 32450.000000000000; @@ -68,19 +68,19 @@ void loaderTest1() loader.getAreaAndVolume(tag4); - /* 3и */ + /* ��3���и� */ basePoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 0.0000000000000000}; direction = Direction3D{0, 0, 1}; loader.split(tag3, basePoint, direction); loader.getAreaAndVolume(tag3); - /* 34 */ + /* ��3����4������ */ loader.differentNode(tag3, tag4); loader.getAreaAndVolume(tag3); - /* 5 */ + /* ��5 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -94,15 +94,15 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag5 = loader.addExtrude(points, bulges, extusion); - /* 5и */ + /* ��5���и� */ basePoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 3300.0000000000000000}; direction = Direction3D{0, 0, 1}; loader.split(tag5, basePoint, direction); - /* 35 */ + /* ��3����5������ */ loader.unionNode(tag3, tag5); - /* 6 */ + /* ��6 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -116,18 +116,18 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag6 = loader.addExtrude(points, bulges, extusion); - /* 6и */ + /* ��6���и� */ basePoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 3300.0000000000000000}; direction = Direction3D{0, 0, 1}; loader.split(tag6, basePoint, direction); - /* 36 */ + /* ��3����6������ */ loader.unionNode(tag3, tag6); - /* 23 */ + /* ��2����3������ */ loader.differentNode(tag2, tag3); - /* 7 */ + /* ��7 */ points.clear(); bulges.clear(); points.push_back(Point3D{32449.999998877582, -3.8392495305561452e-07, 0.0000000000000000}); @@ -141,7 +141,7 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag7 = loader.addExtrude(points, bulges, extusion); - /* 8 */ + /* ��8 */ points.clear(); bulges.clear(); points.push_back(Point3D{32449.999998877582, -3.8392495305561452e-07, 0.0000000000000000}); @@ -155,22 +155,22 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag8 = loader.addExtrude(points, bulges, extusion); - /* 9 */ + /* ��9 */ topPoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 0.0000000000000000}; bottomPoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 3300.0000000000000000}; radius1 = 32450.000000000000; radius2 = 33539.000000000000; auto tag9 = loader.addCone(topPoint, bottomPoint, radius1, radius2); - /* 8и */ + /* ��8���и� */ basePoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 3300.0000000000000000}; direction = Direction3D{0, 0, 1}; loader.split(tag8, basePoint, direction); - /* 89 */ + /* ��8����9������ */ loader.differentNode(tag8, tag9); - /* 10 */ + /* ��10 */ points.clear(); bulges.clear(); points.push_back(Point3D{32449.999998877582, -3.8392495305561452e-07, 0.0000000000000000}); @@ -184,15 +184,15 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag10 = loader.addExtrude(points, bulges, extusion); - /* 10и */ + /* ��10���и� */ basePoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 3300.0000000000000000}; direction = Direction3D{0, 0, 1}; loader.split(tag10, basePoint, direction); - /* 810 */ + /* ��8����10������ */ loader.unionNode(tag8, tag10); - /* 11 */ + /* ��11 */ points.clear(); bulges.clear(); points.push_back(Point3D{32449.999998877582, -3.8392495305561452e-07, 0.0000000000000000}); @@ -206,29 +206,29 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag11 = loader.addExtrude(points, bulges, extusion); - /* 11и */ + /* ��11���и� */ basePoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 3300.0000000000000000}; direction = Direction3D{0, 0, 1}; loader.split(tag11, basePoint, direction); - /* 811 */ + /* ��8����11������ */ loader.unionNode(tag8, tag11); - /* 78 */ + /* ��7����8������ */ loader.differentNode(tag7, tag8); - /* 27 */ + /* ��2����7������ */ loader.unionNode(tag2, tag7); - /* 12 */ + /* ��1����2������ */ loader.unionNode(tag1, tag2); - /* 1 Zƫ -3600 */ + /* ��1 Z��ƫ�� -3600 */ direction = Direction3D{0, 0, 1}; offset = -3600; loader.offset(tag1, direction, offset); - /* µ11 */ + /* �µ���11 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32050.000001122418, -3.8396319723688066e-07, 0.0000000000000000}); @@ -238,7 +238,7 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto newTag11 = loader.addExtrude(points, bulges, extusion); - /* 0 */ + /* ��0 */ points.clear(); bulges.clear(); points.push_back(Point3D{-11798.670446418590, 5999.2409883221799, 0.0000000000000000}); @@ -248,18 +248,18 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag0 = loader.addExtrude(points, bulges, extusion); - /* µ110 */ + /* �µ���11����0������ */ loader.differentNode(newTag11, tag0); - /* µ11 Zƫ -3500 */ + /* �µ���11 Z��ƫ�� -3500 */ direction = Direction3D{0, 0, 1}; offset = -3500; loader.offset(newTag11, direction, offset); - /* 1µ11н */ + /* ��1���µ���11�н� */ /* TODO */ - /* 12 */ + /* ��12 */ points.clear(); bulges.clear(); points.push_back(Point3D{676.33403607269543, 5999.2409883221790, 0.0000000000000000}); @@ -269,18 +269,18 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag12 = loader.addExtrude(points, bulges, extusion); - /* 12 Zƫ -3500 */ + /* ��12 Z��ƫ�� -3500 */ direction = Direction3D{0, 0, 1}; offset = -3500; loader.offset(tag12, direction, offset); - /* 112н */ + /* ��1����12�н� */ /* TODO */ - /* µ1112 12 */ + /* �µ���11����12������ ������12 */ loader.unionNode(newTag11, tag12); - /* 13 */ + /* ��13 */ points.clear(); bulges.clear(); points.push_back(Point3D{-2398.6665401680511, 5999.2409883221771, 0.0000000000000000}); @@ -290,7 +290,7 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag13 = loader.addExtrude(points, bulges, extusion); - /* 14 */ + /* ��14 */ points.clear(); bulges.clear(); points.push_back(Point3D{-673.66711640879771, 5999.2409883221790, 0.0000000000000000}); @@ -300,33 +300,33 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag14 = loader.addExtrude(points, bulges, extusion); - /* 1314 */ + /* ��13����14������ */ loader.differentNode(tag13, tag14); - /* 13 Zƫ-3500 */ + /* ��13 Z��ƫ��-3500 */ direction = Direction3D{0, 0, 1}; offset = -3500; loader.offset(tag13, direction, offset); - /* 113н */ + /* ��1����13�н� */ /* TODO */ - /* µ111313 */ + /* �µ���11����13������������13 */ loader.unionNode(newTag11, tag13); before = loader.getAreaAndVolume(tag1); - /* 1µ11 */ + /* ��1���µ���11������ */ loader.differentNode(tag1, newTag11); after = loader.getAreaAndVolume(tag1); - /* ȡ 1 ǰ */ + /* ��ȡ ��1 ����ǰ��� ����� �� ����� */ areaDifference = after.first - before.first; volumeDifference = after.second - before.second; std::cout << areaDifference << ", " << volumeDifference << std::endl; - /* ۼ1 */ + /* ������� �ۼ���1 */ auto subTag1 = loader.addEmpty(); auto cycle = [&loader, subTag1](const Point3D& point) { std::vector points; @@ -335,7 +335,7 @@ void loaderTest1() Direction3D direction; double offset; - /* ѭ1 */ + /* ѭ����1 */ points.clear(); bulges.clear(); points.push_back(Point3D{-1000.0000000000000, 1000.0000000000001, 0.0000000000000000}); @@ -349,17 +349,17 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto cycleTag1 = loader.addExtrude(points, bulges, extusion); - /* ѭ1 ƫ+ X,Y,Zֵ */ + /* ѭ����1 ƫ��+ �����X,Y,Z����ֵ */ loader.offset(cycleTag1, Direction3D{point}, point.length()); - /* ѭ2 */ + /* ѭ����2 */ auto leftBottomPoint = Point3D{point.m_x - 1000, point.m_y - 1000, point.m_z + 0.0000000000005}; double length = 2000.0000000000036; double width = 2000.0000000000036; double height = 600; auto cycleTag2 = loader.addBox(leftBottomPoint, length, width, height); - /* ѭ3 */ + /* ѭ����3 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32050.000001122418, -3.8396319723688066e-07, 0.0000000000000000}); @@ -369,21 +369,21 @@ void loaderTest1() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto cycleTag3 = loader.addExtrude(points, bulges, extusion); - /* ѭ3 Zƫ -2900 */ + /* ѭ����3 Z��ƫ�� -2900 */ direction = Direction3D{0, 0, 1}; offset = -2900; loader.offset(cycleTag3, direction, offset); - /* ѭ32 */ + /* ѭ����3����2������ */ loader.intersectNode(cycleTag3, cycleTag2); - /* ѭ13 */ + /* ѭ����1����3������ */ loader.intersectNode(cycleTag1, cycleTag3); - /* ѭ11н */ + /* ѭ����1����1�н� */ /* TODO */ - /* ۼ1ѭ1 */ + /* �ۼ���1��ѭ����1������ */ loader.unionNode(subTag1, cycleTag1); }; @@ -437,16 +437,16 @@ void loaderTest1() for (auto& point : points) { cycle(point); } before = loader.getAreaAndVolume(tag1); - /* 1Ϳۼ1 */ + /* ��1�Ϳۼ���1������ */ loader.differentNode(tag1, subTag1); after = loader.getAreaAndVolume(tag1); - /* ȡ 1 ǰ */ + /* ��ȡ ��1 ����ǰ��� ����� �� ����� */ areaDifference = after.first - before.first; volumeDifference = after.second - before.second; std::cout << areaDifference << ", " << volumeDifference << std::endl; - /* 15Ent1.bool */ + /* ��15��Ent1.bool */ bottomPoint = Point3D{0.0000, 0.0000, -3600.0000}; radius = 32150.0; direction = Direction3D{0, 0, 100}; @@ -457,10 +457,10 @@ void loaderTest1() auto tag15_1 = loader.addCylinder(bottomPoint, radius, direction); loader.differentNode(tag15, tag15_1); - /* 115 */ + /* ��1����15������ */ loader.differentNode(tag1, tag15); - /* 16 */ + /* ��16 */ points.clear(); bulges.clear(); points.push_back(Point3D{-2503.6291053659488, 5999.2409883221790, -3500.0000000000000}); @@ -471,11 +471,11 @@ void loaderTest1() auto tag16 = loader.addExtrude(points, bulges, extusion); before = loader.getAreaAndVolume(tag1); - /* 116 */ + /* ��1����16������ */ loader.differentNode(tag1, tag16); after = loader.getAreaAndVolume(tag1); - /* ȡ 1 ǰ */ + /* ��ȡ ��1 ����ǰ��� ����� �� ����� */ areaDifference = after.first - before.first; volumeDifference = after.second - before.second; std::cout << areaDifference << ", " << volumeDifference << std::endl; @@ -495,7 +495,7 @@ void loaderTest2Simplified() std::pair before, after; - /* 1 */ + /* ��1 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -506,26 +506,26 @@ void loaderTest2Simplified() auto tag1 = loader.addExtrude(points, bulges, extusion); - /* 4 */ + /* ��4 */ topPoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 0.0000000000000000}; bottomPoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 3300.0000000000000000}; radius1 = 32450.000000000000; radius2 = 33539.000000000000; auto tag4 = loader.addCone(topPoint, bottomPoint, radius1, radius2); - /* 9 */ + /* ��9 */ topPoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 0.0000000000000000}; bottomPoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 3300.0000000000000000}; radius1 = 32450.000000000000; radius2 = 33539.000000000000; auto tag9 = loader.addCone(topPoint, bottomPoint, radius1, radius2); - /* 1 Zƫ -3600 */ + /* ��1 Z��ƫ�� -3600 */ direction = Direction3D{0, 0, 1}; offset = -3600; loader.offset(tag1, direction, offset); - /* 111 */ + /* ��111 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32050.000001122418, -3.8396319723688066e-07, 0.0000000000000000}); @@ -535,7 +535,7 @@ void loaderTest2Simplified() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag111 = loader.addExtrude(points, bulges, extusion); - /* 0 */ + /* ��0 */ points.clear(); bulges.clear(); points.push_back(Point3D{-11798.670446418590, 5999.2409883221799, 0.0000000000000000}); @@ -545,18 +545,18 @@ void loaderTest2Simplified() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag0 = loader.addExtrude(points, bulges, extusion); - /* 1110 */ + /* ��111����0������ */ loader.differentNode(tag111, tag0); - /* 111 Zƫ -3500 */ + /* ��111 Z��ƫ�� -3500 */ direction = Direction3D{0, 0, 1}; offset = -3500; loader.offset(tag111, direction, offset); - /* 1111н */ + /* ��1����111�н� */ /* TODO */ - /* 12 */ + /* ��12 */ points.clear(); bulges.clear(); points.push_back(Point3D{676.33403607269543, 5999.2409883221790, 0.0000000000000000}); @@ -566,18 +566,18 @@ void loaderTest2Simplified() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag12 = loader.addExtrude(points, bulges, extusion); - /* 12 Zƫ -3500 */ + /* ��12 Z��ƫ�� -3500 */ direction = Direction3D{0, 0, 1}; offset = -3500; loader.offset(tag12, direction, offset); - /* 112н */ + /* ��1����12�н� */ /* TODO */ - /* 11112 */ + /* ��111����12������ */ loader.unionNode(tag111, tag12); - /* 13 */ + /* ��13 */ points.clear(); bulges.clear(); points.push_back(Point3D{-2398.6665401680511, 5999.2409883221771, 0.0000000000000000}); @@ -587,7 +587,7 @@ void loaderTest2Simplified() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag13 = loader.addExtrude(points, bulges, extusion); - /* 14 */ + /* ��14 */ points.clear(); bulges.clear(); points.push_back(Point3D{-673.66711640879771, 5999.2409883221790, 0.0000000000000000}); @@ -597,31 +597,31 @@ void loaderTest2Simplified() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag14 = loader.addExtrude(points, bulges, extusion); - /* 1314 */ + /* ��13����14������ */ loader.differentNode(tag13, tag14); - /* 13 Zƫ -3500 */ + /* ��13 Z��ƫ�� -3500 */ direction = Direction3D{0, 0, 1}; offset = -3500; loader.offset(tag13, direction, offset); - /* 113н */ + /* ��1����13�н� */ /* TODO */ - /* 11113 */ + /* ��111����13������ */ loader.unionNode(tag111, tag13); // before = loader.getAreaAndVolume(tag1); - /* 1111 */ + /* ��1����111������ */ loader.differentNode(tag1, tag111); // after = loader.getAreaAndVolume(tag1); - /* ȡ1 ǰ */ + /* ��ȡ��1 ����ǰ�������������� */ // areaDifference = after.first - before.first; // volumeDifference = after.second - before.second; // std::cout << areaDifference << ", " << volumeDifference << std::endl; - /* ۼ1 */ + /* ������� �ۼ���1 */ // auto subTag1 = loader.addEmpty(); // auto cycle = [&loader, subTag1](const Point3D& point) { // std::vector points; @@ -630,7 +630,7 @@ void loaderTest2Simplified() // Direction3D direction; // double offset; - // /* ѭ1 */ + // /* ѭ����1 */ // points.clear(); // bulges.clear(); // points.push_back(Point3D{-1000.0000000000000, 1000.0000000000001, 0.0000000000000000}); @@ -644,17 +644,17 @@ void loaderTest2Simplified() // extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; // auto cycleTag1 = loader.addExtrude(points, bulges, extusion); - // /* ѭ1 ƫ+ X,Y,Zֵ */ + // /* ѭ����1 ƫ��+ �����X,Y,Z����ֵ */ // loader.offset(cycleTag1, Direction3D{point}, point.length()); - // /* ѭ2 */ + // /* ѭ����2 */ // auto leftBottomPoint = Point3D{point.m_x - 1000, point.m_y - 1000, point.m_z + 0.0000000000005}; // double length = 2000.0000000000036; // double width = 2000.0000000000036; // double height = 600; // auto cycleTag2 = loader.addBox(leftBottomPoint, length, width, height); - // /* ѭ3 */ + // /* ѭ����3 */ // points.clear(); // bulges.clear(); // points.push_back(Point3D{-32050.000001122418, -3.8396319723688066e-07, 0.0000000000000000}); @@ -664,35 +664,35 @@ void loaderTest2Simplified() // extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; // auto cycleTag3 = loader.addExtrude(points, bulges, extusion); - // /* ѭ3 Zƫ -2900 */ + // /* ѭ����3 Z��ƫ�� -2900 */ // direction = Direction3D{0, 0, 1}; // offset = -2900; // loader.offset(cycleTag3, direction, offset); - // /* ѭ32 */ + // /* ѭ����3����2������ */ // loader.intersectNode(cycleTag3, cycleTag2); - // /* ѭ13 */ + // /* ѭ����1����3������ */ // loader.intersectNode(cycleTag1, cycleTag3); - // /* ѭ11н */ + // /* ѭ����1����1�н� */ // /* TODO */ - // /* ۼ1ѭ1 */ + // /* �ۼ���1��ѭ����1������ */ // loader.unionNode(subTag1, cycleTag1); // }; // before = loader.getAreaAndVolume(tag1); - /* 1Ϳۼ1 */ + /* ��1�Ϳۼ���1������ */ // loader.differentNode(tag1, subTag1); // after = loader.getAreaAndVolume(tag1); - /* ȡ 1 ǰ */ + /* ��ȡ ��1 ����ǰ��� ����� �� ����� */ // areaDifference = after.first - before.first; // volumeDifference = after.second - before.second; // std::cout << areaDifference << ", " << volumeDifference << std::endl; - /* 15Ent1.bool */ + /* ��15��Ent1.bool */ bottomPoint = Point3D{0.0000, 0.0000, -3600.0000}; radius = 32150.0; direction = Direction3D{0, 0, 100}; @@ -703,12 +703,12 @@ void loaderTest2Simplified() auto tag15_1 = loader.addCylinder(bottomPoint, radius, direction); loader.differentNode(tag15, tag15_1); - /* 115 */ + /* ��1����15������ */ loader.differentNode(tag1, tag15); // after = loader.getAreaAndVolume(tag1); - /* ȡ1 ǰ */ + /* ��ȡ��1 ����ǰ�������������� */ // areaDifference = after.first - before.first; // volumeDifference = after.second - before.second; // std::cout << areaDifference << ", " << volumeDifference << std::endl; @@ -733,7 +733,7 @@ void loaderTest2() std::pair before, after; - /* 1 */ + /* ��1 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -743,7 +743,7 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag1 = loader.addExtrude(points, bulges, extusion); - /* 2 */ + /* ��2 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -757,7 +757,7 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag2 = loader.addExtrude(points, bulges, extusion); - /* 3 */ + /* ��3 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -771,22 +771,22 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag3 = loader.addExtrude(points, bulges, extusion); - /* 4 */ + /* ��4 */ topPoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 0.0000000000000000}; bottomPoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 3300.0000000000000000}; radius1 = 32450.000000000000; radius2 = 33539.000000000000; auto tag4 = loader.addCone(topPoint, bottomPoint, radius1, radius2); - /* 3и */ + /* ��3���и� */ direction = Direction3D{0, 0, 1}; basePoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 0.0000000000000000}; loader.split(tag3, basePoint, direction); - /* 34 */ + /* ��3����4������ */ loader.differentNode(tag3, tag4); - /* 5 */ + /* ��5 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -800,15 +800,15 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag5 = loader.addExtrude(points, bulges, extusion); - /* 5и */ + /* ��5���и� */ direction = Direction3D{0, 0, 1}; basePoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 3300.0000000000000000}; loader.split(tag5, basePoint, direction); - /* 35 */ + /* ��3����5������ */ loader.unionNode(tag3, tag5); - /* 6 */ + /* ��6 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32450.000001122418, -3.8391231093737305e-07, 0.0000000000000000}); @@ -822,18 +822,18 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag6 = loader.addExtrude(points, bulges, extusion); - /* 6и */ + /* ��6���и� */ direction = Direction3D{0, 0, 1}; basePoint = Point3D{-1.1224183253943920e-06, -3.8391322798592142e-07, 3300.0000000000000000}; loader.split(tag6, basePoint, direction); - /* 36 */ + /* ��3����6������ */ loader.unionNode(tag3, tag6); - /* 23 */ + /* ��2����3������ */ loader.differentNode(tag2, tag3); - /* 7 */ + /* ��7 */ points.clear(); bulges.clear(); points.push_back(Point3D{32449.999998877582, -3.8392495305561452e-07, 0.0000000000000000}); @@ -847,7 +847,7 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag7 = loader.addExtrude(points, bulges, extusion); - /* 8 */ + /* ��8 */ points.clear(); bulges.clear(); points.push_back(Point3D{32449.999998877582, -3.8392495305561452e-07, 0.0000000000000000}); @@ -861,22 +861,22 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag8 = loader.addExtrude(points, bulges, extusion); - /* 9 */ + /* ��9 */ topPoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 0.0000000000000000}; bottomPoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 3300.0000000000000000}; radius1 = 32450.000000000000; radius2 = 33539.000000000000; auto tag9 = loader.addCone(topPoint, bottomPoint, radius1, radius2); - /* 8и */ + /* ��8���и� */ direction = Direction3D{0, 0, 1}; basePoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 3300.0000000000000000}; loader.split(tag8, basePoint, direction); - /* 89 */ + /* ��8����9������ */ loader.differentNode(tag8, tag9); - /* 10 */ + /* ��10 */ points.clear(); bulges.clear(); points.push_back(Point3D{32449.999998877582, -3.8392495305561452e-07, 0.0000000000000000}); @@ -890,15 +890,15 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag10 = loader.addExtrude(points, bulges, extusion); - /* 10и */ + /* ��10���и� */ direction = Direction3D{0, 0, 1}; basePoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 3300.0000000000000000}; loader.split(tag10, basePoint, direction); - /* 810 */ + /* ��8����10������ */ loader.unionNode(tag8, tag10); - /* 11 */ + /* ��11 */ points.clear(); bulges.clear(); points.push_back(Point3D{32449.999998877582, -3.8392495305561452e-07, 0.0000000000000000}); @@ -912,29 +912,29 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 3300.0000000000000}; auto tag11 = loader.addExtrude(points, bulges, extusion); - /* 11и */ + /* ��11���и� */ direction = Direction3D{0, 0, 1}; basePoint = Point3D{-1.1224183253943920e-06, -3.8392403600706615e-07, 3300.0000000000000000}; loader.split(tag11, basePoint, direction); - /* 811 */ + /* ��8����11������ */ loader.unionNode(tag8, tag11); - /* 78 */ + /* ��7����8������ */ loader.differentNode(tag7, tag8); - /* 27 */ + /* ��2����7������ */ loader.unionNode(tag2, tag7); - /* 12 */ + /* ��1����2������ */ loader.unionNode(tag1, tag2); - /* 1 Zƫ -3600 */ + /* ��1 Z��ƫ�� -3600 */ direction = Direction3D{0, 0, 1}; offset = -3600; loader.offset(tag1, direction, offset); - /* 111 */ + /* ��111 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32050.000001122418, -3.8396319723688066e-07, 0.0000000000000000}); @@ -944,7 +944,7 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag111 = loader.addExtrude(points, bulges, extusion); - /* 0 */ + /* ��0 */ points.clear(); bulges.clear(); points.push_back(Point3D{-11798.670446418590, 5999.2409883221799, 0.0000000000000000}); @@ -954,18 +954,18 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag0 = loader.addExtrude(points, bulges, extusion); - /* 1110 */ + /* ��111����0������ */ loader.differentNode(tag111, tag0); - /* 111 Zƫ -3500 */ + /* ��111 Z��ƫ�� -3500 */ direction = Direction3D{0, 0, 1}; offset = -3500; loader.offset(tag111, direction, offset); - /* 1111н */ + /* ��1����111�н� */ /* TODO */ - /* 12 */ + /* ��12 */ points.clear(); bulges.clear(); points.push_back(Point3D{676.33403607269543, 5999.2409883221790, 0.0000000000000000}); @@ -975,18 +975,18 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag12 = loader.addExtrude(points, bulges, extusion); - /* 12 Zƫ -3500 */ + /* ��12 Z��ƫ�� -3500 */ direction = Direction3D{0, 0, 1}; offset = -3500; loader.offset(tag12, direction, offset); - /* 112н */ + /* ��1����12�н� */ /* TODO */ - /* 11112 */ + /* ��111����12������ */ loader.unionNode(tag111, tag12); - /* 13 */ + /* ��13 */ points.clear(); bulges.clear(); points.push_back(Point3D{-2398.6665401680511, 5999.2409883221771, 0.0000000000000000}); @@ -997,7 +997,7 @@ void loaderTest2() auto tag13 = loader.addExtrude(points, bulges, extusion); - /* 14 */ + /* ��14 */ points.clear(); bulges.clear(); points.push_back(Point3D{-673.66711640879771, 5999.2409883221790, 0.0000000000000000}); @@ -1007,31 +1007,31 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto tag14 = loader.addExtrude(points, bulges, extusion); - /* 1314 */ + /* ��13����14������ */ loader.differentNode(tag13, tag14); - /* 13 Zƫ -3500 */ + /* ��13 Z��ƫ�� -3500 */ direction = Direction3D{0, 0, 1}; offset = -3500; loader.offset(tag13, direction, offset); - /* 113н */ + /* ��1����13�н� */ /* TODO */ - /* 11113 */ + /* ��111����13������ */ loader.unionNode(tag111, tag13); // before = loader.getAreaAndVolume(tag1); - /* 1111 */ + /* ��1����111������ */ loader.differentNode(tag1, tag111); // after = loader.getAreaAndVolume(tag1); - /* ȡ1 ǰ */ + /* ��ȡ��1 ����ǰ�������������� */ // areaDifference = after.first - before.first; // volumeDifference = after.second - before.second; // std::cout << areaDifference << ", " << volumeDifference << std::endl; - /* ۼ1 */ + /* ������� �ۼ���1 */ auto subTag1 = loader.addEmpty(); auto cycle = [&loader, subTag1](const Point3D& point) { std::vector points; @@ -1040,7 +1040,7 @@ void loaderTest2() Direction3D direction; double offset; - /* ѭ1 */ + /* ѭ����1 */ points.clear(); bulges.clear(); points.push_back(Point3D{-1000.0000000000000, 1000.0000000000001, 0.0000000000000000}); @@ -1054,17 +1054,17 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto cycleTag1 = loader.addExtrude(points, bulges, extusion); - /* ѭ1 ƫ+ X,Y,Zֵ */ + /* ѭ����1 ƫ��+ �����X,Y,Z����ֵ */ loader.offset(cycleTag1, Direction3D{point}, point.length()); - /* ѭ2 */ + /* ѭ����2 */ auto leftBottomPoint = Point3D{point.m_x - 1000, point.m_y - 1000, point.m_z + 0.0000000000005}; double length = 2000.0000000000036; double width = 2000.0000000000036; double height = 600; auto cycleTag2 = loader.addBox(leftBottomPoint, length, width, height); - /* ѭ3 */ + /* ѭ����3 */ points.clear(); bulges.clear(); points.push_back(Point3D{-32050.000001122418, -3.8396319723688066e-07, 0.0000000000000000}); @@ -1074,21 +1074,21 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 600.0000000000000}; auto cycleTag3 = loader.addExtrude(points, bulges, extusion); - /* ѭ3 Zƫ -2900 */ + /* ѭ����3 Z��ƫ�� -2900 */ direction = Direction3D{0, 0, 1}; offset = -2900; loader.offset(cycleTag3, direction, offset); - /* ѭ32 */ + /* ѭ����3����2������ */ loader.intersectNode(cycleTag3, cycleTag2); - /* ѭ13 */ + /* ѭ����1����3������ */ loader.intersectNode(cycleTag1, cycleTag3); - /* ѭ11н */ + /* ѭ����1����1�н� */ /* TODO */ - /* ۼ1ѭ1 */ + /* �ۼ���1��ѭ����1������ */ loader.unionNode(subTag1, cycleTag1); }; @@ -1142,16 +1142,16 @@ void loaderTest2() for (auto& point : points) { cycle(point); } // before = loader.getAreaAndVolume(tag1); - /* 1Ϳۼ1 */ + /* ��1�Ϳۼ���1������ */ loader.differentNode(tag1, subTag1); // after = loader.getAreaAndVolume(tag1); - /* ȡ 1 ǰ */ + /* ��ȡ ��1 ����ǰ��� ����� �� ����� */ // areaDifference = after.first - before.first; // volumeDifference = after.second - before.second; // std::cout << areaDifference << ", " << volumeDifference << std::endl; - /* 15Ent1.bool */ + /* ��15��Ent1.bool */ bottomPoint = Point3D{0.0000, 0.0000, -3600.0000}; radius = 32150.0; direction = Direction3D{0, 0, 100}; @@ -1162,10 +1162,10 @@ void loaderTest2() auto tag15_1 = loader.addCylinder(bottomPoint, radius, direction); loader.differentNode(tag15, tag15_1); - /* 115 */ + /* ��1����15������ */ loader.differentNode(tag1, tag15); - /* 16 */ + /* ��16 */ points.clear(); bulges.clear(); points.push_back(Point3D{-2503.6291053659488, 5999.2409883221790, -3500.0000000000000}); @@ -1175,10 +1175,10 @@ void loaderTest2() extusion = Vector3D{-0.0000000000000000, -0.0000000000000000, -100.00000000000000}; auto tag16 = loader.addExtrude(points, bulges, extusion); - /* 116 */ + /* ��1����16������ */ loader.differentNode(tag1, tag16); - /* 17 */ + /* ��17 */ points.clear(); bulges.clear(); points.push_back(Point3D{2079.8334638622341, 5999.2409883221844, 0.0000000000000000}); @@ -1192,15 +1192,15 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 2750.0000000000000}; auto tag17 = loader.addExtrude(points, bulges, extusion); - /* 17 Zƫ -2900 */ + /* ��17 Z��ƫ�� -2900 */ direction = Direction3D{0, 0, 1}; offset = -2900; loader.offset(tag17, direction, offset); - /* 117 */ + /* ��1����17������ */ loader.differentNode(tag1, tag17); - /* 18 */ + /* ��18 */ points.clear(); bulges.clear(); points.push_back(Point3D{-2070.1665441983364, 5999.2409883221844, 0.0000000000000000}); @@ -1214,15 +1214,15 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 2750.0000000000000}; auto tag18 = loader.addExtrude(points, bulges, extusion); - /* 18 Zƫ -2900 */ + /* ��18 Z��ƫ�� -2900 */ direction = Direction3D{0, 0, 1}; offset = -2900; loader.offset(tag18, direction, offset); - /* 118 */ + /* ��1����18������ */ loader.differentNode(tag1, tag18); - /* 19 */ + /* ��19 */ points.clear(); bulges.clear(); points.push_back(Point3D{8760.4644464528919, -16861.795338417785, 0.0000000000000000}); @@ -1236,15 +1236,15 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 2850.0000000000000}; auto tag19 = loader.addExtrude(points, bulges, extusion); - /* 19 Zƫ -2900 */ + /* ��19 Z��ƫ�� -2900 */ direction = Direction3D{0, 0, 1}; offset = -2900; loader.offset(tag19, direction, offset); - /* 119 */ + /* ��1����19������ */ loader.differentNode(tag1, tag19); - /* 20 */ + /* ��20 */ points.clear(); bulges.clear(); points.push_back(Point3D{8472.1973651856952, -23124.378331468590, 0.0000000000000000}); @@ -1258,15 +1258,15 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 2850.0000000000000}; auto tag20 = loader.addExtrude(points, bulges, extusion); - /* 20 Zƫ -2900 */ + /* ��20 Z��ƫ�� -2900 */ direction = Direction3D{0, 0, 1}; offset = -2900; loader.offset(tag20, direction, offset); - /* 120 */ + /* ��1����20������ */ loader.differentNode(tag1, tag20); - /* 21 */ + /* ��21 */ points.clear(); bulges.clear(); points.push_back(Point3D{11234.316117012169, -21717.002618593222, 0.0000000000000000}); @@ -1280,15 +1280,15 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 2850.0000000000000}; auto tag21 = loader.addExtrude(points, bulges, extusion); - /* 21 Zƫ -2900 */ + /* ��21 Z��ƫ�� -2900 */ direction = Direction3D{0, 0, 1}; offset = -2900; loader.offset(tag21, direction, offset); - /* 121 */ + /* ��1����21������ */ loader.differentNode(tag1, tag21); - /* 22 */ + /* ��22 */ points.clear(); bulges.clear(); points.push_back(Point3D{5893.9646280986062, -18064.309214597473, 0.0000000000000000}); @@ -1302,22 +1302,22 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 2850.0000000000000}; auto tag22 = loader.addExtrude(points, bulges, extusion); - /* 22 Zƫ -2900 */ + /* ��22 Z��ƫ�� -2900 */ direction = Direction3D{0, 0, 1}; offset = -2900; loader.offset(tag22, direction, offset); // before = loader.getAreaAndVolume(tag1); - /* 122 */ + /* ��1����22������ */ loader.differentNode(tag1, tag22); // after = loader.getAreaAndVolume(tag1); - /* ȡ1 ǰ */ + /* ��ȡ��1 ����ǰ�������������� */ // areaDifference = after.first - before.first; // volumeDifference = after.second - before.second; // std::cout << areaDifference << ", " << volumeDifference << std::endl; - /* 23 */ + /* ��23 */ points.clear(); bulges.clear(); points.push_back(Point3D{7380.7150904719992, -20706.098050612181, 0.0000000000000000}); @@ -1331,35 +1331,36 @@ void loaderTest2() extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 2850.0000000000000}; auto tag23 = loader.addExtrude(points, bulges, extusion); - /* 23 Zƫ -2900 */ + /* ��23 Z��ƫ�� -2900 */ direction = Direction3D{0, 0, 1}; offset = -2900; loader.offset(tag23, direction, offset); // before = loader.getAreaAndVolume(tag1); - /* 123 */ + /* ��1����23������ */ loader.differentNode(tag1, tag23); // after = loader.getAreaAndVolume(tag1); - /* ȡ1 ǰ */ + /* ��ȡ��1 ����ǰ�������������� */ // areaDifference = after.first - before.first; // volumeDifference = after.second - before.second; // std::cout << areaDifference << ", " << volumeDifference << std::endl; - /* Ϊһѭ͹̶鲻һһ */ + /* ����Ϊһ��ѭ����͹����̶��������鲻һ������������һ�� + */ auto cycle1 = [&loader, tag1](const Point3D& point1, const Point3D point2) { - /* ѭ */ + /* ѭ���� */ const std::vector points = {point1, point2}; std::vector bulges = {0.99999999999999989, 0.99999999999999989}; Vector3D extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 2850.0000000000000}; auto cycleTag = loader.addExtrude(points, bulges, extusion); - /* ѭ Zƫ -2900 */ + /* ѭ���� Z��ƫ�� -2900 */ Direction3D direction = Direction3D{0, 0, 1}; double offset = -2900; loader.offset(cycleTag, direction, offset); - /* 1ѭ岼 */ + /* ��1��ѭ���岼���� */ loader.differentNode(tag1, cycleTag); }; @@ -1529,20 +1530,21 @@ void loaderTest2() points.push_back(Point3D{-22821.612136159150, -11781.067532595984, 0.0000000000000000}); for (size_t i = 0; i < points.size(); i += 2) { cycle1(points[i], points[i + 1]); } - /* Ϊһѭ͹̶鲻һһ */ + /* ����Ϊһ��ѭ����͹����̶��������鲻һ������������һ�� + */ auto cycle2 = [&loader, tag1](const Point3D& point1, const Point3D point2, const Point3D point3, const Point3D point4) { - /* ѭ */ + /* ѭ���� */ const std::vector points = {point1, point2, point3, point4}; std::vector bulges = {0.0000000000000000, 0.0000000000000000, 0.0000000000000000, 0.0000000000000000}; Vector3D extusion = Vector3D{0.0000000000000000, 0.0000000000000000, 2850.0000000000000}; auto cycleTag = loader.addExtrude(points, bulges, extusion); - /* ѭ Zƫ -2900 */ + /* ѭ���� Z��ƫ�� -2900 */ Direction3D direction = Direction3D{0, 0, 1}; double offset = -2900; loader.offset(cycleTag, direction, offset); - /* 1ѭ岼 */ + /* ��1��ѭ���岼���� */ loader.differentNode(tag1, cycleTag); }; @@ -1569,7 +1571,7 @@ void loaderTest2() for (size_t i = 0; i < points.size(); i += 4) { cycle2(points[i], points[i + 1], points[i + 2], points[i + 3]); } // after = loader.getAreaAndVolume(tag1); - /* ȡ1 ǰ */ + /* ��ȡ��1 ����ǰ�������������� */ // areaDifference = after.first - before.first; // volumeDifference = after.second - before.second; // std::cout << areaDifference << ", " << volumeDifference << std::endl; @@ -1605,6 +1607,8 @@ void loaderEntBool() int main(int argc, char** argv) { + std::cout << std::fixed; + // loaderEntBool(); // loaderTest2Simplified(); // loaderTest2();