def patternPrimWithNeigborsPatternsPrims(pat, prim, groupOfPrims): reload(GeoMath) reload(BoundingBox) prims = groupOfPrims.keys() primsConected = GeoMath.getConnectedPrims(prim, prims) pattern_bounding_box = BoundingBox.BoundingBox2D(pat.getPoints(), prim) for primConected in primsConected: if(primConected != prim): gr = groupOfPrims[primConected] for patInGr in gr: param_pattern_bounding_box = BoundingBox.BoundingBox2D(patInGr.getPoints(), prim) intersections, shared_prims_edges = pattern_bounding_box.intersect_bounding_box_with_limits_3D(param_pattern_bounding_box) # @UnusedVariable if (intersections): # Check if it is true that intersect edges = GeoMath.getEdgesBetweenPoints(patInGr.getPoints(), pat.getPoints(), 1) if(edges): return False return True
def patternPrimWithNeigborsPatternsPrims(pat, prim, groupOfPrims): reload(GeoMath) reload(BoundingBox) prims = groupOfPrims.keys() primsConected = GeoMath.getConnectedPrims(prim, prims) pattern_bounding_box = BoundingBox.BoundingBox2D(pat.getPoints(), prim) for primConected in primsConected: if (primConected != prim): gr = groupOfPrims[primConected] for patInGr in gr: param_pattern_bounding_box = BoundingBox.BoundingBox2D( patInGr.getPoints(), prim) intersections, shared_prims_edges = pattern_bounding_box.intersect_bounding_box_with_limits_3D( param_pattern_bounding_box) # @UnusedVariable if (intersections): # Check if it is true that intersect edges = GeoMath.getEdgesBetweenPoints( patInGr.getPoints(), pat.getPoints(), 1) if (edges): return False return True