mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-06 12:26:26 +00:00
#4130 setOnlyValid() option that skips and logs invalid topology
This commit is contained in:
@@ -729,6 +729,10 @@ void SvgSerializer::write(const IfcGeom::BRepElement* brep_obj) {
|
||||
compound_local = comp2;
|
||||
}
|
||||
|
||||
if (only_valid_ && !IfcGeom::util::validate_shape(compound_local)) {
|
||||
return;
|
||||
}
|
||||
|
||||
geometry_data data{ compound_local, dash_arrays, trsf, brep_obj->product(), storey, elev, brep_obj->name(), nameElement(storey, brep_obj) };
|
||||
|
||||
if (auto_section_ || auto_elevation_ || section_ref_ || elevation_ref_ || elevation_ref_guid_ || deferred_section_data_) {
|
||||
|
||||
@@ -550,6 +550,7 @@ protected:
|
||||
bool unify_inputs_;
|
||||
bool mirror_y_;
|
||||
bool mirror_x_;
|
||||
bool only_valid_;
|
||||
|
||||
int profile_threshold_;
|
||||
|
||||
@@ -717,6 +718,14 @@ public:
|
||||
return unify_inputs_;
|
||||
}
|
||||
|
||||
void setOnlyValid(bool b) {
|
||||
only_valid_ = b;
|
||||
}
|
||||
|
||||
bool getOnlyValid(bool b) const {
|
||||
return only_valid_;
|
||||
}
|
||||
|
||||
void setScale(double s) { scale_ = s; }
|
||||
void setDrawingCenter(double x, double y) {
|
||||
center_x_ = x; center_y_ = y;
|
||||
|
||||
Reference in New Issue
Block a user