|
xmsmesh
1.0
|
Offsets a polyline (in or out). The polyline forms a closed loop. More...
Public Member Functions | |
| MePolyOffsetterImpl () | |
| constructor | |
| virtual bool | Offset (const std::vector< Pt3d > &a_input, MePolyOffsetter::polytype a_pType, MePolyOffsetterOutput &a_output, double a_xyTol) override |
| Takes an input polyline and offsets it based on the distance of the segments that make up the polyline. More... | |
| bool | Offset (const std::vector< Pt3d > &a_input, MePolyOffsetter::polytype a_pType, std::vector< std::vector< Pt3d >> &a_output, std::vector< MePolyOffsetter::polytype > &a_outPolyType) |
| Takes an input polyline and offsets it based on the distance of the segments that make up the polyline. More... | |
| bool | DoOffset (const std::vector< Pt3d > &a_input) |
| buffers the polygon More... | |
| void | CheckToAddPoint (std::vector< Pt3d > &a_result, const Pt3d &a_pt) |
| checks to see if a point can be added to the resulting line More... | |
| void | ProcessAngleSegmentEnd (int npt_end, double ang_end, int in1, int in2, int in3, double dx1, double dy1, const Pt3d *pts, std::vector< Pt3d > &a_result) |
| handles inserting points around the end of a segment. More... | |
| void | SpecialRejection (const std::vector< Pt3d > &a_input, std::vector< Pt3d > &a_output) |
| a special case for removing points. More... | |
| void | SelfIntersection (std::vector< Pt3d > &a_pLine) |
| Self intersection of a polyline. More... | |
| void | FindDuplicatesAndOrderLoops (const std::vector< Pt3d > &a_input) |
| Finds duplicate points and orders the loops. More... | |
Public Attributes | |
| double | m_xyTol |
| tolerance for geometric comparisons | |
| bool | m_setOffsetToZero |
| flag used in testing | |
| BSHP< MePolyCleaner > | m_intersector |
| class to clean the offset from the polygon | |
| MePolyOffsetter::polytype | m_pType |
| the type of polygon being offset | |
| MePolyOffsetterOutput | m_output |
| the new polygons created by this class | |
Additional Inherited Members | |
Public Types inherited from xms::MePolyOffsetter | |
| enum | polytype { OUTSIDE_POLY = 0, INSIDE_POLY, NEWOUT_POLY } |
| enum to identify types of polygons created by this class | |
Static Public Member Functions inherited from xms::MePolyOffsetter | |
| static BSHP< MePolyOffsetter > | New () |
| Creates a BufferPoly class. More... | |
Offsets a polyline (in or out). The polyline forms a closed loop.
Definition at line 40 of file MePolyOffsetter.cpp.
| void xms::MePolyOffsetterImpl::CheckToAddPoint | ( | std::vector< Pt3d > & | a_result, |
| const Pt3d & | a_pt | ||
| ) |
checks to see if a point can be added to the resulting line
| a_result | ??? |
| a_pt | The point. |
Definition at line 262 of file MePolyOffsetter.cpp.
Referenced by DoOffset(), and ProcessAngleSegmentEnd().
| bool xms::MePolyOffsetterImpl::DoOffset | ( | const std::vector< Pt3d > & | a_input | ) |
buffers the polygon
| [in] | a_input | ??? |
Definition at line 185 of file MePolyOffsetter.cpp.
References CheckToAddPoint(), EQ_TOL(), FindDuplicatesAndOrderLoops(), FOURPIOVER3, gmAngleBetween2DVectors(), gmEqualPointsXY(), m_xyTol, PIOVER6, ProcessAngleSegmentEnd(), SelfIntersection(), SEVENPIOVER3, SIN60, SpecialRejection(), TWOPI, xms::Pt3< T >::x, xms::Pt3< T >::y, and xms::Pt3< T >::z.
Referenced by Offset().
| void xms::MePolyOffsetterImpl::FindDuplicatesAndOrderLoops | ( | const std::vector< Pt3d > & | a_input | ) |
Finds duplicate points and orders the loops.
| [in] | a_input | Vector of point locations |
Definition at line 413 of file MePolyOffsetter.cpp.
References xms::MePolyOffsetterOutput::m_loops, m_output, and xms::MePolyOffsetterOutput::m_pts.
Referenced by DoOffset().
|
overridevirtual |
Takes an input polyline and offsets it based on the distance of the segments that make up the polyline.
| a_input | The input polyline. |
| a_pType | The type of polygon: outside polygon or inside polygon |
| a_out | The offset of the input polyline. This can be multiple polylines |
| a_xyTol | Tolerance for x,y plane for coincident points. |
Definition at line 125 of file MePolyOffsetter.cpp.
References DoOffset(), m_output, m_pType, and m_xyTol.
Referenced by MePolyOffsetterUnitTests::testBox0(), MePolyOffsetterUnitTests::testBox1(), MePolyOffsetterUnitTests::testBox1a(), MePolyOffsetterUnitTests::testCase1(), MePolyOffsetterUnitTests::testCase1a(), and MePolyOffsetterUnitTests::testCase1b().
| bool xms::MePolyOffsetterImpl::Offset | ( | const std::vector< Pt3d > & | a_input, |
| MePolyOffsetter::polytype | a_pType, | ||
| std::vector< std::vector< Pt3d >> & | a_output, | ||
| std::vector< MePolyOffsetter::polytype > & | a_outPolyType | ||
| ) |
Takes an input polyline and offsets it based on the distance of the segments that make up the polyline.
| a_input | The input polyline. |
| a_pType | The type of polygon: outside polygon or inside polygon |
| a_output | The offset of the input polyline. This can be multiple polylines |
| a_outPolyType | The type of polygon in a_output it is either: OUTSIDE_POLY or INSIDE_POLY |
Definition at line 149 of file MePolyOffsetter.cpp.
References DoOffset(), xms::MePolyOffsetterOutput::m_loops, xms::MePolyOffsetterOutput::m_loopTypes, m_output, xms::MePolyOffsetterOutput::m_pts, and m_pType.
| void xms::MePolyOffsetterImpl::ProcessAngleSegmentEnd | ( | int | npt_end, |
| double | ang_end, | ||
| int | in1, | ||
| int | in2, | ||
| int | in3, | ||
| double | dx1, | ||
| double | dy1, | ||
| const Pt3d * | pts, | ||
| std::vector< Pt3d > & | a_result | ||
| ) |
handles inserting points around the end of a segment.
| [in] | npt_end | ??? |
| [in] | ang_end | ??? |
| [in] | in1 | ??? |
| [in] | in2 | ??? |
| [in] | in3 | ??? |
| [in] | dx1 | ??? |
| [in] | dy1 | ??? |
| [in] | pts | ??? |
| [in] | a_result | ??? |
Definition at line 278 of file MePolyOffsetter.cpp.
References CheckToAddPoint(), Mdist(), PIOVER3, PIOVER6, SIN60, TWOPIOVER3, xms::Pt3< T >::x, xms::Pt3< T >::y, and xms::Pt3< T >::z.
Referenced by DoOffset().
| void xms::MePolyOffsetterImpl::SelfIntersection | ( | std::vector< Pt3d > & | a_pLine | ) |
Self intersection of a polyline.
| a_pLine | The polyline. |
Definition at line 405 of file MePolyOffsetter.cpp.
References m_intersector, m_output, m_pType, and m_xyTol.
Referenced by DoOffset().
| void xms::MePolyOffsetterImpl::SpecialRejection | ( | const std::vector< Pt3d > & | a_input, |
| std::vector< Pt3d > & | a_out | ||
| ) |
a special case for removing points.
| [in] | a_input | ??? |
| a_out | ??? |
Definition at line 377 of file MePolyOffsetter.cpp.
References gmPointInTriangleWithTol(), and m_xyTol.
Referenced by DoOffset().