Jump to content

VBA Line Intersection 2 Lines and Circle


gerrymott

Recommended Posts

Hi,

 

I'm trying to write a function in VBA that calculates the shortest continuous line that bisects 2 lines and a circle between them. I can calculate the line lengths and the included angle in VBA but can't figure out the other bit.

 

attachment.php?attachmentid=54746&cid=1&stc=1

 

Many thanks

Triangle.jpg

Link to comment
Share on other sites

You can use the intersectwith in VBA draw a line at an angel and slowly iterate it with a small angle till you get a answer

 

'an example you will need to do twice two lines and a temporary line
Set arcobj = Thisspace.AddArc(vertPt, cRad, endang, startang)
retval2 = arcobj.IntersectWith(oPoly, acExtendOtherEntity) 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...