@@ -366,8 +366,7 @@ namespace fuzzybools
366
366
367
367
bool IsEqualTo (const Vec3& n, double d)
368
368
{
369
- return (equals (normal, n, toleranceVectorEquality) && equals (distance, d, toleranceScalarEquality)) ||
370
- (equals (normal, -n, toleranceVectorEquality) && equals (distance, -d, toleranceScalarEquality));
369
+ return (equals (normal, n, toleranceVectorEquality) && equals (distance, d, toleranceScalarEquality));
371
370
}
372
371
373
372
// ============================================================================================
@@ -901,6 +900,19 @@ namespace fuzzybools
901
900
continue ;
902
901
}
903
902
903
+ if (isA)
904
+ {
905
+ #ifdef CSG_DEBUG_OUTPUT
906
+ DumpGeometry (geom, L" Initial_A.obj" );
907
+ #endif
908
+ }
909
+ else
910
+ {
911
+ #ifdef CSG_DEBUG_OUTPUT
912
+ DumpGeometry (geom, L" Initial_B.obj" );
913
+ #endif
914
+ }
915
+
904
916
auto a = geom.GetPoint (f.i0 );
905
917
auto b = geom.GetPoint (f.i1 );
906
918
auto c = geom.GetPoint (f.i2 );
@@ -1196,6 +1208,7 @@ namespace fuzzybools
1196
1208
// auto contourLoop = FindLargestEdgeLoop(projectedPoints, edges);
1197
1209
1198
1210
#ifdef CSG_DEBUG_OUTPUT
1211
+ std::vector<std::vector<glm::dvec2>> edges3DTriangles;
1199
1212
std::set<std::pair<size_t , size_t >> edgesTriangles;
1200
1213
std::set<std::pair<size_t , size_t >> finalEdgesTriangles;
1201
1214
#endif
@@ -1249,6 +1262,13 @@ namespace fuzzybools
1249
1262
// TODO: why is this swapped? winding doesnt matter much, but still
1250
1263
geom.AddFace (ptB, ptA, ptC);
1251
1264
1265
+ #ifdef CSG_DEBUG_OUTPUT
1266
+ edges3DTriangles.push_back ({ glm::dvec2 (ptA.z + ptA.x /2 , ptA.y + ptA.x /2 ), glm::dvec2 (ptB.z + ptB.x /2 , ptB.y + ptB.x /2 ) });
1267
+ edges3DTriangles.push_back ({ glm::dvec2 (ptA.z + ptA.x /2 , ptA.y + ptA.x /2 ), glm::dvec2 (ptC.z + ptC.x /2 , ptC.y + ptC.x /2 ) });
1268
+ edges3DTriangles.push_back ({ glm::dvec2 (ptB.z + ptB.x /2 , ptB.y + ptB.x /2 ), glm::dvec2 (ptC.z + ptC.x /2 , ptC.y + ptC.x /2 ) });
1269
+ DumpSVGLines (edges3DTriangles, L" edges_tri.html" );
1270
+ #endif
1271
+
1252
1272
#ifdef CSG_DEBUG_OUTPUT
1253
1273
finalEdgesTriangles.insert (std::make_pair (tri.vertices [0 ], tri.vertices [1 ]));
1254
1274
finalEdgesTriangles.insert (std::make_pair (tri.vertices [1 ], tri.vertices [2 ]));
0 commit comments