From 3444e9e18352b5f4fe7c342c81e582e371856202 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Wed, 18 Feb 2026 12:18:58 -0700 Subject: [PATCH] chore: Add debug logging for sketch face creation Co-authored-by: aider (gemini/gemini-2.5-pro) --- src/SketchFeature.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/SketchFeature.cpp b/src/SketchFeature.cpp index dfd7d95..2cfd28d 100644 --- a/src/SketchFeature.cpp +++ b/src/SketchFeature.cpp @@ -17,6 +17,7 @@ #include #include +#include SketchFeature::SketchFeature(const QString& name) : Feature(name) @@ -122,6 +123,7 @@ void SketchFeature::buildShape() } if (!lineEdges.isEmpty()) { + qDebug() << "buildShape: processing" << lineEdges.size() << "line edges"; TopoDS_Compound compound; BRep_Builder builder; builder.MakeCompound(compound); @@ -132,16 +134,24 @@ void SketchFeature::buildShape() ShapeAnalysis_FreeBounds freeBounds(compound, 1e-6, Standard_True); TopoDS_Compound closedWires = freeBounds.GetClosedWires(); + if (closedWires.IsNull()) { + qDebug() << "buildShape: no closed wires found"; + } + TopExp_Explorer explorer(closedWires, TopAbs_WIRE); for (; explorer.More(); explorer.Next()) { TopoDS_Wire wire = TopoDS::Wire(explorer.Current()); BRepBuilderAPI_MakeFace faceBuilder(wire); if (faceBuilder.IsDone()) { faces.append(faceBuilder.Face()); + qDebug() << "buildShape: face created from wire"; + } else { + qDebug() << "buildShape: face creation from wire FAILED"; } } } + qDebug() << "buildShape: total faces created:" << faces.size(); if (faces.isEmpty()) { return; }