geoff_geometry Namespace Reference

## Classes

class  Box

class  Box3d

class  Circle

class  CLine

class  Kurve

class  Line

class  Matrix

class  Plane

class  Point

class  Point3d

class  Span

class  SpanDataObject

class  SpanVertex

class  spVertex

class  Triangle3d

class  Vector2d

class  Vector3d

## Functions

Point Along (const CLine &s, double d)

Point Along (const CLine &s, double d, Point &p)

Point Along (const CLine &s, double d, const Point &p)

int apolloniusProblem (int AT1, const Circle &c1, int AT2, const Circle &c2, int AT3, const Circle &c3, Circle &Solution1, Circle &Solution2)

int apolloniusProblem (int AT1, const Circle &c1, int AT2, const Circle &c2, int AT3, const CLine &cl3, Circle &Solution1, Circle &Solution2)

int apolloniusProblem (int AT1, const Circle &c1, int AT2, const CLine &cl2, int AT3, const CLine &cl3, Circle &Solution1, Circle &Solution2)

int ArcArcIntof (const Span &arc0, const Span &arc1, Point &pLeft, Point &pRight)

Point Around (const Circle &c, double d, const Point &p)

CLine AtAngle (double angle, const Point &p0, const CLine &s)

Point AtAngle (const Circle &c, double angle)

double atn360 (double dy, double dx)

int biarc (CLine &cl0, CLine &cl1, Span *sp0, Span *sp1)

static void bubblesort (vector< Point > &p, vector< double > &d)

int corner (const Span &span, const Span &next, double cpTol=CPTANGENTTOL)

int corner (const Vector2d &v0, const Vector2d &v1, double cpTol)

double CPTOL (double offset, double maxOffset)

double Degrees (double radians)

double Dist (const Line &l, const Point3d &p, Point3d &pnear, double &t)

double Dist (const Point3d *p, const Vector3d *vl, const Point3d *pf)

double Dist (const Span &sp, const Point &p, Point &pnear)

double Dist (const Point &p0, const Circle &c, const Point &p1)

double Dist (const CLine &s, const Circle &c)

double Dist (const Circle &c0, const Circle &c1)

double Dist (const Circle &c, const Point &p)

double DistSq (const Point3d *p, const Vector3d *vl, const Point3d *pf)

static bool DoesIntersInterfere (const Point &pInt, const Kurve &k, double offset)

static Kurve eliminateLoops (const Kurve &k, const Kurve &originalk, double offset, int &ret)

int EqualiseSpanCount (Kurve &k1, Kurve &k2, Kurve &k1equal, Kurve &k2equal, bool equalise_same_span_count)

void EqualiseSpanCountAfterOffset (Kurve &k1, Kurve &k2, Kurve &k1Out, Kurve &k2Out)

void EqualiseSpanCountAfterOffsetFromRollAround (Kurve &k1, Kurve &k2, Kurve &k1Out, Kurve &k2Out)

void FAILURE (const wchar_t *str)

void FAILURE (const std::wstring &str)

bool FEQ (double a, double b, double tolerance=TOLERANCE)

bool FEQZ (double a, double tolerance=TIGHT_TOLERANCE)

bool FNE (double a, double b, double tolerance=TOLERANCE)

bool FNEZ (double a, double tolerance=TIGHT_TOLERANCE)

const wchar_t * getMessage (const wchar_t *original)

double IncludedAngle (const CLine &s0, const CLine &s1, int dir=1)

double IncludedAngle (const Vector2d &v0, const Vector2d &v1, int dir)

double IncludedAngle (const Vector3d &v0, const Vector3d &v1, const Vector3d &normal, int dir)

int Intof (const Span &sp0, const Span &sp1, Point &p0, Point &p1, double t[4])

int Intof (const Line &l0, const Line &l1, Point3d &intof)

Point Intof (const CLine &s0, const CLine &s1)

Point Intof (int NF, const CLine &s, const Circle &c)

Point Intof (int NF, const CLine &s, const Circle &c, Point &otherInters)

Point Intof (int intMode, const Circle &c0, const Circle &c1)

Point Intof (int intMode, const Circle &c0, const Circle &c1, Point &otherInters)

int Intof (const Circle &c0, const Circle &c1, Point &pLeft, Point &pRight)

Point IntofIso (Span &one, Span &two, Span &three)

Line IsPtsLine (const double *a, int n, double tolerance, double *deviation)

