mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Make API more consistent
This commit is contained in:
committed by
Thomas Krijnen
parent
9c1660a84b
commit
e39835d25e
@@ -499,7 +499,7 @@ int main(int argc, char** argv)
|
||||
|
||||
if (!default_material_filename.empty()) {
|
||||
try {
|
||||
IfcGeom::set_default_style(default_material_filename);
|
||||
IfcGeom::set_default_style_file(default_material_filename);
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "[Error] Could not read default material file " << default_material_filename << ":" << std::endl;
|
||||
std::cerr << e.what() << std::endl;
|
||||
|
||||
@@ -195,7 +195,7 @@ boost::optional<IfcGeom::SurfaceStyle::ColorComponent> read_colour_component(con
|
||||
return IfcGeom::SurfaceStyle::ColorComponent(rgb[0], rgb[1], rgb[2]);
|
||||
}
|
||||
|
||||
void IfcGeom::set_default_style(const std::string& json_file) {
|
||||
void IfcGeom::set_default_style_file(const std::string& json_file) {
|
||||
if (!default_materials_initialized) InitDefaultMaterials();
|
||||
default_materials.clear();
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace IfcGeom {
|
||||
};
|
||||
|
||||
IFC_GEOM_API const SurfaceStyle* get_default_style(const std::string& ifc_type);
|
||||
IFC_GEOM_API void set_default_style(const std::string& json_file);
|
||||
IFC_GEOM_API void set_default_style_file(const std::string& json_file);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user