geoff_geometry::Kurve Class Reference

#include <geometry.h>

Classes

struct  spanCompare
 

Public Member Functions

void Add ()
 
void Add (const Kurve *k, bool AddNullSpans=true)
 
bool Add (const Point &p0, bool AddNullSpans=true)
 
bool Add (const Span &sp, bool AddNullSpans=true)
 
bool Add (const spVertex &spv, bool AddNullSpans=true)
 
bool Add (int type, const Point &p0, const Point &pc, bool AddNullSpans=true)
 
void AddEllipse (int dir, const Point &pStart, const Point &pEnd, const Point &pCentre, const Vector2d &majorAxis, double majorRadius, double minorRadius, double tolerance)
 
void AddIndex (int vertexNumber, const SpanDataObject *data)
 
void AddSections (const Kurve *k, bool endOfSection)
 
void AddSpanID (int ID)
 
double Area () const
 
int Break (double atParam, const Kurve *secInput, Kurve *refOut, Kurve *secOut)
 
void ChangeEnd (const Point *pNewEnd, int endSpanno)
 
void ChangeStart (const Point *pNewStart, int startSpanno)
 
void Clear ()
 
bool Closed () const
 
bool Compare (const Kurve *k, Matrix *m, bool bAllowMirror=true) const
 
void FullCircle (int dir, const Point &c, double radius)
 
int Get (int spannumber, Span &sp, bool returnSpanProperties=false, bool transform=false) const
 
int Get (int spanVertexNumber, Point &p, Point &pc) const
 
int Get (int spanVertexNumber, Point3d &p, Point3d &pc) const
 
void Get (int vertex, spVertex &spv) const
 
void Get (Point &ps, Point &pe) const
 
void Get (std::vector< Span > *all, bool ignoreNullSpans) const
 
const SpanDataObjectGetIndex (int vertexNumber) const
 
double GetLength () const
 
int GetSpanID (int spanVertexNumber) const
 
int IntExtWire (Kurve &kSec, double Ref, double Sec, double height, Kurve *kOut)
 
int Intof (const Kurve &k, vector< Point > &p) const
 
int Intof (const Span &sp, vector< Point > &p) const
 
 Kurve ()
 
 Kurve (const Kurve &k0)
 
void minmax (Box &b)
 
void minmax (Point &pmin, Point &pmax)
 
Point Near (const Point &p) const
 
Point Near (const Point &p, int &nearSpanNumber) const
 
Point NearToVertex (const Point &p) const
 
Point NearToVertex (const Point &p, int &nearSpanNumber) const
 
int nSpans () const
 
int Offset (vector< Kurve * > &OffsetKurves, double offset, int direction, int method, int &ret) const
 
int OffsetISOMethod (Kurve &kOffset, double off, int direction, bool BlendAll) const
 
int OffsetMethod1 (Kurve &kOffset, double off, int direction, int method, int &ret) const
 
bool operator!= (const Kurve &k) const
 
const Kurveoperator= (const Kurve &k)
 
const Kurveoperator= (const Matrix &m)
 
bool operator== (const Kurve &k) const
 
Kurve Part (double fromParam, double toParam)
 
void Part (double fromParam, double toParam, const Kurve *secInput, Kurve *refOut, Kurve *secOut)
 
Kurve Part (int fromSpanno, const Point &fromPt, int toSpanno, const Point &toPt)
 
void Part (int startVertex, int EndVertex, Kurve *part)
 
double Perim () const
 
int Reduce (double tolerance)
 
void Replace (int vertexnumber, const spVertex &spv)
 
void Replace (int vertexnumber, int type, const Point &p, const Point &pc, int ID=UNMARKED)
 
void Reverse ()
 
bool Reverse (bool isReversed)
 
void SetZ (double z)
 
void Spiral (const Point &centre, double startAngle, double startRadius, double radiusRisePerRevolution, double endRadius)
 
bool Split (double MaximumRadius, double reslution)
 
void Start ()
 
void Start (const Point &p)
 
bool Started () const
 
void StoreAllSpans (std::vector< Span > &kSpans) const
 
 ~Kurve ()
 
- Public Member Functions inherited from geoff_geometry::Matrix
void Get (double *p) const
 
void GetRotation (double &ax, double &ay, double &az) const
 
bool GetScale (double &sx) const
 
void GetScale (double &sx, double &sy, double &sz) const
 
void GetTranslate (double &x, double &y, double &z) const
 
Matrix Inverse ()
 
int IsMirrored ()
 
int IsUnit ()
 
 Matrix ()
 
 Matrix (double m[16])
 
void Multiply (Matrix &m)
 
bool operator!= (const Matrix &m) const
 
bool operator== (const Matrix &m) const
 
void Put (double *p)
 
void Rotate (double angle, int Axis)
 
void Rotate (double angle, Vector3d *rotAxis)
 
void Rotate (double sinang, double cosang, int Axis)
 
void Rotate (double sinang, double cosang, Vector3d *rotAxis)
 
void Scale (double scale)
 