int LineArcIntof (const Span &line, const Span &arc, Point &p0, Point &p1, double t[4])

int LineLineIntof (const Span &sp0, const Span &sp1, Point &p, double t[2])

Point Mid (const Point &p0, const Point &p1, double factor)

Point Mid (const Span &sp)

void MinMax (const Point &p, Point &pmin, Point &pmax)

void MinMax (const Point3d &p, Point3d &pmin, Point3d &pmax)

double mm (double value)

Point3d Near (const Line &l, const Point3d &p, double &t)

CLine Normal (const CLine &s)

CLine Normal (const CLine &s, const Point &p)

Point On (const CLine &s, const Point &p)

Point On (const Circle &c, const Point &p)

bool OnSpan (const Span &sp, const Point &p)

bool OnSpan (const Span &sp, const Point &p, bool nearPoints, Point &pNear, Point &pOnSpan)

wostream & operator<< (wostream &op, Point &p)

wostream & operator<< (wostream &op, CLine &cl)

wostream & operator<< (wostream &op, Plane &pl)

ostream & operator<< (ostream &op, Point3d &p)

wostream & operator<< (wostream &op, Vector2d &v)

wostream & operator<< (wostream &op, Vector3d &v)

wostream & operator<< (wostream &op, Circle &c)

wostream & operator<< (wostream &op, Span &sp)

CLine Parallel (int side, const CLine &s0, double distance)

CLine Parallel (const CLine &s0, Point &p)

CLine Parallel (const CLine &cl, const Point &p)

Circle Parallel (int side, const Circle &c0, double distance)

Point Polar (const Point &p, double angle, double r)

int quadratic (double a, double b, double c, double &x0, double &x1)

double Radians (double degrees)

Point Rel (const Point &p, double x0, double y0)

void set_Tolerances (int mode)

static int Split (double tolerance, double angle, double radius, int dir)

void tangential_arc (const Point &p0, const Point &p1, const Vector2d &v0, Point &c, int &dir)

CLine Tanto (int AT, const Circle &c, const Point &p)

CLine Tanto (int AT0, const Circle &c0, int AT1, const Circle &c)

CLine Tanto (int AT, const Circle &c, double angle, const CLine &s0)

Circle Tanto (int NF, CLine &s0, Point &p, double rad)

Circle Tanto (int AT1, CLine &s1, int AT2, CLine &s2, double rad)

Circle Tanto (int AT1, CLine s1, int AT2, CLine s2, int AT3, CLine s3)

Circle Tanto (int NF, int AT0, const CLine &s0, int AT1, const Circle &c1, double rad)

Circle Tanto (int LR, int AT0, const Circle &c0, const Point &p, double rad)

Circle Tanto (int NF, const CLine &s0, const Point &p, double rad)

Circle Tanto (int AT1, const CLine &s1, int AT2, const CLine &s2, double rad)

Circle Tanto (int AT1, const CLine &s1, int AT2, const CLine &s2, int AT3, const CLine &s3)

Circle Tanto (int LR, int AT0, const Circle &c0, int AT1, const Circle &c1, double rad)

Circle Tanto (int LR, int AT1, const Circle &c1, int AT2, const Circle &c2, int AT3, const Circle c3)

Circle Thro (int LR, const Point &p0, const Point &p1, double rad)

Circle Thro (const Point &p0, const Point &p1)

Circle Thro (const Point &p0, const Point &p1, const Point &p2)

Point XonCLine (CLine &s, double xval)

Point XonCLine (const CLine &s, double xval)

Point YonCLine (CLine &s, double yval)

Point YonCLine (const CLine &s, double yval)

## Variables

double COS_SMALL_ANGLE

double RESOLUTION = 1.0e-06

double SIN_SMALL_ANGLE

double SMALL_ANGLE

double TIGHT_TOLERANCE = 1.0e-09

double TOLERANCE = 1.0e-06

double TOLERANCE_SQ = TOLERANCE * TOLERANCE

double UNIT_VECTOR_TOLERANCE = 1.0e-10

Matrix UnitMatrix

int UNITS = MM

## Enumeration Type Documentation

