Refactor test_sweeps.py: remove _is_swept_shape, restructure test directories, update test fixtures, and adjust assertions for geometry validation. Extend sweep_along_curve constructor to support fixed reference direction.

This commit is contained in:
krande
2025-08-27 19:37:47 +02:00
parent 9dd7b488d6
commit 1cd32be2fc
7 changed files with 168 additions and 268 deletions
@@ -123,11 +123,8 @@ 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
dir // item::ptr curve - the directrix curve
);
// Set the fixed reference direction for the sweep
sweep->direction = ref; // The fixed reference direction
dir, // item::ptr curve - the directrix curve
ref);
return sweep;
}
+2 -2
View File
@@ -1215,10 +1215,10 @@ typedef item const* ptr;
virtual sweep_along_curve* clone_() const { return new sweep_along_curve(*this); }
virtual kinds kind() const { return SWEEP_ALONG_CURVE; }
sweep_along_curve(matrix4::ptr m, face::ptr basis, item::ptr surf, item::ptr crv) : sweep(m, basis), surface(surf), curve(crv) {}
sweep_along_curve(matrix4::ptr m, face::ptr basis, item::ptr surf, item::ptr crv) : sweep(m, basis), surface(surf), curve(crv), direction(nullptr) {}
// 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) { }
sweep_along_curve(matrix4::ptr m, face::ptr profile, item::ptr directrix, direction3::ptr ref) : sweep(m, profile), surface(nullptr), curve(directrix), direction(ref) { }
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());