SWEEP: base point from the path; kernel sweep validity and placement fixes

A single profile's base point comes from the path it is swept along: a
path leaving the profile's plane from inside the profile sweeps it where
it stands. Kernel 30b3810: pcurves in the edge's parameterisation (valid
spline-faced sweeps), corner crossings fitted to the modeller's
resolution, run faces through stations evenly spaced along the run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-08 12:17:00 +03:00
1 parent 018ac455cb
commit 6aced3ac7e
3 files changed
+13 -5

No files matched your search

+7 -3
View File
@@ -167,7 +167,11 @@ pub fn sweep_selection_options(profiles: &[EntityType], mut options: SweepOption
}
// Spatial profiles keep their own anchor.
let profiles = profiles.iter().filter(|profile| spatial_profile(profile).is_none()).collect::<Vec<_>>();
if profiles.is_empty() {
// A single profile takes its base from the path it is swept along
// (`sweep_record`).
// ponytail: several profiles share the group anchor even when the path
// starts inside one of them; the reference rule for that case is unmeasured.
if profiles.len() < 2 {
return Some(options);
}
let geometry = profiles.iter().map(|profile| {
@@ -229,10 +233,10 @@ pub fn sweep_record(profile: &EntityType, path: &EntityType, options: SweepOptio
return Some(record);
}
let (sweep_entity, sweep_entity_transform) = embedded_sweep_profile(profile)?;
let (plane, wires, _) = kernel::acis::sweep_profile_geometry(&sweep_entity, sweep_entity_transform).ok()?;
kernel::acis::sweep_profile_geometry(&sweep_entity, sweep_entity_transform).ok()?;
let base_point = match options.base_point {
Some(point) => point.to_array(),
None => kernel::brep::sweep_profile_base(plane, &wires)?,
None => kernel::acis::sweep_default_base(&sweep_entity, sweep_entity_transform, &embedded_sweep_path(path)?).ok()?,
};
let mut base = SolidHistoryNodeBase::new(1);
base.transform = glam::DMat4::IDENTITY.to_cols_array();