#include <users_modules/mortar_contact/src/clipper.hpp>
Definition at line 358 of file clipper.hpp.
◆ ClipperOffset()
ClipperLib::ClipperOffset::ClipperOffset |
( |
double |
miterLimit = 2.0 , |
|
|
double |
roundPrecision = 0.25 |
|
) |
| |
Definition at line 3815 of file clipper.cpp.
3820 newNode->Contour.push_back(path[
i]);
◆ ~ClipperOffset()
ClipperLib::ClipperOffset::~ClipperOffset |
( |
| ) |
|
◆ AddPath()
void ClipperLib::ClipperOffset::AddPath |
( |
const Path & |
path, |
|
|
JoinType |
joinType, |
|
|
EndType |
endType |
|
) |
| |
Definition at line 3838 of file clipper.cpp.
3849 for (Paths::size_type
i = 0;
i < paths.size(); ++
i)
3850 AddPath(paths[
i], joinType, endType);
◆ AddPaths()
void ClipperLib::ClipperOffset::AddPaths |
( |
const Paths & |
paths, |
|
|
JoinType |
joinType, |
|
|
EndType |
endType |
|
) |
| |
◆ Clear()
void ClipperLib::ClipperOffset::Clear |
( |
| ) |
|
◆ DoMiter()
void ClipperLib::ClipperOffset::DoMiter |
( |
int |
j, |
|
|
int |
k, |
|
|
double |
r |
|
) |
| |
|
private |
Definition at line 4217 of file clipper.cpp.
4219 OutRec* outrec = m_PolyOuts[
i++];
4220 OutPt* op = outrec->Pts;
4221 if (!op || outrec->IsOpen)
continue;
◆ DoOffset()
void ClipperLib::ClipperOffset::DoOffset |
( |
double |
delta | ) |
|
|
private |
Definition at line 3987 of file clipper.cpp.
4000 if (node.m_jointype ==
jtRound)
4002 double X = 1.0, Y = 0.0;
4003 for (
cInt j = 1;
j <= steps;
j++)
4015 double X = -1.0, Y = -1.0;
4016 for (
int j = 0;
j < 4; ++
j)
4022 else if (Y < 0) Y = 1;
4032 for (
int j = 0;
j < len - 1; ++
j)
4042 for (
int j = 0;
j < len; ++
j)
4049 for (
int j = 0;
j < len; ++
j)
4055 for (
int j = len - 1;
j > 0;
j--)
4059 for (
int j = len - 1;
j >= 0;
j--)
4066 for (
int j = 1;
j < len - 1; ++
j)
4093 for (
int j = len - 1;
j > 0;
j--)
◆ DoRound()
void ClipperLib::ClipperOffset::DoRound |
( |
int |
j, |
|
|
int |
k |
|
) |
| |
|
private |
Definition at line 4225 of file clipper.cpp.
4227 if ((op->Pt == op2->Pt) && op2->Next != op && op2->Prev != op)
4230 OutPt* op3 = op->Prev;
4231 OutPt* op4 = op2->Prev;
4238 OutRec* outrec2 = CreateOutRec();
4244 outrec2->IsHole = !outrec->IsHole;
◆ DoSquare()
void ClipperLib::ClipperOffset::DoSquare |
( |
int |
j, |
|
|
int |
k |
|
) |
| |
|
private |
◆ Execute() [1/2]
void ClipperLib::ClipperOffset::Execute |
( |
Paths & |
solution, |
|
|
double |
delta |
|
) |
| |
Definition at line 3916 of file clipper.cpp.
3925 IntRect
r = clpr.GetBounds();
3927 outer[0] = IntPoint(
r.left - 10,
r.bottom + 10);
3928 outer[1] = IntPoint(
r.right + 10,
r.bottom + 10);
3929 outer[2] = IntPoint(
r.right + 10,
r.top - 10);
3930 outer[3] = IntPoint(
r.left - 10,
r.top - 10);
3933 clpr.ReverseSolution(
true);
3936 if (solution.ChildCount() == 1 && solution.Childs[0]->ChildCount() > 0)
3938 PolyNode* outerNode = solution.Childs[0];
3939 solution.Childs.reserve(outerNode->ChildCount());
3940 solution.Childs[0] = outerNode->Childs[0];
3941 solution.Childs[0]->Parent = outerNode->Parent;
3942 for (
int i = 1;
i < outerNode->ChildCount(); ++
i)
3943 solution.AddChild(*outerNode->Childs[
i]);
◆ Execute() [2/2]
void ClipperLib::ClipperOffset::Execute |
( |
PolyTree & |
solution, |
|
|
double |
delta |
|
) |
| |
Definition at line 3946 of file clipper.cpp.
3979 double steps =
pi / std::acos(1 - y / std::fabs(
delta));
3980 if (steps > std::fabs(
delta) *
pi)
3981 steps = std::fabs(
delta) *
pi;
◆ FixOrientations()
void ClipperLib::ClipperOffset::FixOrientations |
( |
| ) |
|
|
private |
Definition at line 3890 of file clipper.cpp.
3895 IntRect
r = clpr.GetBounds();
3897 outer[0] = IntPoint(
r.left - 10,
r.bottom + 10);
3898 outer[1] = IntPoint(
r.right + 10,
r.bottom + 10);
3899 outer[2] = IntPoint(
r.right + 10,
r.top - 10);
3900 outer[3] = IntPoint(
r.left - 10,
r.top - 10);
3903 clpr.ReverseSolution(
true);
3905 if (solution.size() > 0) solution.erase(solution.begin());
◆ OffsetPoint()
void ClipperLib::ClipperOffset::OffsetPoint |
( |
int |
j, |
|
|
int & |
k, |
|
|
JoinType |
jointype |
|
) |
| |
|
private |
Definition at line 4160 of file clipper.cpp.
4170 double dx = std::tan(std::atan2(
m_sinA,
4196 for (
int i = 0;
i < steps; ++
i)
◆ ArcTolerance
double ClipperLib::ClipperOffset::ArcTolerance |
◆ m_cos
double ClipperLib::ClipperOffset::m_cos |
|
private |
◆ m_delta
double ClipperLib::ClipperOffset::m_delta |
|
private |
◆ m_destPoly
Path ClipperLib::ClipperOffset::m_destPoly |
|
private |
◆ m_destPolys
Paths ClipperLib::ClipperOffset::m_destPolys |
|
private |
◆ m_lowest
IntPoint ClipperLib::ClipperOffset::m_lowest |
|
private |
◆ m_miterLim
double ClipperLib::ClipperOffset::m_miterLim |
|
private |
◆ m_normals
std::vector<DoublePoint> ClipperLib::ClipperOffset::m_normals |
|
private |
◆ m_polyNodes
PolyNode ClipperLib::ClipperOffset::m_polyNodes |
|
private |
◆ m_sin
double ClipperLib::ClipperOffset::m_sin |
|
private |
◆ m_sinA
double ClipperLib::ClipperOffset::m_sinA |
|
private |
◆ m_srcPoly
Path ClipperLib::ClipperOffset::m_srcPoly |
|
private |
◆ m_StepsPerRad
double ClipperLib::ClipperOffset::m_StepsPerRad |
|
private |
◆ MiterLimit
double ClipperLib::ClipperOffset::MiterLimit |
The documentation for this class was generated from the following files: