First attempt at implementation of intersection clash checks.

This considers only protruding clashes. It does not consider touching nor encroaching clashes and does not consider protrusion direction in the protrusion distance.
This commit is contained in:
Dion Moult
2024-02-01 18:30:20 +11:00
parent 7a7fde0a2a
commit e95e16c102
4 changed files with 587 additions and 1 deletions
+8
View File
@@ -106,6 +106,14 @@
return IfcGeom_tree_vector_to_list(ps);
}
aggregate_of_instance::ptr clash_intersection(IfcUtil::IfcBaseClass* e, double tolerance = 0.002) 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);
return IfcGeom_tree_vector_to_list(ps);
}
aggregate_of_instance::ptr select(IfcUtil::IfcBaseClass* e, bool completely_within = false, double extend = 0.0) const {
if (!e->declaration().is("IfcProduct")) {
throw IfcParse::IfcException("Instance should be an IfcProduct");
+1
View File
@@ -206,4 +206,5 @@
namespace std {
%template(float_array_3) array<double, 3>;
%template(vector_float_array_3) vector<array<double, 3>>;
}