chore: Add debug logging for sketch face creation
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include <gp_Pln.hxx>
|
||||
|
||||
#include <QJsonArray>
|
||||
#include <QDebug>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user