void Scale (double scalex, double scaley, double scalez)
 
void Transform (double p0[3]) const
 
void Transform (double p0[3], double p1[3]) const
 
void Transform2d (double p0[2], double p1[2]) const
 
void Translate (double x, double y, double z=0)
 
void Unit ()
 
 ~Matrix ()
 

Protected Attributes

bool m_isReversed
 
int m_nVertices
 
vector< SpanVertex * > m_spans
 
bool m_started
 

Friends

wofstream & operator<< (wofstream &op, Kurve &k)
 
wifstream & operator>> (wifstream &op, Kurve &k)
 

Additional Inherited Members

- Public Attributes inherited from geoff_geometry::Matrix
double e [16]
 
int m_mirrored
 
bool m_unit
 

Constructor & Destructor Documentation

◆ Kurve() [1/2]

geoff_geometry::Kurve::Kurve ( )

Referenced by Offset().

◆ Kurve() [2/2]

geoff_geometry::Kurve::Kurve ( const Kurve k0)

◆ ~Kurve()

geoff_geometry::Kurve::~Kurve ( )

References Clear().

Member Function Documentation

◆ Add() [1/6]

void geoff_geometry::Kurve::Add ( )

References geoff_geometry::FAILURE(), Get(), and m_nVertices.

Referenced by Add(), FullCircle(), and Start().

◆ Add() [2/6]

◆ Add() [3/6]

bool geoff_geometry::Kurve::Add ( const Point p0,
bool  AddNullSpans = true 
)

References Add().

◆ Add() [4/6]

◆ Add() [5/6]

◆ Add() [6/6]

bool geoff_geometry::Kurve::Add ( int  type,
const Point p0,
const Point pc,
bool  AddNullSpans = true 
)

◆ AddEllipse()

void geoff_geometry::Kurve::AddEllipse ( int  dir,
const Point pStart,
const Point pEnd,
const Point pCentre,
const Vector2d majorAxis,
double  majorRadius,
double  minorRadius,
double  tolerance 
)

◆ AddIndex()

void geoff_geometry::Kurve::AddIndex ( int  vertexNumber,
const SpanDataObject data 
)

References geoff_geometry::FAILURE(), m_nVertices, and m_spans.

Referenced by Add().

◆ AddSections()

void geoff_geometry::Kurve::AddSections ( const Kurve k,
bool  endOfSection 
)

◆ AddSpanID()

void geoff_geometry::Kurve::AddSpanID ( int  ID)

◆ Area()

◆ Break()

int geoff_geometry::Kurve::Break ( double  atParam,
const Kurve secInput,
Kurve refOut,
Kurve secOut 
)

◆ ChangeEnd()

void geoff_geometry::Kurve::ChangeEnd ( const Point pNewEnd,
int  endSpanno 
)

◆ ChangeStart()

void geoff_geometry::Kurve::ChangeStart ( const Point pNewStart,
int  startSpanno 
)

◆ Clear()

void geoff_geometry::Kurve::Clear ( void  )

◆ Closed()

bool geoff_geometry::Kurve::Closed ( ) const

References Get(), and m_nVertices.

Referenced by Area(), ChangeStart(), OffsetMethod1(), and Part().

◆ Compare()

bool geoff_geometry::Kurve::Compare ( const Kurve k,
Matrix m,
bool  bAllowMirror = true 
) const

◆ FullCircle()

void geoff_geometry::Kurve::FullCircle ( int  dir,
const Point c,
double  radius 
)

make a full circle Kurve (2 spans) mark the first span for later

References Add(), AddSpanID(), Clear(), geoff_geometry::FULL_CIRCLE_KURVE, Start(), and geoff_geometry::Point::x.

◆ Get() [1/6]

◆ Get() [2/6]

int geoff_geometry::Kurve::Get ( int  spanVertexNumber,
Point p,
Point pc 
) const

◆ Get() [3/6]

int geoff_geometry::Kurve::Get ( int  spanVertexNumber,
Point3d p,
Point3d pc 
) const

◆ Get() [4/6]

◆ Get() [5/6]

void geoff_geometry::Kurve::Get ( Point ps,
Point pe 
) const

◆ Get() [6/6]

void geoff_geometry::Kurve::Get ( std::vector< Span > *  all,
bool  ignoreNullSpans 
) const

put all spans to vector

References Get(), nSpans(), and geoff_geometry::Span::NullSpan.

◆ GetIndex()

const SpanDataObject * geoff_geometry::Kurve::GetIndex ( int  vertexNumber) const

References geoff_geometry::FAILURE(), m_nVertices, and m_spans.

Referenced by Add().

◆ GetLength()

double geoff_geometry::Kurve::GetLength ( ) const

◆ GetSpanID()

int geoff_geometry::Kurve::GetSpanID ( int  spanVertexNumber) const

◆ IntExtWire()

int geoff_geometry::Kurve::IntExtWire ( Kurve kSec,
double  Ref,
double  Sec,
double  height,
Kurve kOut 
)

◆ Intof() [1/2]

