Is there is any way to get perpendicular points on both sides of a polyline at a specified distance?
I tried to offset the polyline (PL) on both directions as (PL1 & PL2) but still confused how to get a perpendicular point on PL1 & PL2 with a given point on PL.
Your inputs will be much appreciated.
Solved! Go to Solution.
You can use the GetFirstDerivative() method to get the direction
of the tangent vector at a given point on the polyline, which is
at a right angle with the perpendiuclar vector.
AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011
Goal achieved using the below function.
Shared Function PolarPoint(ByVal BasePoint As Point3d, ByVal angle As Double, ByVal distance As Double) As Point3d
Dim x As Double = distance * Sin(angle)
Dim y As Double = distance * Cos(angle)
Return New Point3d(BasePoint.X - x, BasePoint.Y + y, BasePoint.Z)
I am not familiar with GetFirstDerivative() method. Certainly I will look at it how it goes.
Thanks a lot.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register