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