There is a habit you pick up after a few years in SolidWorks: if a part needs to become a DXF for laser cutting, you Convert to Sheet Metal. It is the path of least resistance. The Flatten button is right there. The flat pattern drops into the feature tree. Export DXF and move on.
For parts with actual bends, this is correct. For flat parts — gears, brackets, plates, gussets, gasket profiles — it is the wrong default, and on patterned bodies it can turn a sub-second rebuild into a ten-second rebuild. This post explains what the sheet metal feature stack actually costs you, why circular and linear patterns amplify the cost, and when to stop reaching for Convert to Sheet Metal at all.
What Convert to Sheet Metal actually adds to your feature tree
When you run Insert → Sheet Metal → Convert to Sheet Metal, SolidWorks inserts two new features into the tree: a Sheet-Metal feature that holds thickness, default bend radius, default K-factor, and the fixed face reference; and a Flat-Pattern sub-feature that holds the list of bends SolidWorks detected and the cached flat geometry.
Decompiling SolidWorks.Interop.sldworks.dll with ILSpy shows the ISheetMetalFeatureData interface exposes OverrideDefaultParameter, UseGaugeTable, BendAllowanceType, KFactor, and FixedFace. The IFlatPatternFeatureData interface exposes FixedEntity, MergeCoincidentFaces, SimplifyBends, and the flat pattern body itself via GetFlatBody().
Those interfaces sound inert — they are just property bags. The cost lives one level below them, in the rebuild logic that runs every time the feature tree regenerates past the sheet metal feature.
What the flatten operation actually does on rebuild
On every rebuild, SolidWorks has to reconcile three things for a sheet metal body:
- The folded body as defined by the parent features
- The bend definitions (angle, radius, K-factor, neutral axis)
- The flat body geometry, which it caches until invalidated
For a body with real bends, the flatten step is unavoidable — the bend table has to be resolved against the current geometry and the flat body regenerated if anything upstream moved. For a body with zero bends, the flatten step still runs. It scans the body for cylindrical and conical faces tangent to planar faces (the bend-detection heuristic), finds none, and returns the same body. That work is wasted.
You can see this explicitly by watching the performance evaluation report (Tools → Evaluate → Performance Evaluation, or via the API ISwMetaDocsUtility counters). The Flat-Pattern1 entry will show a nonzero rebuild time even on a flat body.
FreeCAD’s own sheet metal workbench, which is open source and available at src/Mod/SheetMetal, shows the same algorithmic shape in clearer form. The smUnfold.py entry point enumerates every face and edge, classifies each edge as fold/coincident/straight, builds the unfold graph, and only then attempts the flatten. If there are no fold edges, the graph is trivial but the classification pass still iterates every face and edge on the body. The cost is linear in topology, not in bend count.
Why patterns amplify the cost
This is where the gear case bites. A 20-tooth gear modeled as an extruded sketch with a circular pattern of a tooth cut is cheap to rebuild as a solid — one extrude, one cut, one pattern. Rebuild time is dominated by the pattern’s transform-and-boolean step, typically well under a second for any reasonable tooth profile.
Once Convert to Sheet Metal is applied, the feature tree now looks like this:
Extrude1 (disk)
CircularPattern1 (20 tooth cuts)
Sheet-Metal1
Flat-Pattern1
Each rebuild now also runs the flatten step on the post-pattern body. The flatten step’s face-classification pass is linear in the face count, and the patterned body has 20× the face count of the pre-pattern body. The 20 tooth cuts each produced new side faces. The flatten pass iterates all of them on every rebuild, classifying each one as “not part of a bend.”
In the r/SolidWorks thread where this came up, rebuild time for a patterned gear jumped from under a second to roughly 10 seconds after Convert to Sheet Metal. That is not a SolidWorks bug. It is exactly what the flatten pipeline is supposed to do — it just has nothing useful to do on this body. We have seen similar spikes on perforated plates, honeycomb gaskets, and any part where a dense linear or circular pattern sits above a sheet metal feature.
You can verify the pattern-amplification effect yourself: model a flat plate with no pattern, Convert to Sheet Metal, and watch rebuild time. Then add a circular pattern of 100 holes above the sheet metal feature. Rebuild time climbs visibly, even though the pattern is a pure cut and contributes no bends.
What to do instead: export DXF directly from the face
If the part is flat and has no bends, skip sheet metal. Export DXF from the planar face directly. There are three ways to do this, and they produce identical output:
From the UI: Open the part, right-click the planar face, select Export to DXF/DWG. The face geometry is written as a 2D profile at the face’s local frame.
From a drawing: Place a view of the part in a drawing, save the drawing as DXF. This goes through the 2D projection pipeline and gives you the same result.
From the API: Call IPartDoc.ExportToDWG2 with sOutputType = swExportToDWG_ExportSelectedFaceWireFrame (0) or swExportToDWG_ExportSelectedFace (1), passing the face as the selected entity. The full signature from SolidWorks.Interop.sldworks:
bool IPartDoc.ExportToDWG2(
string FileName,
string SourceFile,
int sOutputType, // 0 = face wireframe, 1 = face, 2 = sheet metal flat pattern
bool bSheetmetalOption,
object Alignment,
bool bTrimEntities,
bool bExportHiddenEdges,
int sHiddenEdgesColor,
int sOutput
);
Decompiling SolidWorks.Interop.sldworks.dll reveals that ExportToDWG2 branches internally on sOutputType: when the flag is swExportToDWG_ExportSelectedFace the method walks the face’s loop edges and emits them directly, bypassing the sheet metal pipeline entirely. When the flag is swExportToDWG_SheetMetal the method calls into the flat pattern cache. The first path does no bend analysis and no flatten work. For a gear, it is effectively free.
One gotcha: the face’s local frame controls orientation. If you want the DXF axes to match the model’s XY plane, pick a face whose normal is aligned with Z. We covered the alignment array semantics in detail in how SolidWorks creates flat patterns — the same rules apply to the face-export path.
The rule we use
The question to ask before running Convert to Sheet Metal is simple: does this part have bends I need to flatten? Not is this part going to be laser-cut — that is a manufacturing question that DXF export answers regardless of sheet metal status.
Parts that need sheet metal:
- Anything with press-brake bends, hems, or jogs
- Parts where K-factor affects developed length
- Assemblies that rely on Flat-Pattern folder state for drawing views or BOM entries
Parts that do not need sheet metal:
- Flat laser-cut gears, sprockets, cams
- Gaskets, shims, washers with complex perimeters
- Perforated plates and screens
- Gussets and brackets cut from plate with no bends
- Any 2D profile extruded once with no out-of-plane features
For the second list, stay as a solid body, export DXF from the face, and you keep rebuild time proportional to model complexity instead of model complexity × sheet metal overhead.
What this means for batch export
The face-export path has a second benefit: it works on bodies that would not convert cleanly to sheet metal at all. Multibody parts, imported STEP solids with non-parametric faces, parts with conical or cylindrical regions that would confuse the bend-detection heuristic — all of them can still produce a clean DXF from the flat face.
This is how CadShift’s batch DXF export handles mixed input. When the add-in walks an assembly and finds a body, it checks for sheet metal features first. If a flat pattern exists, it uses the flat pattern path. If the body has a planar face wider than a configurable threshold and no sheet metal features, it falls back to direct face export. No Convert to Sheet Metal. No flatten overhead. Same DXF output for the laser cutter.
The distinction matters most on parts you rebuild often during design. A gear you iterate on fifty times during tooth-profile tuning is fifty extra flatten passes if you converted it to sheet metal out of habit. At 10 seconds each, that is eight minutes of waiting for nothing. Stay as a solid and you save that time.
The API reality check
If you are automating this in a macro or add-in, the rule translates directly into code:
ModelDoc2 model = swApp.ActiveDoc as ModelDoc2;
PartDoc part = model as PartDoc;
bool isSheetMetal = part.GetBodies2((int)swBodyType_e.swSolidBody, true)
.Cast<Body2>()
.Any(b => b.IsSheetMetal());
if (isSheetMetal)
{
// Use sheet metal export path
part.ExportToDWG2(outputPath, model.GetPathName(),
(int)swExportToDWG_e.swExportToDWG_ExportSheetMetal,
true, null, false, false, 0, 0);
}
else
{
// Select a planar face and use the face export path
Face2 face = GetLargestPlanarFace(part);
SelectFace(model, face);
part.ExportToDWG2(outputPath, model.GetPathName(),
(int)swExportToDWG_e.swExportToDWG_ExportSelectedFace,
false, null, false, false, 0, 0);
}
Body2.IsSheetMetal returns true only if the body has a Sheet-Metal feature actively in its history. A flat solid body that could theoretically be made sheet metal returns false. That is the right signal: if the body is not sheet metal, do not treat it as if it were.
The takeaway
Convert to Sheet Metal is a tool for parts that need bend management. On a flat body with no bends, the flatten feature runs on every rebuild, classifies every face, and produces the same geometry it started with. On patterned bodies the face count grows with the pattern count, and so does the wasted work.
If your DXF workflow is the only reason you reach for sheet metal, skip it. Export from the face, keep rebuild time linear in actual model complexity, and let the sheet metal features do their job on the parts that actually have bends. For the rest, a batch export that knows the difference is faster and less fragile than forcing every flat part through the sheet metal pipeline.