Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/cli/cli_export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,14 @@ bool importInDocument(DocumentPtr doc, const CliExportArgs& args, Helper* helper
{
auto appModule = AppModule::get();

// If export operation targets some mesh format then force meshing of imported BRep shapes
// If export operation targets some mesh format then force meshing of imported BRep shapes.
// Image export also requires a mesh: GraphicsShapeObjectDriver disables auto-triangulation, so
// without an explicit mesh the BRep shapes have no triangulation to shade and are rendered as
// wireframe only.
bool brepMeshRequired = false;
for (const FilePath& filepath : args.filesToExport) {
const IO::Format format = appModule->ioSystem()->probeFormat(filepath);
brepMeshRequired = IO::formatProvidesMesh(format);
brepMeshRequired = IO::formatProvidesMesh(format) || format == IO::Format_Image;
if (brepMeshRequired)
break; // Interrupt
}
Expand Down
Loading