.NET

Reply
Contributor
Prajith76
Posts: 17
Registered: ‎06-30-2010
Message 1 of 4 (607 Views)
Accepted Solution

Perpendicular Points on Polyline

607 Views, 3 Replies
07-19-2010 04:42 AM

Hi,

 

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.

 

Prajith.

Distinguished Contributor
joshuamodglin
Posts: 147
Registered: ‎08-15-2007
Message 2 of 4 (600 Views)

Re: Perpendicular Points on Polyline

07-19-2010 07:31 AM in reply to: Prajith76

Prajith,

 

Do a search for 'Polar' points in this Forum. This should provide you the answer you are looking for.

Josh Modglin
Advanced Technologies Solutions Logo
Valued Mentor
caddzone
Posts: 305
Registered: ‎01-26-2005
Message 3 of 4 (592 Views)

Re: Perpendicular Points on Polyline

07-19-2010 08:56 AM in reply to: Prajith76

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


Contributor
Prajith76
Posts: 17
Registered: ‎06-30-2010
Message 4 of 4 (560 Views)

Re: Perpendicular Points on Polyline

07-20-2010 02:07 AM in reply to: Prajith76

Hi Friends,

 

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)
    End Function

 

Hi Tony,

I am not familiar with GetFirstDerivative() method. Certainly I will look at it how it goes.

 

Thanks a lot.

 

Prajith.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community