← Back to team overview

kicad-developers team mailing list archive

Re: pcbnew - no grid zone - thermal connections


Rok Markovic a écrit :

I must say that the new zone system is very good.

There is something that bothers me. Thermal pattern for smd
pads, usualy for SO packages is a bit ugly. I would like to
improve thermal patterns handling and I am going to made a

Drawing zones:
- Compute m_FilledPolygon with all Pads excluded except for
PAD_IN_ZONE, which is of course included.
- Compute and remove Isolated and unconected islands which are smaller
than area specified in the dialog_zone_settings via new variable.

This is already done.
- Do something similiar as in GenrePadConection()
- Final RemoveIsolatedAndUnconnected islands.

I would like to know two things:
1. How to compute area in kbool polygons

kbool is a *very* powerfull library

polygon/kbool/samples/boolonly has a useful example. (see also kbool/include/kbool/booleng.h and its comments)

1 - create a bool engine instance
see void ArmBoolEng( Bool_Engine* aBooleng, bool aConvertHoles ) in polygon/PolyLine.cpp

a " Bool_Engine" has 2 polygons buffers: GROUP_A and GROUP_B
for operation involving only one polygon GROUP_A is used (shrink smooth ..) for operation involving two polygon GROUP_A and GROUP_B are used ( AND OR (ADD) XOR SUBSTRACT... operations)

2 - enter main polygon(s) (like area outline) in GROUP_A
3 - enter polygons to ADD , SUBSTRACT ... in GROUP_B, polugon by polygon
4 - Call Do_Operation()
5 - read the resulting polygon(s)

see zones_convert_brd_items_to_polygons.cpp as an example.

2. How to determin if the point is inside or outside of the polygon

See my last update:
polygon/polygon_test_point_inside.cpp (updated comments inside) and polygon/determine_if_point_inside_polygon.odt

First one is not mandatory but will improve zone look.

Second information I need for computing which thermal connection is
actually connected to the zone.

I hope I will improve zone drawing (from good to a bit better).


Jean-Pierre CHARRAS

Maître de conférences
Directeur d'études 2ieme année.
Génie Electrique et Informatique Industrielle 2
Institut Universitaire de Technologie 1 de Grenoble
BP 67, 38402 St Martin d'Heres Cedex

Recherche :
Rue de la Houille Blanche
38400 Saint Martin d'Heres

Follow ups