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

Generated
+2 -2
View File
@@ -4237,7 +4237,7 @@ dependencies = [
[[package]]
name = "opencadkernel"
version = "0.1.0"
source = "git+https://github.com/HakanSeven12/opencadkernel.git?rev=86497ae#86497ae923b7d9297707aaedb712a8678815a238"
source = "git+https://github.com/ramox81/cadkernel.git?rev=30b3810#30b38101831c454421438acffaa648a53c9d8a2e"
dependencies = [
"cavalier_contours",
"opencadcodec",
@@ -4248,7 +4248,7 @@ dependencies = [
[[package]]
name = "opencadkernel-constraints"
version = "0.1.0"
source = "git+https://github.com/HakanSeven12/opencadkernel.git?rev=86497ae#86497ae923b7d9297707aaedb712a8678815a238"
source = "git+https://github.com/ramox81/cadkernel.git?rev=30b3810#30b38101831c454421438acffaa648a53c9d8a2e"
dependencies = [
"nalgebra",
]
+4
View File
@@ -181,3 +181,7 @@ harness = false
[[test]]
name = "integration"
path = "tests/integration.rs"
[patch."https://github.com/HakanSeven12/opencadkernel.git"]
opencadkernel = { git = "https://github.com/ramox81/cadkernel.git", rev = "30b3810" }
opencadkernel-constraints = { git = "https://github.com/ramox81/cadkernel.git", rev = "30b3810" }
+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();