Forgot to commit some critical bugfixes.

This commit is contained in:
Dion Moult
2024-02-08 16:28:06 +11:00
parent 6caacd6024
commit c90f9c374f
2 changed files with 12 additions and 6 deletions
+8 -2
View File
@@ -633,8 +633,7 @@ namespace IfcGeom {
v_protrusion_point = {v.X(), v.Y(), v.Z()};
v_surface_point = {point_on_b.X(), point_on_b.Y(), point_on_b.Z()};
if (( ! check_all && v_protrusion > tolerance)
|| v_protrusion > (max_protrusion - 1e-3)) {
if ( ! check_all && v_protrusion > tolerance) {
clash_types_.push_back(0);
protrusion_distances_.push_back(v_protrusion);
protrusion_points_.push_back(v_protrusion_point);
@@ -653,6 +652,13 @@ namespace IfcGeom {
protrusion = v_protrusion;
protrusion_point = v_protrusion_point;
surface_point = v_surface_point;
if (protrusion > (max_protrusion - 1e-3)) {
clash_types_.push_back(0);
protrusion_distances_.push_back(protrusion);
protrusion_points_.push_back(protrusion_point);
surface_points_.push_back(surface_point);
return true;
}
}
}
}
+4 -4
View File
@@ -106,11 +106,11 @@
return IfcGeom_tree_vector_to_list(ps);
}
aggregate_of_instance::ptr clash_intersection(IfcUtil::IfcBaseClass* e, double tolerance = 0.002) const {
aggregate_of_instance::ptr clash_intersection(IfcUtil::IfcBaseClass* e, double tolerance = 0.002, bool check_all = true) const {
if (!e->declaration().is("IfcProduct")) {
throw IfcParse::IfcException("Instance should be an IfcProduct");
}
std::vector<IfcUtil::IfcBaseEntity*> ps = $self->clash_intersection((IfcUtil::IfcBaseEntity*)e, tolerance);
std::vector<IfcUtil::IfcBaseEntity*> ps = $self->clash_intersection((IfcUtil::IfcBaseEntity*)e, tolerance, check_all);
return IfcGeom_tree_vector_to_list(ps);
}
@@ -122,11 +122,11 @@
return IfcGeom_tree_vector_to_list(ps);
}
aggregate_of_instance::ptr clash_clearance(IfcUtil::IfcBaseClass* e, double clearance = 0.05) const {
aggregate_of_instance::ptr clash_clearance(IfcUtil::IfcBaseClass* e, double clearance = 0.05, bool check_all = false) const {
if (!e->declaration().is("IfcProduct")) {
throw IfcParse::IfcException("Instance should be an IfcProduct");
}
std::vector<IfcUtil::IfcBaseEntity*> ps = $self->clash_clearance((IfcUtil::IfcBaseEntity*)e, clearance);
std::vector<IfcUtil::IfcBaseEntity*> ps = $self->clash_clearance((IfcUtil::IfcBaseEntity*)e, clearance, check_all);
return IfcGeom_tree_vector_to_list(ps);
}