Add test and input for simple_sweep_2.ifc; extend constructor for sweep_along_curve to support fixed reference swept area solids

Includes `simple_sweep_2.ifc` test input, geometry validations in `test_sweeps.py`, and a new constructor for `sweep_along_curve` to handle directrix-based sweeps.
This commit is contained in:
krande
2025-08-27 12:11:02 +02:00
parent 604e0b0d94
commit d01bf9690d
4 changed files with 86 additions and 2 deletions
@@ -123,9 +123,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFixedReferenceSweptAreaSolid
auto sweep = taxonomy::make<taxonomy::sweep_along_curve>(
matrix, // matrix4::ptr - no transformation needed
profile, // face::ptr - the profile to sweep
nullptr, // item::ptr surface - not used for fixed reference sweep
dir // item::ptr curve - the directrix curve
);
// Set the fixed reference direction for the sweep
+3
View File
@@ -1217,6 +1217,9 @@ typedef item const* ptr;
sweep_along_curve(matrix4::ptr m, face::ptr basis, item::ptr surf, item::ptr crv) : sweep(m, basis), surface(surf), curve(crv) {}
// New constructor for fixed reference swept area solid
sweep_along_curve(matrix4::ptr m, face::ptr profile, item::ptr directrix) : sweep(m, profile), surface(nullptr), curve(directrix) { }
virtual size_t calc_hash() const {
auto v = std::make_tuple(static_cast<size_t>(SWEEP_ALONG_CURVE), matrix->hash_components(), basis->calc_hash(), surface->calc_hash(), curve->calc_hash());
return boost::hash<decltype(v)>{}(v);