45 poly_no_hole.
Append( aPoly );
52 for(
int ii = 0; ii < poly_no_hole.
OutlineCount(); ++ii )
82 const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList )
88 if( aPrimitivesList.size() )
96 const std::vector<std::shared_ptr<PCB_SHAPE>>& aPrimitivesList )
99 for(
const std::shared_ptr<PCB_SHAPE>& prim : aPrimitivesList )
141 if( !primitive->IsProxyItem() )
142 primitive->TransformShapeToPolygon( polyset,
UNDEFINED_LAYER, 0, aError, aErrorLoc );
169 case PAD_SHAPE::RECTANGLE:
171 SHAPE_RECT rect( -padSize.
x / 2, -padSize.
y / 2, padSize.
x, padSize.
y );
177 case PAD_SHAPE::CIRCLE:
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
constexpr int ARC_HIGH_DEF
virtual const BOARD * GetBoard() const
Return the BOARD in which this BOARD_ITEM resides, or NULL if none.
Information pertinent to a Pcbnew printed circuit board.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
virtual void SetParent(EDA_ITEM *aParent)
void SetFilled(bool aFlag)
void SetPolyShape(const SHAPE_POLY_SET &aShape)
void SetShape(SHAPE_T aShape)
void SetPolyPoints(const std::vector< VECTOR2I > &aPoints)
void AddPrimitive(PCB_SHAPE *aShape, PCB_LAYER_ID aLayer)
Adds a custom shape primitive to the padstack.
void ForEachUniqueLayer(const std::function< void(PCB_LAYER_ID)> &aMethod) const
Runs the given callable for each active unique copper layer in this padstack, meaning F_Cu for MODE::...
void ClearPrimitives(PCB_LAYER_ID aLayer)
std::vector< std::shared_ptr< PCB_SHAPE > > & Primitives(PCB_LAYER_ID aLayer)
void MergePrimitivesAsPolygon(PCB_LAYER_ID aLayer, SHAPE_POLY_SET *aMergedPolygon, ERROR_LOC aErrorLoc=ERROR_INSIDE) const
Merge all basic shapes to a SHAPE_POLY_SET.
void AddPrimitivePoly(PCB_LAYER_ID aLayer, const SHAPE_POLY_SET &aPoly, int aThickness, bool aFilled)
Has meaning only for custom shape pads.
void DeletePrimitivesList(PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
Clear the basic shapes list.
void AddPrimitive(PCB_LAYER_ID aLayer, PCB_SHAPE *aPrimitive)
Add item to the custom shape primitives list.
void ReplacePrimitives(PCB_LAYER_ID aLayer, const std::vector< std::shared_ptr< PCB_SHAPE > > &aPrimitivesList)
Clear the current custom shape primitives list and import a new list.
void addPadPrimitivesToPolygon(PCB_LAYER_ID aLayer, SHAPE_POLY_SET *aMergedPolygon, int aError, ERROR_LOC aErrorLoc) const
void AppendPrimitives(PCB_LAYER_ID aLayer, const std::vector< std::shared_ptr< PCB_SHAPE > > &aPrimitivesList)
Import a custom shape primitive list (composed of basic shapes) and add items to the current list.
PAD_SHAPE GetAnchorPadShape(PCB_LAYER_ID aLayer) const
const VECTOR2I & GetSize(PCB_LAYER_ID aLayer) const
void SetStroke(const STROKE_PARAMS &aStroke) override
Represent a set of closed polygons.
void RemoveAllContours()
Remove all outlines & holes (clears) the polygon set.
bool HasHoles() const
Return true if the polygon set has any holes.
void Fracture(POLYGON_MODE aFastMode)
Convert a set of polygons with holes to a single outline with "slits"/"fractures" connecting the oute...
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new outline to the set and returns its index.
void BooleanAdd(const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode)
Perform boolean polyset union For aFastMode meaning, see function booleanOp.
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline)
void Simplify(POLYGON_MODE aFastMode)
Simplify the polyset (merges overlapping polys, eliminates degeneracy/self-intersections) For aFastMo...
int OutlineCount() const
Return the number of outlines in the set.
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
const SHAPE_LINE_CHAIN Outline() const
Simple container to manage line stroke parameters.
void TransformCircleToPolygon(SHAPE_LINE_CHAIN &aBuffer, const VECTOR2I &aCenter, int aRadius, int aError, ERROR_LOC aErrorLoc, int aMinSegCount=0)
Convert a circle to a polygon, using multiple straight lines.
PCB_LAYER_ID
A quick note on layer IDs:
VECTOR2< int32_t > VECTOR2I