pub struct Plan {
pub vertices: Vec<PlanVertex>,
pub edges: Vec<PlanEdge>,
pub runs: Vec<Vec<usize>>,
pub centres: Vec<Vec3>,
pub bounds: [f64; 4],
pub top: f64,
}Expand description
The plan’s graph, and the surfaces its parts name.
Fields§
§vertices: Vec<PlanVertex>§edges: Vec<PlanEdge>§runs: Vec<Vec<usize>>Each tube’s run: the moves (indices into the envelope’s segments) along its line, in order.
centres: Vec<Vec3>Each ball’s centre.
bounds: [f64; 4]The box [x0, x1] × [y0, y1] and the stock’s top.
top: f64Implementations§
Source§impl Plan
impl Plan
Sourcepub fn edge_points(
&self,
envelope: &BallEnvelope,
index: usize,
spacing: f64,
) -> Result<Vec<Vec3>, String>
pub fn edge_points( &self, envelope: &BallEnvelope, index: usize, spacing: f64, ) -> Result<Vec<Vec3>, String>
The points of the plan’s edge index again, about spacing apart in
plan and each on the curve where its two parts meet: the edge’s
polyline cut evenly by length, each cut point moved square to its
stretch of the polyline onto the curve (by the secant on the pair’s
equation; a side of the box keeps its line and takes its part’s
height). Its two ends are its vertices’ own points. Refuses a point
the secant does not bring onto the curve (to 1e-9 of the radius)
within half a spacing of the polyline.
Sourcepub fn edge_points_in(
&self,
field: &dyn Field,
index: usize,
spacing: f64,
) -> Result<Vec<Vec3>, String>
pub fn edge_points_in( &self, field: &dyn Field, index: usize, spacing: f64, ) -> Result<Vec<Vec3>, String>
Plan::edge_points on any field, spacing in its chart.