Enumerator
MES_TITLE
MES_UNFINISHEDCODING
MES_ERRORFILENAME
MES_LOGFILE
MES_LOGFILE1
Enumerator
MES_DIFFSCALE
MES_POINTONCENTRE
MES_INVALIDARC
MES_LOFTUNEQUALSPANCOUNT
MES_EQUALSPANCOUNTFAILED
MES_CANNOTTRIMSPAN
MES_INDEXOUTOFRANGE
MES_ROLLINGBALL4AXIS_ERROR
MES_INPUT_EQUALSPANCOUNT
MES_INVALIDPLANE
Enumerator
GENERAL_MESSAGES
GEOMETRY_ERROR_MESSAGES
PARAMSPMP
Enumerator
NO_ELIMINATION
BASIC_OFFSET
ROLLINGBALL_OFFSET
Enumerator
UNMARKED
ROLL_AROUND
INTERSECTION
FULL_CIRCLE_KURVE
Enumerator
MM
METRES
INCHES

## Function Documentation

 Point geoff_geometry::Along ( const CLine & s, double d )
 Point geoff_geometry::Along ( const CLine & s, double d, Point & p )
 Point geoff_geometry::Along ( const CLine & s, double d, const Point & p )
 int geoff_geometry::apolloniusProblem ( int AT1, const Circle & c1, int AT2, const Circle & c2, int AT3, const Circle & c3, Circle & Solution1, Circle & Solution2 )

Referenced by IncludedAngle().

 int geoff_geometry::apolloniusProblem ( int AT1, const Circle & c1, int AT2, const Circle & c2, int AT3, const CLine & cl3, Circle & Solution1, Circle & Solution2 )
 int geoff_geometry::apolloniusProblem ( int AT1, const Circle & c1, int AT2, const CLine & cl2, int AT3, const CLine & cl3, Circle & Solution1, Circle & Solution2 )
 int geoff_geometry::ArcArcIntof ( const Span & arc0, const Span & arc1, Point & pLeft, Point & pRight )

Referenced by CPTOL(), and Intof().

 Point geoff_geometry::Around ( const Circle & c, double d, const Point & p )
 CLine geoff_geometry::AtAngle ( double angle, const Point & p0, const CLine & s )

Referenced by IncludedAngle(), and Tanto().

 Point geoff_geometry::AtAngle ( const Circle & c, double angle )
 double geoff_geometry::atn360 ( double dy, double dx )

Referenced by Dist(), and geoff_geometry::Span::Span().

 int geoff_geometry::biarc ( CLine & cl0, CLine & cl1, Span * sp0, Span * sp1 )

Referenced by CPTOL().

 static void geoff_geometry::bubblesort ( vector< Point > & p, vector< double > & d )
static
 int geoff_geometry::corner ( const Span & span, const Span & next, double cpTol = `CPTANGENTTOL` )
inline
 int geoff_geometry::corner ( const Vector2d & v0, const Vector2d & v1, double cpTol )

References DraftGeomUtils::v1().

Referenced by Degrees().

 double geoff_geometry::CPTOL ( double offset, double maxOffset )
inline
 double geoff_geometry::Degrees ( double radians )
inline

References corner(), Degrees(), and quadratic().

Referenced by Degrees().

 double geoff_geometry::Dist ( const Line & l, const Point3d & p, Point3d & pnear, double & t )
 double geoff_geometry::Dist ( const Point3d * p, const Vector3d * vl, const Point3d * pf )

returns the distance of pf from the line given by p,vl vl must be normalised

 double geoff_geometry::Dist ( const Span & sp, const Point & p, Point & pnear )
 double geoff_geometry::Dist ( const Point & p0, const Circle & c, const Point & p1 )
 double geoff_geometry::Dist ( const CLine & s, const Circle & c )
 double geoff_geometry::Dist ( const Circle & c0, const Circle & c1 )
 double geoff_geometry::Dist ( const Circle & c, const Point & p )
 double geoff_geometry::DistSq ( const Point3d * p, const Vector3d * vl, const Point3d * pf )

returns the distance squared of pf from the line given by p,vl vl must be normalised

References geoff_geometry::Vector3d::magnitudeSq().

 static bool geoff_geometry::DoesIntersInterfere ( const Point & pInt, const Kurve & k, double offset )
static
 static Kurve geoff_geometry::eliminateLoops ( const Kurve & k, const Kurve & originalk, double offset, int & ret )
