Extrude/revolve "all profiles" means the drawn ones: auto-projected face edges only count when the drawn curves make no profile
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
9301bc4210
commit
f5c2c725c8
5 files changed
+44
-25
No files matched your search
@@ -16,7 +16,7 @@ mod solver;
|
||||
|
||||
pub use link::{Link, LinkGeom, LinkKind, LinkSource, MAX_LINK_ENTITIES};
|
||||
pub use model::{Constraint, ConstraintKind, Curve, CurveKind, SPoint, Sketch, SketchError};
|
||||
pub use profiles::{Profile, find_profiles, merge_regions};
|
||||
pub use profiles::{Profile, find_drawn_profiles, find_profiles, merge_regions};
|
||||
pub use solver::{SolveReport, SolveStatus, solve};
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -178,6 +178,20 @@ fn curvature(s: &Seg2) -> f64 {
|
||||
|
||||
/// Find all closed profiles of a sketch. Curves are split where other curves end on them or
|
||||
/// cross them, like a drawing would be read.
|
||||
/// Profiles of the drawn geometry only (linked reference curves left out).
|
||||
pub fn find_drawn_profiles(sk: &Sketch) -> Vec<Profile> {
|
||||
if sk.links.is_empty() {
|
||||
return find_profiles(sk);
|
||||
}
|
||||
let mut d = sk.clone();
|
||||
for c in &mut d.curves {
|
||||
if c.link.is_some() {
|
||||
c.construction = true;
|
||||
}
|
||||
}
|
||||
find_profiles(&d)
|
||||
}
|
||||
|
||||
pub fn find_profiles(sk: &Sketch) -> Vec<Profile> {
|
||||
let tol = MERGE_TOL * 10.0;
|
||||
// Analytic shapes of the profile curves.
|
||||
|
||||
Reference in new issue
Block a user