mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 13:52:23 +00:00
Fix errors after merge
This commit is contained in:
@@ -99,7 +99,7 @@ void print_usage(bool suggest_help = true)
|
|||||||
<< " .svg SVG Scalable Vector Graphics (2D floor plan)\n"
|
<< " .svg SVG Scalable Vector Graphics (2D floor plan)\n"
|
||||||
<< " .ifc IFC-SPF Industry Foundation Classes\n"
|
<< " .ifc IFC-SPF Industry Foundation Classes\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "If no output filename given, <input>." + IfcUtil::path::from_utf8(DEFAULT_EXTENSION) + " will be used as the output file.\n";
|
<< "If no output filename given, <input>." << IfcUtil::path::from_utf8(DEFAULT_EXTENSION) << " will be used as the output file.\n";
|
||||||
if (suggest_help) {
|
if (suggest_help) {
|
||||||
cout_ << "\nRun 'IfcConvert --help' for more information.";
|
cout_ << "\nRun 'IfcConvert --help' for more information.";
|
||||||
}
|
}
|
||||||
@@ -209,15 +209,6 @@ int main(int argc, char** argv) {
|
|||||||
#endif
|
#endif
|
||||||
("input-file", new po::typed_value<path_t, char_t>(0), "input IFC file")
|
("input-file", new po::typed_value<path_t, char_t>(0), "input IFC file")
|
||||||
("output-file", new po::typed_value<path_t, char_t>(0), "output geometry file");
|
("output-file", new po::typed_value<path_t, char_t>(0), "output geometry file");
|
||||||
|
|
||||||
|
|
||||||
double deflection_tolerance;
|
|
||||||
inclusion_filter include_filter;
|
|
||||||
inclusion_traverse_filter include_traverse_filter;
|
|
||||||
exclusion_filter exclude_filter;
|
|
||||||
exclusion_traverse_filter exclude_traverse_filter;
|
|
||||||
std::string filter_filename;
|
|
||||||
std::string default_material_filename;
|
|
||||||
|
|
||||||
po::options_description ifc_options("IFC options");
|
po::options_description ifc_options("IFC options");
|
||||||
ifc_options.add_options()
|
ifc_options.add_options()
|
||||||
@@ -531,7 +522,7 @@ int main(int argc, char** argv) {
|
|||||||
STP = IfcUtil::path::from_utf8(".stp"),
|
STP = IfcUtil::path::from_utf8(".stp"),
|
||||||
IGS = IfcUtil::path::from_utf8(".igs"),
|
IGS = IfcUtil::path::from_utf8(".igs"),
|
||||||
SVG = IfcUtil::path::from_utf8(".svg"),
|
SVG = IfcUtil::path::from_utf8(".svg"),
|
||||||
XML = IfcUtil::path::from_utf8(".xml");
|
XML = IfcUtil::path::from_utf8(".xml"),
|
||||||
IFC = IfcUtil::path::from_utf8(".ifc");
|
IFC = IfcUtil::path::from_utf8(".ifc");
|
||||||
|
|
||||||
// @todo clean up serializer selection
|
// @todo clean up serializer selection
|
||||||
@@ -559,7 +550,7 @@ int main(int argc, char** argv) {
|
|||||||
} else if (output_extension == IFC) {
|
} else if (output_extension == IFC) {
|
||||||
int exit_code = EXIT_FAILURE;
|
int exit_code = EXIT_FAILURE;
|
||||||
try {
|
try {
|
||||||
if (init_input_file(input_filename, ifc_file, no_progress || quiet, mmap)) {
|
if (init_input_file(IfcUtil::path::to_utf8(input_filename), ifc_file, no_progress || quiet, mmap)) {
|
||||||
time_t start, end;
|
time_t start, end;
|
||||||
time(&start);
|
time(&start);
|
||||||
std::ofstream fs(output_filename.c_str());
|
std::ofstream fs(output_filename.c_str());
|
||||||
|
|||||||
@@ -49,12 +49,12 @@ namespace {
|
|||||||
void plain_text_message(T& os, const boost::optional<IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
|
void plain_text_message(T& os, const boost::optional<IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
|
||||||
os << "[" << severity_strings<typename T::char_type>::value[type] << "] ";
|
os << "[" << severity_strings<typename T::char_type>::value[type] << "] ";
|
||||||
if (current_product) {
|
if (current_product) {
|
||||||
std::string global_id = *(**current_product).get("GlobalId"));
|
std::string global_id = *((IfcUtil::IfcBaseEntity*)*current_product)->get("GlobalId");
|
||||||
os << "{" << global_id.c_str() << "} ";
|
os << "{" << global_id.c_str() << "} ";
|
||||||
}
|
}
|
||||||
os << message.c_str() << std::endl;
|
os << message.c_str() << std::endl;
|
||||||
if (instance) {
|
if (instance) {
|
||||||
std::string instance_string = entity->data().toString();
|
std::string instance_string = instance->data().toString();
|
||||||
if (instance_string.size() > 259) {
|
if (instance_string.size() > 259) {
|
||||||
instance_string = instance_string.substr(0, 256) + "...";
|
instance_string = instance_string.substr(0, 256) + "...";
|
||||||
}
|
}
|
||||||
@@ -113,18 +113,6 @@ void Logger::SetOutput(std::wostream* l1, std::wostream* l2) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
void Logger::log(T& log2, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
|
|
||||||
log2 << "[" << severity_strings<typename T::char_type>::value[type] << "] ";
|
|
||||||
if (current_product) {
|
|
||||||
log2 << "{" << (*current_product)->GlobalId().c_str() << "} ";
|
|
||||||
}
|
|
||||||
log2 << message.c_str() << std::endl;
|
|
||||||
if (instance) {
|
|
||||||
log2 << instance->data().toString().c_str() << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Logger::Message(Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
|
void Logger::Message(Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
|
||||||
if ((log2 || wlog2) && type >= verbosity) {
|
if ((log2 || wlog2) && type >= verbosity) {
|
||||||
if (format == FMT_PLAIN) {
|
if (format == FMT_PLAIN) {
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ private:
|
|||||||
static Format format;
|
static Format format;
|
||||||
static boost::optional<IfcUtil::IfcBaseClass*> current_product;
|
static boost::optional<IfcUtil::IfcBaseClass*> current_product;
|
||||||
static Severity max_severity;
|
static Severity max_severity;
|
||||||
static boost::optional<IfcSchema::IfcProduct*> current_product;
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static void log(T& log2, Logger::Severity type, const std::string& message, IfcUtil::IfcBaseClass* instance);
|
|
||||||
public:
|
public:
|
||||||
static void SetProduct(boost::optional<IfcUtil::IfcBaseClass*> product);
|
static void SetProduct(boost::optional<IfcUtil::IfcBaseClass*> product);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user