static
 int geoff_geometry::EqualiseSpanCount ( Kurve & k1, Kurve & k2, Kurve & k1equal, Kurve & k2equal, bool equalise_same_span_count )
 void geoff_geometry::EqualiseSpanCountAfterOffset ( Kurve & k1, Kurve & k2, Kurve & k1Out, Kurve & k2Out )
 void geoff_geometry::EqualiseSpanCountAfterOffsetFromRollAround ( Kurve & k1, Kurve & k2, Kurve & k1Out, Kurve & k2Out )
 void geoff_geometry::FAILURE ( const std::wstring & str )
 bool geoff_geometry::FEQ ( double a, double b, double tolerance = `TOLERANCE` )
inline
 bool geoff_geometry::FEQZ ( double a, double tolerance = `TIGHT_TOLERANCE` )
inline
 bool geoff_geometry::FNE ( double a, double b, double tolerance = `TOLERANCE` )
inline

References FNE(), and Draft::tolerance().

 bool geoff_geometry::FNEZ ( double a, double tolerance = `TIGHT_TOLERANCE` )
inline
 const wchar_t * geoff_geometry::getMessage ( const wchar_t * original )
 double geoff_geometry::IncludedAngle ( const CLine & s0, const CLine & s1, int dir = `1` )
inline
 double geoff_geometry::IncludedAngle ( const Vector2d & v0, const Vector2d & v1, int dir )
 double geoff_geometry::IncludedAngle ( const Vector3d & v0, const Vector3d & v1, const Vector3d & normal, int dir )

References DraftGeomUtils::v1().

 int geoff_geometry::Intof ( const Span & sp0, const Span & sp1, Point & p0, Point & p1, double t[4] )
 int geoff_geometry::Intof ( const Line & l0, const Line & l1, Point3d & intof )
 Point geoff_geometry::Intof ( const CLine & s0, const CLine & s1 )
 Point geoff_geometry::Intof ( int NF, const CLine & s, const Circle & c )

References Intof().

 Point geoff_geometry::Intof ( int NF, const CLine & s, const Circle & c, Point & otherInters )
 Point geoff_geometry::Intof ( int intMode, const Circle & c0, const Circle & c1 )

References Intof().

 Point geoff_geometry::Intof ( int intMode, const Circle & c0, const Circle & c1, Point & otherInters )

References Intof().

 int geoff_geometry::Intof ( const Circle & c0, const Circle & c1, Point & pLeft, Point & pRight )
 Point geoff_geometry::IntofIso ( Span & one, Span & two, Span & three )
 Line geoff_geometry::IsPtsLine ( const double * a, int n, double tolerance, double * deviation )
 int geoff_geometry::LineArcIntof ( const Span & line, const Span & arc, Point & p0, Point & p1, double t[4] )
 int geoff_geometry::LineLineIntof ( const Span & sp0, const Span & sp1, Point & p, double t[2] )

Referenced by CPTOL(), and Intof().

 Point geoff_geometry::Mid ( const Point & p0, const Point & p1, double factor )
 Point geoff_geometry::Mid ( const Span & sp )
 void geoff_geometry::MinMax ( const Point & p, Point & pmin, Point & pmax )
inline
 void geoff_geometry::MinMax ( const Point3d & p, Point3d & pmin, Point3d & pmax )
inline
 double geoff_geometry::mm ( double value )

References INCHES, and METRES.

 Point3d geoff_geometry::Near ( const Line & l, const Point3d & p, double & t )
 CLine geoff_geometry::Normal ( const CLine & s )

References geoff_geometry::CLine::p, and geoff_geometry::CLine::v.

Referenced by Intof(), and Thro().

 CLine geoff_geometry::Normal ( const CLine & s, const Point & p )
 Point geoff_geometry::On ( const CLine & s, const Point & p )
 Point geoff_geometry::On ( const Circle & c, const Point & p )
 bool geoff_geometry::OnSpan ( const Span & sp, const Point & p )
 bool geoff_geometry::OnSpan ( const Span & sp, const Point & p, bool nearPoints, Point & pNear, Point & pOnSpan )
 wostream& geoff_geometry::operator<< ( wostream & op, Point & p )
 wostream& geoff_geometry::operator<< ( wostream & op, CLine & cl )
 wostream& geoff_geometry::operator<< ( wostream & op, Plane & pl )
 ostream& geoff_geometry::operator<< ( ostream & op, Point3d & p )
 wostream& geoff_geometry::operator<< ( wostream & op, Vector2d & v )
 wostream& geoff_geometry::operator<< ( wostream & op, Vector3d & v )
 wostream& geoff_geometry::operator<< ( wostream & op, Circle & c )
 wostream& geoff_geometry::operator<< ( wostream & op, Span & sp )
 CLine geoff_geometry::Parallel ( int side, const CLine & s0, double distance )

