Hi all,
i try to get a endpoints of a Polyline segment from polyline selfintersection.
Any tip to check if a line contains a point is welcome.
Hi all,
i try to get a endpoints of a Polyline segment from polyline selfintersection.
Any tip to check if a line contains a point is welcome.
Many ways -
rhinoscriptsyntax
rs.IsPointOnCurve()
RhinoCommon
Line.MinimumDistanceTo(Point3d)<tolerance (usually model absolute tolerance)
The classic way to do this between pretty much any object and a given point is to use a ClosestPoint() method - which is available for many objects - and check to see if the distance between the closest point and the test point is less than the desired tolerance.
HTH, --Mitch
Thansk for that tip.
it works but it gives me all lines where a point is near a line in the given tolerance.
so i have to count how often per line to get lines wehere more than one point is near.
Is there a option to work directly with the intersection event to get the line wehre more the one intersection occures?
Hmm, I don’t understand that, you are testing one point and one curve/line in any given iteration as far as I know…
sorry for my bad example
in the picture you can see what i try. I try to get the endpoints of a polyline segment with more than one selfintersection to translate this segment.
In the long run here is a picture of my current python exercise a rougthing path generator.
I want to transform the intersection lines between the endpoints of the zigzag linegroups in z direction and later on also the intesection lines with the contour.
I can also pregroup the the endpoints of the zigzag point pair groups.
Because i am a absolut nub to programming any tip is very welcome no matter what constructive critc i get.