Jump to content
Ahankhah

Locate a point on "Ellipse arc" to get chord of desired length

Recommended Posts

Ahankhah

Hi everyone,

 

is it possible to get a point on an "ellipse arc", in an specified distance to the start point of "ellipse arc"?

Share this post


Link to post
Share on other sites
rkmcswain
Hi everyone,

 

is it possible to get a point on an "ellipse arc", in an specified distance to the start point of "ellipse arc"?

 

How about something like this?

 


(setq sel (entsel))
(setq ent (car sel))
(setq obj (vlax-ename->vla-object ent))
(setq res (vlax-curve-getPointAtDist obj 2.0)) ;; where 2.0 is the desired distance

Share this post


Link to post
Share on other sites
Ahankhah
How about something like this?

 


(setq sel (entsel))
(setq ent (car sel))
(setq obj (vlax-ename->vla-object ent))
(setq res (vlax-curve-getPointAtDist obj 2.0)) ;; where 2.0 is the desired distance

 

R.K.McSwain, thank you very much for your prompt reply.

 

But unfortunately vlax-curve-getPointAtDist behaves like MEASURE command. It doesn't return the desired point. I want to find point on the curve with straight certain distance from its start point.

Share this post


Link to post
Share on other sites
rkmcswain
Hi everyone,

 

is it possible to get a point on an "ellipse arc", in an specified distance to the start point of "ellipse arc"?

 

But unfortunately vlax-curve-getPointAtDist ...... doesn't return the desired point. I want to find point on the curve with straight certain distance from its start point.

 

OK, you did not say that you wanted the straight linear distance in your original request.

 

Do you mean like in the image below?

 

point6.png

 

Then draw a circle from the startpoint with a radius = the desired distance, and then find the intersection of the elliptical arc and the circle.

Share this post


Link to post
Share on other sites
Ahankhah

Then draw a circle from the startpoint with a radius = the desired distance, and then find the intersection of the elliptical arc and the circle.

 

Thank you R.K.McSwain for the good offer, but...

 

Finding the intersection of two curves, this is the problem!

Share this post


Link to post
Share on other sites
rkmcswain

 

Finding the intersection of two curves, this is the problem!

 

Here is an example:

 


(setq a (car (entsel)))
(setq b (car (entsel)))
(foreach item (ACET-GEOM-INTERSECTWITH a b 3)
 (vl-cmdf "._circle" item (* 0.02 (getvar "viewsize")))
)

Share this post


Link to post
Share on other sites
lamensterms
Thank you R.K.McSwain for the good offer, but...

 

Finding the intersection of two curves, this is the problem!

 

if you cannot find the INT of two curves, you should certainly be able to trim one to the other. then used the end point.

 

good luck.

Share this post


Link to post
Share on other sites
Ahankhah
Here is an example:

 


(setq a (car (entsel)))
(setq b (car (entsel)))
(foreach item (ACET-GEOM-INTERSECTWITH a b 3)
(vl-cmdf "._circle" item (* 0.02 (getvar "viewsize")))
)

 

Nice and very good function: ACET-GEOM-INTERSECTWITH

 

R.K.McSwain, I appreciate your great help:D.

Edited by Ahankhah

Share this post


Link to post
Share on other sites
Ahankhah
if you cannot find the INT of two curves, you should certainly be able to trim one to the other. then used the end point.

 

good luck.

lamensterms, your method works very good in lack of express tools. Thank you very much.

Share this post


Link to post
Share on other sites
Lee Mac
Finding the intersection of two curves, this is the problem!

 

Perhaps these will help, I try to avoid dependence on Express Tools functions as much as possible.

Share this post


Link to post
Share on other sites
rkmcswain
Perhaps these will help, I try to avoid dependence on Express Tools functions as much as possible.

 

It's about time... I knew you would be along with something.... 8)

Share this post


Link to post
Share on other sites
Lee Mac
It's about time... I knew you would be along with something.... 8)

 

:) ........

Share this post


Link to post
Share on other sites
rkmcswain
:) ........

 

Yea, I don't like using code that you don't have the source to either.... but in this case, it was more of a "yes, it can be done" type of reference....

 

Glad to know you got that intersection stuff covered also...

Share this post


Link to post
Share on other sites
Ahankhah
Perhaps these will help, I try to avoid dependence on Express Tools functions as much as possible.

Lee,

as always you have the best answer to everything. :):D:lol:

Share this post


Link to post
Share on other sites
lamensterms

no worries mate. glad i could help.

Share this post


Link to post
Share on other sites
Lee Mac
Lee,

as always you have the best answer to everything. :):D:lol:

 

Thanks Mehrdad, I try my best :)

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...