Referenced by Tanto().

 CLine geoff_geometry::Parallel ( const CLine & s0, Point & p )
 CLine geoff_geometry::Parallel ( const CLine & cl, const Point & p )
 Circle geoff_geometry::Parallel ( int side, const Circle & c0, double distance )
 Point geoff_geometry::Polar ( const Point & p, double angle, double r )

Referenced by IncludedAngle().

 int geoff_geometry::quadratic ( double a, double b, double c, double & x0, double & x1 )

References Draft::epsilon(), METRES, and UNITS.

Referenced by Degrees(), Intof(), and LineArcIntof().

 double geoff_geometry::Radians ( double degrees )
inline

 Point geoff_geometry::Rel ( const Point & p, double x0, double y0 )

Referenced by IncludedAngle().

 void geoff_geometry::set_Tolerances ( int mode )

References FAILURE(), INCHES, METRES, MM, and TOLERANCE.

 static int geoff_geometry::Split ( double tolerance, double angle, double radius, int dir )
static
 void geoff_geometry::tangential_arc ( const Point & p0, const Point & p1, const Vector2d & v0, Point & c, int & dir )
 CLine geoff_geometry::Tanto ( int AT, const Circle & c, const Point & p )
 CLine geoff_geometry::Tanto ( int AT0, const Circle & c0, int AT1, const Circle & c )
 CLine geoff_geometry::Tanto ( int AT, const Circle & c, double angle, const CLine & s0 )
 Circle geoff_geometry::Tanto ( int NF, CLine & s0, Point & p, double rad )
 Circle geoff_geometry::Tanto ( int AT1, CLine & s1, int AT2, CLine & s2, double rad )
 Circle geoff_geometry::Tanto ( int AT1, CLine s1, int AT2, CLine s2, int AT3, CLine s3 )
 Circle geoff_geometry::Tanto ( int NF, int AT0, const CLine & s0, int AT1, const Circle & c1, double rad )
 Circle geoff_geometry::Tanto ( int LR, int AT0, const Circle & c0, const Point & p, double rad )
 Circle geoff_geometry::Tanto ( int NF, const CLine & s0, const Point & p, double rad )
 Circle geoff_geometry::Tanto ( int AT1, const CLine & s1, int AT2, const CLine & s2, double rad )
 Circle geoff_geometry::Tanto ( int AT1, const CLine & s1, int AT2, const CLine & s2, int AT3, const CLine & s3 )
 Circle geoff_geometry::Tanto ( int LR, int AT0, const Circle & c0, int AT1, const Circle & c1, double rad )
 Circle geoff_geometry::Tanto ( int LR, int AT1, const Circle & c1, int AT2, const Circle & c2, int AT3, const Circle c3 )
 Circle geoff_geometry::Thro ( int LR, const Point & p0, const Point & p1, double rad )

Referenced by IncludedAngle(), and Thro().

 Circle geoff_geometry::Thro ( const Point & p0, const Point & p1 )
 Circle geoff_geometry::Thro ( const Point & p0, const Point & p1, const Point & p2 )
 Point geoff_geometry::XonCLine ( CLine & s, double xval )

References Intof(), and geoff_geometry::Point::Point().

Referenced by IncludedAngle().

 Point geoff_geometry::XonCLine ( const CLine & s, double xval )
 Point geoff_geometry::YonCLine ( CLine & s, double yval )

References Intof(), and geoff_geometry::Point::Point().

Referenced by IncludedAngle().

 Point geoff_geometry::YonCLine ( const CLine & s, double yval )

## Variable Documentation

 double geoff_geometry::COS_SMALL_ANGLE
 double geoff_geometry::RESOLUTION = 1.0e-06
 double geoff_geometry::SIN_SMALL_ANGLE
 double geoff_geometry::SMALL_ANGLE
 double geoff_geometry::TIGHT_TOLERANCE = 1.0e-09
 double geoff_geometry::TOLERANCE_SQ = TOLERANCE * TOLERANCE

Referenced by Intof().

 double geoff_geometry::UNIT_VECTOR_TOLERANCE = 1.0e-10
 Matrix geoff_geometry::UnitMatrix
 int geoff_geometry::UNITS = MM