LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding regions of self-intersecting polygon

Hi,

I'm trying to split self intersecting polygon into sub polygons and assign a property polarity (positive and negative) to each sub polygon.

 

The idea is to find how a complex track on PCB is picking EMI from electromagnetic field.  Each track on PCB is forming a closed loop with GND wire and the self intersecting segments of the loop have cancelling effect on the EMI. Here is the initial polygon formed by some signal track and GND:

Self intersecting polygon.png

 

and here is what I need  - two arrays of polygons(Poly_A and Poly_B)  for positive and negative sections, each polygon is a cluster comprising:

- array of points for the polygon line

- property "polarity"

Get subpolygons.png

Note: For illustration purposes the self intersecting polygon in the example above is simplified

 

The polarity property could be defined like this:

- the sub polygon which starts with the origin of the initial polygon has positive polarity.

- each next door sub polygon has opposite polarity

 

There is existing LV "Polygon area.vi" which is calculating the area of the polygon by taking in account the self intersections. Technically if the field is uniform the area size of the polygon is proportional to the EMI noises so Polygon area.vi is what I need.  Unfortunately in my case the electromagnetic field is not uniform so I need to do more complex calculations which require the exact location of vertices for each sub polygon section and the polarity of this section.

 

Any suggestions and ideas will be appreciated. Thank you. 

0 Kudos
Message 1 of 3
(4,231 Views)

Are the lines always parallel to either x or y or is everything allowed (e..g. a figure 8, the track of a rollercoaster, the picture here, etc.)

How many line segments do you typically have (i.e. is performance an issues due to the magnitude of the problem).

 

Can you attach a typical dataset?

 

0 Kudos
Message 2 of 3
(4,174 Views)

Hi Altenbach,

The lines are not always parallel / perpendicular but in some particular designs they are, so you can't rely on this as a rule, lines could be any angle.

See a set of lines generated from real PCB.

data lines intersecting.png

 

 The typical number of points for each line is less than 50-60 points so performance should not be an issue.  

0 Kudos
Message 3 of 3
(4,161 Views)