cnc-pattern-lib-0.1.0.0: Haskell library for creating SVG patterns for CNC routers

Safe HaskellNone
LanguageHaskell2010

Arc

Synopsis

Documentation

data Arc Source #

Represents an arc with center, radius, ccw from start to end. note that angles must be in (-pi, pi)

Instances
Eq Arc Source # 
Instance details

Defined in Arc

Methods

(==) :: Arc -> Arc -> Bool #

(/=) :: Arc -> Arc -> Bool #

Ord Arc Source # 
Instance details

Defined in Arc

Methods

compare :: Arc -> Arc -> Ordering #

(<) :: Arc -> Arc -> Bool #

(<=) :: Arc -> Arc -> Bool #

(>) :: Arc -> Arc -> Bool #

(>=) :: Arc -> Arc -> Bool #

max :: Arc -> Arc -> Arc #

min :: Arc -> Arc -> Arc #

Show Arc Source # 
Instance details

Defined in Arc

Methods

showsPrec :: Int -> Arc -> ShowS #

show :: Arc -> String #

showList :: [Arc] -> ShowS #

ApproxEq Arc Source # 
Instance details

Defined in Arc

Methods

approxEqual :: Arc -> Arc -> Float -> Bool Source #

(=~) :: Arc -> Arc -> Bool Source #

assertApproxEqual :: Arc -> Arc -> Float -> Assertion Source #

(@?~) :: Arc -> Arc -> Assertion Source #

Mergable Arc Source # 
Instance details

Defined in Arc

Methods

merge :: Arc -> Arc -> Float -> Maybe Arc Source #

optimize :: [Arc] -> Float -> [Arc] Source #

Transformable Arc Source # 
Instance details

Defined in Arc

SvgShape Arc Source # 
Instance details

Defined in Arc

Methods

toSvg :: Arc -> Svg Source #

pattern Arc :: Point -> !Float -> !Float -> !Float -> Arc Source #

svgPathDefinition :: Arc -> String Source #

Calculate the SVG path defition for an Arc

asTuple :: Arc -> (Float, Float, Float, Float, Float) Source #

Convert a circle to a 2-tuple representation.

invert :: Arc -> Point -> Point -> Point Source #

Reflect a point p about the arc at point b.

arcCoords :: Arc -> (Point, Point) Source #

Get coordinats at the start and end of a given arc.