#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 SpanDataObject * | GetIndex (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 Kurve & | operator= (const Kurve &k) |
const Kurve & | operator= (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 ¢re, 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 |
geoff_geometry::Kurve::Kurve | ( | ) |
References m_isReversed, m_nVertices, and m_started.
Referenced by Offset().
geoff_geometry::Kurve::Kurve | ( | const Kurve & | k0 | ) |
copy constructor
References geoff_geometry::Matrix::e, m_isReversed, geoff_geometry::Matrix::m_mirrored, m_nVertices, m_spans, m_started, and geoff_geometry::Matrix::m_unit.
geoff_geometry::Kurve::~Kurve | ( | ) |
References Clear().
void geoff_geometry::Kurve::Add | ( | ) |
References Add(), geoff_geometry::FAILURE(), Get(), and m_nVertices.
Referenced by Add(), FullCircle(), and Start().
References Add(), AddIndex(), geoff_geometry::Span::dir, geoff_geometry::Point::Dist(), Get(), GetIndex(), geoff_geometry::Matrix::Inverse(), geoff_geometry::Matrix::m_unit, geoff_geometry::Matrix::Multiply(), nSpans(), geoff_geometry::Span::p0, geoff_geometry::Span::p1, geoff_geometry::Span::pc, geoff_geometry::TOLERANCE, and geoff_geometry::Span::Transform().
References Add(), AddSpanID(), geoff_geometry::spVertex::p, geoff_geometry::spVertex::pc, geoff_geometry::spVertex::spanid, and geoff_geometry::spVertex::type.
Referenced by ChangeEnd(), ChangeStart(), geoff_geometry::eliminateLoops(), OffsetISOMethod(), OffsetMethod1(), Part(), Reduce(), and Split().
bool geoff_geometry::Kurve::Add | ( | int | type, |
const Point & | p0, | ||
const Point & | pc, | ||
bool | AddNullSpans = true |
||
) |
References geoff_geometry::Point::Dist(), Get(), m_nVertices, m_spans, m_started, Start(), and geoff_geometry::TOLERANCE.
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 | ||
) |
void geoff_geometry::Kurve::AddIndex | ( | int | vertexNumber, |
const SpanDataObject * | data | ||
) |
References geoff_geometry::FAILURE(), m_nVertices, and m_spans.
Referenced by Add().
void geoff_geometry::Kurve::AddSpanID | ( | int | ID | ) |
References m_nVertices, and m_spans.
Referenced by Add(), geoff_geometry::eliminateLoops(), FullCircle(), and OffsetMethod1().
double geoff_geometry::Kurve::Area | ( | ) | const |
References geoff_geometry::Span::angle, Closed(), geoff_geometry::FAILURE(), Get(), geoff_geometry::getMessage(), geoff_geometry::Matrix::GetScale(), m_nVertices, geoff_geometry::Span::p0, geoff_geometry::Span::p1, geoff_geometry::Span::pc, geoff_geometry::Span::radius, geoff_geometry::Point::x, and geoff_geometry::Point::y.
Referenced by OffsetMethod1().
int geoff_geometry::Kurve::Break | ( | double | atParam, |
const Kurve * | secInput, | ||
Kurve * | refOut, | ||
Kurve * | secOut | ||
) |
void geoff_geometry::Kurve::Clear | ( | void | ) |
References m_isReversed, m_nVertices, m_spans, and m_started.
Referenced by FullCircle(), operator=(), Start(), and ~Kurve().
bool geoff_geometry::Kurve::Closed | ( | ) | const |
References Get(), and m_nVertices.
Referenced by Area(), ChangeStart(), OffsetMethod1(), and Part().
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.
int geoff_geometry::Kurve::Get | ( | int | spannumber, |
Span & | sp, | ||
bool | returnSpanProperties = false , |
||
bool | transform = false |
||
) | const |
References geoff_geometry::Span::dir, geoff_geometry::FAILURE(), Get(), geoff_geometry::getMessage(), GetSpanID(), geoff_geometry::Span::ID, m_isReversed, m_nVertices, m_spans, geoff_geometry::Matrix::m_unit, geoff_geometry::Point::ok, geoff_geometry::Span::p0, geoff_geometry::Span::p1, geoff_geometry::Span::pc, geoff_geometry::Span::SetProperties(), geoff_geometry::Span::Transform(), geoff_geometry::Point::x, and geoff_geometry::Point::y.
References Get().
References Get(), GetSpanID(), geoff_geometry::spVertex::p, geoff_geometry::spVertex::pc, geoff_geometry::spVertex::spanid, and geoff_geometry::spVertex::type.
Referenced by Add(), Area(), ChangeEnd(), ChangeStart(), Closed(), geoff_geometry::DoesIntersInterfere(), geoff_geometry::eliminateLoops(), Get(), Intof(), minmax(), Near(), NearToVertex(), OffsetISOMethod(), OffsetMethod1(), operator==(), Part(), Perim(), Reduce(), Reverse(), Split(), and StoreAllSpans().
References Get(), m_nVertices, geoff_geometry::Span::p0, and geoff_geometry::Span::p1.
put all spans to vector
References Get(), nSpans(), and geoff_geometry::Span::NullSpan.
const SpanDataObject * geoff_geometry::Kurve::GetIndex | ( | int | vertexNumber | ) | const |
References geoff_geometry::FAILURE(), m_nVertices, and m_spans.
Referenced by Add().
double geoff_geometry::Kurve::GetLength | ( | ) | const |
References Perim().
References geoff_geometry::FAILURE(), geoff_geometry::getMessage(), m_isReversed, m_nVertices, and m_spans.
Referenced by geoff_geometry::eliminateLoops(), Get(), and Reverse().
int geoff_geometry::Kurve::IntExtWire | ( | Kurve & | kSec, |
double | Ref, | ||
double | Sec, | ||
double | height, | ||
Kurve * | kOut | ||
) |
References geoff_geometry::Dist(), Get(), Intof(), nSpans(), and geoff_geometry::TOLERANCE.
References geoff_geometry::bubblesort(), Get(), geoff_geometry::Span::Intof(), geoff_geometry::Span::length, nSpans(), geoff_geometry::Span::p1, and geoff_geometry::Span::SetProperties().
Referenced by Intof().
References geoff_geometry::Point::Dist(), Get(), geoff_geometry::Span::NearOn(), nSpans(), and geoff_geometry::TOLERANCE.
Referenced by Part().
References NearToVertex().
Referenced by NearToVertex().
int geoff_geometry::Kurve::nSpans | ( | ) | const |
References m_nVertices.
Referenced by Add(), ChangeEnd(), ChangeStart(), geoff_geometry::DoesIntersInterfere(), geoff_geometry::eliminateLoops(), Get(), Intof(), Near(), OffsetISOMethod(), OffsetMethod1(), operator==(), Part(), Reduce(), and StoreAllSpans().
int geoff_geometry::Kurve::OffsetMethod1 | ( | Kurve & | kOffset, |
double | off, | ||
int | direction, | ||
int | method, | ||
int & | ret | ||
) | const |
References Add(), AddSpanID(), Area(), Closed(), geoff_geometry::Span::dir, geoff_geometry::Point::Dist(), geoff_geometry::eliminateLoops(), geoff_geometry::FAILURE(), Get(), geoff_geometry::Matrix::GetScale(), geoff_geometry::Span::ID, geoff_geometry::Span::Intof(), geoff_geometry::Matrix::m_mirrored, m_nVertices, m_started, geoff_geometry::Matrix::Matrix(), geoff_geometry::NO_ELIMINATION, nSpans(), geoff_geometry::Span::NullSpan, geoff_geometry::Span::Offset(), draftfunctions.offset::offset(), geoff_geometry::Span::p0, geoff_geometry::Span::p1, geoff_geometry::Span::pc, Replace(), geoff_geometry::ROLL_AROUND, Start(), geoff_geometry::TOLERANCE, geoff_geometry::Span::ve, and geoff_geometry::Span::vs.
Referenced by CCurve::Offset(), and Offset().
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().
void geoff_geometry::Kurve::Part | ( | double | fromParam, |
double | toParam, | ||
const Kurve * | secInput, | ||
Kurve * | refOut, | ||
Kurve * | secOut | ||
) |
double geoff_geometry::Kurve::Perim | ( | ) | const |
References geoff_geometry::Span::angle, geoff_geometry::FAILURE(), Get(), geoff_geometry::getMessage(), geoff_geometry::Matrix::GetScale(), geoff_geometry::Span::length, m_nVertices, and geoff_geometry::Span::radius.
Referenced by GetLength(), and Part().
int geoff_geometry::Kurve::Reduce | ( | double | tolerance | ) |
References geoff_geometry::spVertex::p, geoff_geometry::spVertex::pc, Replace(), geoff_geometry::spVertex::spanid, and geoff_geometry::spVertex::type.
Referenced by OffsetMethod1(), Replace(), and Reverse().
void geoff_geometry::Kurve::Replace | ( | int | vertexnumber, |
int | type, | ||
const Point & | p, | ||
const Point & | pc, | ||
int | ID = UNMARKED |
||
) |
References geoff_geometry::FAILURE(), geoff_geometry::getMessage(), m_nVertices, and m_spans.
void geoff_geometry::Kurve::Reverse | ( | ) |
References Get(), GetSpanID(), m_nVertices, and Replace().
References m_isReversed.
void geoff_geometry::Kurve::SetZ | ( | double | z | ) |
References geoff_geometry::Matrix::e, and geoff_geometry::Matrix::m_unit.
void geoff_geometry::Kurve::Spiral | ( | const Point & | centre, |
double | startAngle, | ||
double | startRadius, | ||
double | radiusRisePerRevolution, | ||
double | endRadius | ||
) |
bool geoff_geometry::Kurve::Split | ( | double | MaximumRadius, |
double | reslution | ||
) |
References Add(), geoff_geometry::Span::dir, Get(), m_nVertices, geoff_geometry::Span::p0, geoff_geometry::Span::p1, geoff_geometry::Span::pc, geoff_geometry::Span::radius, geoff_geometry::Span::SetProperties(), geoff_geometry::Span::Split(), geoff_geometry::Span::SplitMatrix(), Start(), and geoff_geometry::Point::Transform().
void geoff_geometry::Kurve::Start | ( | ) |
References Clear(), and m_started.
Referenced by Add(), PathScripts.PathDressupDogbone.Chord::arcCommand(), PathScripts.PathDressupDogbone.Chord::asLine(), PathScripts.PathDressupDogbone.Chord::asVector(), femtaskpanels.task_solver_ccxtools._TaskPanel::calculixFinished(), ChangeEnd(), ChangeStart(), femtaskpanels.task_solver_ccxtools._TaskPanel::check_prerequisites_helper(), femtaskpanels.task_mesh_gmsh._TaskPanel::console_log(), geoff_geometry::eliminateLoops(), femtaskpanels.task_solver_ccxtools._TaskPanel::femConsoleMessage(), FullCircle(), PathScripts.PathDressupDogbone.Chord::isANoopMove(), PathScripts.PathDressupDogbone.Chord::isAPlungeMove(), OffsetISOMethod(), OffsetMethod1(), Part(), Reduce(), femtaskpanels.task_solver_ccxtools._TaskPanel::runCalculix(), Split(), Start(), femtaskpanels.task_mesh_gmsh._TaskPanel::update_timer_text(), and femtaskpanels.task_solver_ccxtools._TaskPanel::UpdateText().
void geoff_geometry::Kurve::Start | ( | const Point & | p | ) |
References Add(), and Start().
Referenced by PathScripts.PathDressupDogbone.Chord::arcCommand(), PathScripts.PathDressupDogbone.Chord::asLine(), PathScripts.PathDressupDogbone.Chord::asVector(), femtaskpanels.task_solver_ccxtools._TaskPanel::calculixFinished(), femtaskpanels.task_solver_ccxtools._TaskPanel::check_prerequisites_helper(), femtaskpanels.task_mesh_gmsh._TaskPanel::console_log(), femtaskpanels.task_solver_ccxtools._TaskPanel::femConsoleMessage(), PathScripts.PathDressupDogbone.Chord::isANoopMove(), PathScripts.PathDressupDogbone.Chord::isAPlungeMove(), femtaskpanels.task_solver_ccxtools._TaskPanel::runCalculix(), femtaskpanels.task_mesh_gmsh._TaskPanel::update_timer_text(), and femtaskpanels.task_solver_ccxtools._TaskPanel::UpdateText().
void geoff_geometry::Kurve::StoreAllSpans | ( | std::vector< Span > & | kSpans | ) | const |
|
friend |
|
friend |
|
protected |
Referenced by Clear(), Get(), GetSpanID(), Kurve(), operator=(), and Reverse().
|
protected |
Referenced by Add(), AddIndex(), AddSpanID(), Area(), Clear(), Closed(), Get(), GetIndex(), GetSpanID(), Kurve(), minmax(), NearToVertex(), nSpans(), OffsetMethod1(), operator=(), Perim(), Reduce(), Replace(), Reverse(), and Split().
|
protected |
Referenced by Add(), AddIndex(), AddSpanID(), Clear(), Get(), GetIndex(), GetSpanID(), Kurve(), operator=(), and Replace().
|
protected |
Referenced by Add(), Clear(), Kurve(), OffsetMethod1(), operator=(), Part(), Start(), and Started().