pub enum SectionPlacement {
Transplant,
Rigid,
}Expand description
HOW a section is placed at each station — the two things “sweep a profile along a path” can mean, and the reason they are not the same shape.
Transplant MOVES the profile onto the path: the anchor origin lands on the
station point and the profile plane becomes the station’s NORMAL plane. The
profile’s own position and its angle to the path are both discarded — every
sweep comes out centred on the path and square to it. That is the classic
swept-surface reading, and it is what SWP builds.
Rigid CARRIES the profile: the section at station k is the profile moved
by the same rigid motion the PATH undergoes between its start and station
k,
section_k(x) = P_k + R_k · (x − P_0)where R_k is the rotation taking the start frame (T_0, r_0, s_0) to the
station’s (T_k, r_k, s_k). The profile keeps its drawn POSITION and its
drawn ANGLE to the path; what changes along the sweep is only what the path
itself does. Two consequences are the whole point of the mode:
- a STRAIGHT path makes every
R_kthe identity, so the section merely translates and the result is the oblique prismextrude_profile_brepbuilds from the same profile and vector —pathAlignandtranslateagree on a straight path rather than merely having the same volume; - a circular ARC makes
R_kthe rotation about the ARC’S OWN CENTRE AXIS (for a planar path the RMF’s transport rotation IS that rotation), so the profile is carried round the pivot and the end cap arrives at the angle the start cap had to the tangent. A full-circle path degenerates to exactly a revolve of the profile about that axis; - a HELIX makes
R_kthe SCREW about the helix’s own axis — but only when the path says it is one (SweepPath::screw_axes), because the frame that realizes it is not the RMF. A helix is carried into itself by the screw, which spins the tangent frame at the helix’s torsion; the RMF has no spin about the tangent by construction, so it rolls away from the screw by∫τ ds(169.75° over three turns of a radius-5, pitch-5 coil). A helix segment’s stations are therefore framed off its axis (screw_reference), and every other segment keeps the RMF — which on a chain of lines and arcs in ANY planes is still exactly each arc’s turn about its own centre, composed. The two hand over at a joint without a roll.
Why not one frame for every curve: the Frenet frame is the screw on a helix but spins where a spatial curve nearly straightens (a planar S-cubic lifted 1e-3 out of its plane carries a 180° roll through the inflection, which 32 stations read as 0.4°), and one axis fitted to the whole run is the screw on a helix but rolls a two-arc spatial chain by up to 256° against its arcs.
R_k = F_k · F_0ᵀ does NOT depend on which perpendicular r_0 the RMF was
seeded with: re-seeding rolls F_0 and every F_k by the same angle about
the tangent, and the two rolls cancel in the product. That matters because
Transplant maps pu → r_k directly, so under IT the profile’s roll about
the path is whatever tangents[0].perpendicular() happened to return — an
arbitrary orientation no caller can predict. Rigid has no such freedom.
Variants§
Transplant
Move the profile onto the path, square to it (the classic sweep).
Rigid
Carry the profile by the path’s own rigid motion (see above).
Trait Implementations§
Source§impl Clone for SectionPlacement
impl Clone for SectionPlacement
impl Copy for SectionPlacement
Source§impl Debug for SectionPlacement
impl Debug for SectionPlacement
impl Eq for SectionPlacement
Source§impl PartialEq for SectionPlacement
impl PartialEq for SectionPlacement
impl StructuralPartialEq for SectionPlacement
Auto Trait Implementations§
impl Forget for SectionPlacement
impl Freeze for SectionPlacement
impl RefUnwindSafe for SectionPlacement
impl Send for SectionPlacement
impl Sync for SectionPlacement
impl Unpin for SectionPlacement
impl UnsafeUnpin for SectionPlacement
impl UnwindSafe for SectionPlacement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.