mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
--force-space-transparency option in IfcConvert
This commit is contained in:
@@ -197,7 +197,7 @@ int main(int argc, char** argv) {
|
||||
typedef char char_t;
|
||||
#endif
|
||||
|
||||
double deflection_tolerance, angular_tolerance;
|
||||
double deflection_tolerance, angular_tolerance, force_space_transparency;
|
||||
inclusion_filter include_filter;
|
||||
inclusion_traverse_filter include_traverse_filter;
|
||||
exclusion_filter exclude_filter;
|
||||
@@ -326,6 +326,8 @@ int main(int argc, char** argv) {
|
||||
"model in other modelling application in any case.")
|
||||
("deflection-tolerance", po::value<double>(&deflection_tolerance)->default_value(1e-3),
|
||||
"Sets the deflection tolerance of the mesher, 1e-3 by default if not specified.")
|
||||
("force-space-transparency", po::value<double>(&force_space_transparency),
|
||||
"Overrides transparency of spaces in geometry output.")
|
||||
("angular-tolerance", po::value<double>(&angular_tolerance)->default_value(0.5),
|
||||
"Sets the angular tolerance of the mesher in radians 0.5 by default if not specified.")
|
||||
("generate-uvs",
|
||||
@@ -718,6 +720,10 @@ int main(int argc, char** argv) {
|
||||
settings.set_angular_tolerance(angular_tolerance);
|
||||
settings.precision = precision;
|
||||
|
||||
if (vmap.count("force-space-transparency")) {
|
||||
settings.force_space_transparency(force_space_transparency);
|
||||
}
|
||||
|
||||
boost::shared_ptr<GeometrySerializer> serializer; /**< @todo use std::unique_ptr when possible */
|
||||
if (output_extension == OBJ) {
|
||||
// Do not use temp file for MTL as it's such a small file.
|
||||
|
||||
@@ -108,6 +108,7 @@ namespace IfcGeom
|
||||
/// Note that this is independent of the IFC length unit, one millimeter by default.
|
||||
double deflection_tolerance() const { return deflection_tolerance_; }
|
||||
double angular_tolerance() const { return angular_tolerance_; }
|
||||
double force_space_transparency() const { return force_space_transparency_; }
|
||||
|
||||
void set_deflection_tolerance(double value)
|
||||
{
|
||||
@@ -124,6 +125,10 @@ namespace IfcGeom
|
||||
angular_tolerance_ = value;
|
||||
}
|
||||
|
||||
void force_space_transparency(double value) {
|
||||
force_space_transparency_ = value;
|
||||
}
|
||||
|
||||
/// Get boolean value for a single settings or for a combination of settings.
|
||||
bool get(SettingField setting) const
|
||||
{
|
||||
@@ -149,7 +154,7 @@ namespace IfcGeom
|
||||
|
||||
protected:
|
||||
SettingField settings_;
|
||||
double deflection_tolerance_, angular_tolerance_;
|
||||
double deflection_tolerance_, angular_tolerance_, force_space_transparency_;
|
||||
};
|
||||
|
||||
class IFC_GEOM_API ElementSettings : public IteratorSettings
|
||||
|
||||
Reference in New Issue
Block a user