Jump to content

Recommended Posts

Posted

Hi everyone,

 

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

Posted
  Ahankhah said:
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

Posted
  rkmcswain said:
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.

Posted
  Ahankhah said:
Hi everyone,

 

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

 

  Ahankhah said:

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.

Posted
  rkmcswain said:

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!

Posted
  Ahankhah said:

 

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")))
)

Posted
  Ahankhah said:
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.

Posted (edited)
  rkmcswain said:
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
Posted
  lamensterms said:
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.

Posted
  Ahankhah said:
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.

Posted
  Lee Mac said:
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)

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

 

:) ........

Posted
  Lee Mac said:
:) ........

 

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

Posted
  Lee Mac said:
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:

Posted

no worries mate. glad i could help.

Posted
  Ahankhah said:
Lee,

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

 

Thanks Mehrdad, I try my best :)

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