Module Concrete.CPath
Concrete Paths
val length : t -> floatval is_closed : t -> boolval is_a_point : t -> CPoint.t optionval intersection : t -> t -> (abscissa * abscissa) listintersection p1 p2 return a list of pair of abscissa. In each pairs (a1,a2), a1 (resp. a2) is the abscissa in p1 (resp. p2) of one intersection point between p1 and p2. Additionnal point of intersection (two point for only one real intersection) can appear in degenerate case.
val one_intersection : t -> t -> abscissa * abscissaone_intersection p1 p2 return one of the intersections between p1 and p2 or raise Not_found if none exists
val iter : (CPoint.t -> CPoint.t -> CPoint.t -> CPoint.t -> unit) -> t -> unititer on all the splines of a path: iter f p applies f successively to the splines of p with :
- the start point of the spline as first argument
- the control point of the start point as second argument
- the control point of the end point as third argument
- the end point as fourth argument
val fold_left : ('a -> CPoint.t -> CPoint.t -> CPoint.t -> CPoint.t -> 'a) -> 'a -> t -> 'afold on all the splines of a path
val cut_before : t -> t -> tval cut_after : t -> t -> tremove the part of a path before the first intersection or after the last
val split : t -> abscissa -> t * tval subpath : t -> abscissa -> abscissa -> tval direction_of_abscissa : t -> abscissa -> CPoint.tval point_of_abscissa : t -> abscissa -> CPoint.tval bounding_box : t -> CPoint.t * CPoint.tval dist_min_point : t -> CPoint.t -> float * abscissaval dist_min_path : t -> t -> float * (abscissa * abscissa)val print : Stdlib.Format.formatter -> t -> unit