Using KiCAD nightly from 2020/3/20
I’m working out exactly how to create each type of DRAWSEGMENT and will use this thread to work through all the details.
- Where did DRAWSEGMENT.SetRadius() go? This is used to set the radius of a circle. It is in neither the documentation nor the nightly from 2020/3/20. Edit: actually, this may not have existed. I’ve identified code that apparently uses it, but if it ever executed it should have caused an error (using S_CIRCLE instead of pcbnew.S_CIRCLE). The gist of the question remains: how do I create a drawsegment of type S_CIRCLE?
- What is SetType? Can anyone verify it’s within the set of S_ values (S_ARC, S_CIRCLE, S_CURVE, S_LAST, S_POLYGON, S_RECT, S_SEGMENT)
- What is initialization argument idtype=PCB_LINE_T. The other PCB_ values are (PCB_DIMENSION_T, PCB_IO, PCB_ITEM_LIST_T, PCB_LAYER_ID_COUNT, PCB_LINE_T, PCB_MARKER_T, PCB_MODULE_EDGE_T, PCB_MODULE_T, PCB_MODULE_TEXT_T, PCB_NETINFO_T, PCB_PAD_T, PCB_PLOT_PARAMS, PCB_PLOT_PARAMS_GetGerberDefaultPrecision, PCB_SEGZONE_T, PCB_T, PCB_TARGET, PCB_TARGET_ClassOf, PCB_TARGET_T, PCB_TEXT_T, PCB_TRACE_T, PCB_VIA_T, PCB_ZONE_AREA_T)
- There is an IsPolygonFilled but no SetPolygonFilled. How do you create a filled polygon or an unfilled polygon?
- What is SetPolyShape? It seems to use argument of type SHAPE_POLY_SET. The only other place this type is used is in TransformShapeWithClearanceToPolygon() for an argument called aCornerBuffer. It appears to be a fully fledged class (and not an integer like the S_ attributes are).
- There is a SetPolyPoints() but not GetPolyPoints() function. However, there is a BuildPolyPointsList() (which returns a wxPoint_Vector). Are these equivalent to the Set/Get pair of functions?