Ahankhah Posted July 16, 2011 Posted July 16, 2011 Hi everyone, is it possible to get a point on an "ellipse arc", in an specified distance to the start point of "ellipse arc"? Quote
rkmcswain Posted July 16, 2011 Posted July 16, 2011 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 Quote
Ahankhah Posted July 16, 2011 Author Posted July 16, 2011 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. Quote
rkmcswain Posted July 16, 2011 Posted July 16, 2011 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? 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. Quote
Ahankhah Posted July 18, 2011 Author Posted July 18, 2011 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! Quote
rkmcswain Posted July 18, 2011 Posted July 18, 2011 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"))) ) Quote
lamensterms Posted July 18, 2011 Posted July 18, 2011 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. Quote
Ahankhah Posted July 18, 2011 Author Posted July 18, 2011 (edited) 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 July 19, 2011 by Ahankhah Quote
Ahankhah Posted July 19, 2011 Author Posted July 19, 2011 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. Quote
Lee Mac Posted July 19, 2011 Posted July 19, 2011 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. Quote
rkmcswain Posted July 19, 2011 Posted July 19, 2011 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.... Quote
Lee Mac Posted July 19, 2011 Posted July 19, 2011 It's about time... I knew you would be along with something.... ........ Quote
rkmcswain Posted July 19, 2011 Posted July 19, 2011 ........ 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... Quote
Ahankhah Posted July 22, 2011 Author Posted July 22, 2011 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. :lol: Quote
Lee Mac Posted July 22, 2011 Posted July 22, 2011 Lee,as always you have the best answer to everything. :lol: Thanks Mehrdad, I try my best Quote
Recommended Posts
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.