24#include <boost/test/unit_test.hpp>
46int circlePrimitiveSegmentCount(
double aDiameterMm )
60 pushValue( prim, 1.0 );
61 pushValue( prim, aDiameterMm );
62 pushValue( prim, 0.0 );
63 pushValue( prim, 0.0 );
66 prim.ConvertBasicShapeToPolygon( ¯o, buffer );
80 int smallCount = circlePrimitiveSegmentCount( 0.2 );
81 int largeCount = circlePrimitiveSegmentCount( 20.0 );
84 BOOST_CHECK_GT( largeCount, smallCount );
88 BOOST_CHECK_GE( smallCount, 8 );
109 D_CODE* dcode =
image.GetDCODEOrCreate( 10,
true );
116 emptyMacro.
m_AmName = wxT(
"EMPTY_TEST_MACRO" );
Hold a parameter value for an "aperture macro" as defined within standard RS274X.
void PushOperator(parm_item_type aType, double aValue)
Add an operator/operand to the current stack.
An aperture macro primitive as given in gerber layer format doc.
AM_PARAMS m_Params
A sequence of parameters used by the primitive.
Support the "aperture macro" defined within standard RS274X.
wxString m_AmName
The name of the aperture macro as defined like AMVB_RECTANGLE* (name is VB_RECTANGLE)
SHAPE_POLY_SET * GetApertureMacroShape(const GERBER_DRAW_ITEM *aParent, const VECTOR2I &aShapePos)
Calculate the primitive shape for flashed items.
A gerber DCODE (also called Aperture) definition.
void SetMacro(APERTURE_MACRO *aMacro)
APERTURE_T m_ApertType
Aperture type ( Line, rectangle, circle, oval poly, macro )
void ConvertShapeToPolygon(const GERBER_DRAW_ITEM *aParent)
Convert a shape to an equivalent polygon.
GBR_BASIC_SHAPE_TYPE m_ShapeType
Hold the image data and parameters for one gerber file and layer parameters.
int PointCount() const
Return the number of points (vertices) in this line chain.
Represent a set of closed polygons.
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
int OutlineCount() const
Return the number of outlines in the set.
BOOST_AUTO_TEST_CASE(CirclePrimitiveTessellationScalesWithSize)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I