mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
works fine
This commit is contained in:
@@ -637,7 +637,8 @@ int main(int argc, char** argv) {
|
||||
XML = IfcUtil::path::from_utf8(".xml"),
|
||||
CITY_JSON = IfcUtil::path::from_utf8(".cityjson"),
|
||||
IFC = IfcUtil::path::from_utf8(".ifc"),
|
||||
USD = IfcUtil::path::from_utf8(".usd");
|
||||
USD = IfcUtil::path::from_utf8(".usd"),
|
||||
USDA = IfcUtil::path::from_utf8(".usda");
|
||||
|
||||
// @todo clean up serializer selection
|
||||
// @todo detect program options that conflict with the chosen serializer
|
||||
@@ -830,8 +831,8 @@ int main(int argc, char** argv) {
|
||||
serializer = boost::make_shared<GltfSerializer>(IfcUtil::path::to_utf8(output_temp_filename), geometry_settings, serializer_settings);
|
||||
#endif
|
||||
#ifdef WITH_USD
|
||||
} else if (output_extension == USD) {
|
||||
serializer = boost::make_shared<USDSerializer>(IfcUtil::path::to_utf8(output_temp_filename), settings);
|
||||
} else if (output_extension == USD || output_extension == USDA) {
|
||||
serializer = boost::make_shared<USDSerializer>(IfcUtil::path::to_utf8(output_filename), settings);
|
||||
#endif
|
||||
#ifdef IFOPSH_WITH_OPENCASCADE
|
||||
} else if (output_extension == STP) {
|
||||
@@ -1171,9 +1172,11 @@ int main(int argc, char** argv) {
|
||||
|
||||
Logger::Message(Logger::LOG_PERF, "done file geometry conversion");
|
||||
|
||||
|
||||
// Renaming might fail (e.g. maybe the existing file was open in a viewer application)
|
||||
// Do not remove the temp file as user can salvage the conversion result from it.
|
||||
bool successful = IfcUtil::path::rename_file(IfcUtil::path::to_utf8(output_temp_filename), IfcUtil::path::to_utf8(output_filename));
|
||||
bool successful = IfcUtil::path::rename_file(IfcUtil::path::to_utf8(output_temp_filename), IfcUtil::path::to_utf8(output_filename))
|
||||
|| output_extension == USD || output_extension == USDA;
|
||||
if (!successful) {
|
||||
cerr_ << "Unable to write output file '" << output_filename << "', see '" <<
|
||||
output_temp_filename << "' for the conversion result.";
|
||||
|
||||
Reference in New Issue
Block a user