mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 11:20:21 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user