desc.coils.CoilSet.is_self_intersecting
- CoilSet.is_self_intersecting(grid=None, tol=None)Source
Check if any coils in the CoilSet intersect.
By default, checks intersection by checking that for each point on a given coil the closest point in the coilset is on that same coil. If the closest point is on another coil, that indicates that the coils may be close to intersecting.
If instead the
tolargument is provided, then the function will check the minimum distance from each coil to each other coil against that tol and if it finds the minimum distance is less than thetol, it will take it as intersecting coils, returning True and raising a warning.NOTE: If grid resolution used is too low, this function may fail to return the correct answer.
- Parameters:
grid (Grid, optional) – Collocation grid containing the nodes to evaluate the coil positions at. If a list, must have the same structure as the coilset. Defaults to a LinearGrid(N=100)
tol (float, optional) – the tolerance (in meters) to check the intersections to, if points on any two coils are closer than this tolerance, then the function will return True and a warning will be raised. If not passed, then the method used to determine coilset intersection will be based off of checking that each point on a coil is closest to a point on the same coil, which does not rely on a
tolparameter.
- Returns:
is_self_intersecting (bool) – Whether or not any coils in the CoilSet come close enough to each other to possibly be intersecting.