int geoff_geometry::Kurve::Intof ( const Kurve k,
vector< Point > &  p 
) const

◆ Intof() [2/2]

int geoff_geometry::Kurve::Intof ( const Span sp,
vector< Point > &  p 
) const

◆ minmax() [1/2]

void geoff_geometry::Kurve::minmax ( Box b)

References minmax().

◆ minmax() [2/2]

◆ Near() [1/2]

Point geoff_geometry::Kurve::Near ( const Point p) const

References Near().

Referenced by Near().

◆ Near() [2/2]

Point geoff_geometry::Kurve::Near ( const Point p,
int &  nearSpanNumber 
) const

◆ NearToVertex() [1/2]

Point geoff_geometry::Kurve::NearToVertex ( const Point p) const

References NearToVertex().

Referenced by NearToVertex().

◆ NearToVertex() [2/2]

Point geoff_geometry::Kurve::NearToVertex ( const Point p,
int &  nearSpanNumber 
) const

◆ nSpans()

◆ Offset()

int geoff_geometry::Kurve::Offset ( vector< Kurve * > &  OffsetKurves,
double  offset,
int  direction,
int  method,
int &  ret 
) const

◆ OffsetISOMethod()

int Kurve::OffsetISOMethod ( Kurve kOffset,
double  off,
int  direction,
bool  BlendAll 
) const

◆ OffsetMethod1()

◆ operator!=()

bool geoff_geometry::Kurve::operator!= ( const Kurve k) const

◆ operator=() [1/2]

◆ operator=() [2/2]

const Kurve & geoff_geometry::Kurve::operator= ( const Matrix m)

◆ operator==()

bool geoff_geometry::Kurve::operator== ( const Kurve k) const

References Get(), and nSpans().

◆ Part() [1/4]

Kurve geoff_geometry::Kurve::Part ( double  fromParam,
double  toParam 
)

return a part Kurve - perimeter parameterisation fromParam & toParam 0 - 1 perimeter parameter

References Add(), geoff_geometry::FEQ(), Get(), geoff_geometry::Span::length, m_started, geoff_geometry::Span::MidPerim(), nSpans(), geoff_geometry::Span::p0, geoff_geometry::Span::p1, Perim(), and Start().

◆ Part() [2/4]

void geoff_geometry::Kurve::Part ( double  fromParam,
double  toParam,
const Kurve secInput,
Kurve refOut,
Kurve secOut 
)

◆ Part() [3/4]

Kurve geoff_geometry::Kurve::Part ( int  fromSpanno,
const Point fromPt,
int  toSpanno,
const Point toPt 
)

References Add(), Closed(), Get(), Near(), nSpans(), and Start().

◆ Part() [4/4]

void geoff_geometry::Kurve::Part ( int  startVertex,
int  EndVertex,
Kurve part 
)

References Add(), and Get().

◆ Perim()

◆ Reduce()

◆ Replace() [1/2]

void geoff_geometry::Kurve::Replace ( int  vertexnumber,
const spVertex spv 
)

◆ Replace() [2/2]

void geoff_geometry::Kurve::Replace ( int  vertexnumber,
int  type,
const Point p,
const Point pc,
int  ID = UNMARKED 
)

◆ Reverse() [1/2]

void geoff_geometry::Kurve::Reverse ( )

References Get(), GetSpanID(), m_nVertices, and Replace().

◆ Reverse() [2/2]

bool geoff_geometry::Kurve::Reverse ( bool  isReversed)

◆ SetZ()

void geoff_geometry::Kurve::SetZ ( double  z)

◆ Spiral()

void geoff_geometry::Kurve::Spiral ( const Point centre,
double  startAngle,
double  startRadius,
double  radiusRisePerRevolution,
double  endRadius 
)

◆ Split()

◆ Start() [1/2]

◆ Start() [2/2]

◆ Started()

bool geoff_geometry::Kurve::Started ( ) const

◆ StoreAllSpans()

void geoff_geometry::Kurve::StoreAllSpans ( std::vector< Span > &  kSpans) const

References Get(), and nSpans().

Friends And Related Function Documentation

◆ operator<<

wofstream& operator<< ( wofstream &  op,
Kurve k 
)
friend

◆ operator>>

wifstream& operator>> ( wifstream &  op,
Kurve k 
)
friend

Member Data Documentation

◆ m_isReversed

bool geoff_geometry::Kurve::m_isReversed
protected

Referenced by Clear(), Get(), GetSpanID(), Kurve(), and operator=().

◆ m_nVertices

◆ m_spans

vector<SpanVertex*> geoff_geometry::Kurve::m_spans
protected

◆ m_started

bool geoff_geometry::Kurve::m_started
protected

The documentation for this class was generated from the following files:
  • Sources/FreeCAD/src/Mod/Path/libarea/kurve/geometry.h
  • Sources/FreeCAD/src/Mod/Path/libarea/kurve/kurve.cpp
  • Sources/FreeCAD/src/Mod/Path/libarea/kurve/offset.cpp