Module Mlpost.Concrete.CPath


module CPath: sig .. end
Concrete Paths

type t 
type abscissa = float 
val length : t -> float
val is_closed : t -> bool
val is_a_point : t -> Concrete.CPoint.t option
val intersection : t ->
t ->
(abscissa * abscissa) list
intersection 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 * abscissa
one_intersection p1 p2 return one of the intersections between p1 and p2 or raise Not_found if none exists
val reverse : t -> t
reverse p return the path p reversed
val iter : (Concrete.CPoint.t ->
Concrete.CPoint.t ->
Concrete.CPoint.t -> Concrete.CPoint.t -> unit) ->
t -> unit
iter on all the splines of a path: iter f p applies f successively to the splines of p with :
val fold_left : ('a ->
Concrete.CPoint.t ->
Concrete.CPoint.t ->
Concrete.CPoint.t -> Concrete.CPoint.t -> 'a) ->
'a -> t -> 'a
fold on all the splines of a path
val cut_before : t -> t -> t
val cut_after : t -> t -> t
remove the part of a path before the first intersection or after the last
val split : t ->
abscissa ->
t * t
val subpath : t ->
abscissa ->
abscissa -> t
val direction_of_abscissa : t ->
abscissa -> Concrete.CPoint.t
val point_of_abscissa : t ->
abscissa -> Concrete.CPoint.t
val bounding_box : t ->
Concrete.CPoint.t * Concrete.CPoint.t
val dist_min_point : t ->
Concrete.CPoint.t -> float * abscissa
val dist_min_path : t ->
t ->
float * (abscissa * abscissa)
val print : Format.formatter -> t -> unit