protected override bool IsIntersectQualified(ObjectId sourceId, List <Point3d> sourceVertices, ObjectId targetId, List <Point3d> targetVertices, List <Point3d> intersectPoints, Transaction transaction) { var duplicate = PolygonIncludeSearcher.AreDuplicateEntities(sourceVertices, targetVertices); if (duplicate) { return(true); } return(false); }
protected override bool IsIntersectQualified(ObjectId sourceId, List <Point3d> sourceVertices, ObjectId targetId, List <Point3d> targetVertices, List <Point3d> intersectPoints, Transaction transaction) { var duplicateWithSource = PolygonIncludeSearcher.AreDuplicateEntities(sourceVertices, intersectPoints); var duplicateWithTarget = PolygonIncludeSearcher.AreDuplicateEntities(targetVertices, intersectPoints); // 确保它们不是软件认为的孔洞 if (duplicateWithSource && !duplicateWithTarget && PolygonHoleHelper.IsHoleReferenced(transaction, sourceId) || !duplicateWithSource && duplicateWithTarget && PolygonHoleHelper.IsHoleReferenced(transaction, targetId)) { return(false); } return(true); }
protected virtual bool IsIntersectQualified(ObjectId sourceId, List <Point3d> sourceVertices, ObjectId targetId, List <Point3d> targetVertices, List <Point3d> intersectPoints, Transaction transaction) { // 是否将包含的情况排除 if (ExceptInclude) { var duplicateWithSource = PolygonIncludeSearcher.AreDuplicateEntities(sourceVertices, intersectPoints); var duplicateWithTarget = PolygonIncludeSearcher.AreDuplicateEntities(targetVertices, intersectPoints); if (duplicateWithSource && !duplicateWithTarget || !duplicateWithSource && duplicateWithTarget) { return(false); } } return(true); }