jmarkus
Mechanical
- Jul 11, 2001
- 377
I have a journal that identifies the start and end point of a line, and checks to see if it is in a specific area on the drawing sheet bounded by X1(i),Y1(i) & X2(i),Y2(i) and then adds it to a collection:
I would like to do the same with splines, but they don't have explicit start and end points, and it is possible that the middle of the spline could fall inside the area even if the end points do not.
How can I do something similar with splines?
Thanks,
Jeff
Code:
Dim theLine As Line = CType(obj, Line)
' Check if both endpoints are within the specified region
If (theLine.startPoint.X >= X1(i) AndAlso theLine.startPoint.X <= X2(i) AndAlso theLine.startPoint.Y >= Y1(i) AndAlso theLine.startPoint.Y <= Y2(i)) AndAlso
(theLine.endPoint.X >= X1(i) AndAlso theLine.endPoint.X <= X2(i) AndAlso theLine.endPoint.Y >= Y1(i) AndAlso theLine.endPoint.Y <= Y2(i)) Then
DraftingObject.Add(theLine))
End If
I would like to do the same with splines, but they don't have explicit start and end points, and it is possible that the middle of the spline could fall inside the area even if the end points do not.
How can I do something similar with splines?
Thanks,
Jeff