Find Intersection point automatically

Find Intersection point automatically

Anonymous
Not applicable
13,609 Views
51 Replies
Message 1 of 52

Find Intersection point automatically

Anonymous
Not applicable

Hello, 

 

alixbita_0-1602164802096.png

I have a lot of line which have to cut a single line. I need to know all intersection point location. How can I find it easily? Can I do it with a single command? 

 

Thanks in advance. 

13,610 Views
51 Replies
Replies (51)
Message 41 of 52

Anonymous
Not applicable

@hak_vz  sir, thanks a lot. 

 

I would like to request please add aligned dimension also.(Kindly see Pic 1 and Pic 2)

 

#Is this some arbitrary point or it has to be something like center of mass to enclosing object?

-P is an arbitrary point. P is not center of mass of the object. 

 

#Instead creating red lines to go across whole object we will have a set of lines that spread from point P. Are this lines needed in your further work, or we can create intersection points for a set of line that enclose some angle (let say every 5 deg).

-OK, Let me clear it. I have a lot of arbitrary object with an arbitrary point(pic 03). Then I have to cut the object from that point at an equal angle (I can use Polar Array). Then I have to find out the intersection point location (coordinate), aligned dimensions, and dimensions for my further calculation. 

 

#Do you want to have a point P selected from a script, or let me assume it is 0,0.

-I want to select the point P for one time. 

 

#Do you need point object created  at intersection or just label text displaced for some distance in direction of a red line? 

-I need label text displace for some distance in direction of red line (Pic 04)

 

#Since this is a 2D problem is Z coordonate needed?

-It's a simple 2D drawing

 

#What precision you need (2 3 or more decimal places)?

-4 decimal places (0.0000)

 

#Are corner point of enclosing object also needed?

-NO

 

#Angle from point p to intersection point added to table?

-It will be a bonus for me 😄

 #What about dividing each segment of  enclosing object at peaces of equal length (some step value).

With your method as stated now you will have a segments of enclosing object in "shadow" zone, so it might

happen you won't have intersection points at that position. See upper right corner of your sample for clearance.

-I am sorry, I don’t get it. Please clear it ☹

 

I have attached a sample drawing also. I look forward to hearing from you. 😄

 

 

Pic 3Pic 3Pic 4Pic 4

alixbita_0-1602278841055.png

 

0 Likes
Message 42 of 52

Sea-Haven
Mentor
Mentor

For simple shapes with one intersect easy, but for a complex shape need to keep repeating to make sure there are no more points in the image the shape would produce 3 points for an angle. Could do a line trim at intersect point do extend again and check if intersect if no go next angle.

Message 43 of 52

hak_vz
Advisor
Advisor

@AnonymousBefore I jump into writing code look what commands MEASURE and DIVIDE work. I think they are better for extracting points and will correctly get shape.

 

 

In this case red line never touches blue line. Also how to order points when line crosses object at two or more points.

Sorry,, but this is bad approach.

 

Untitled.png

 

Why not use this (command DIVIDE)

 

Untitled1.png

 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Message 44 of 52

Anonymous
Not applicable

@hak_vz  sir, I cannot command divide because I have to draw line at an equal angle. And every line will cut the object, that was my fault in the pic that is not cutting the object. 

alixbita_0-1602323053899.png

 

0 Likes
Message 45 of 52

hak_vz
Advisor
Advisor

I will go with equal angle. Can you use polyline instead of spline to draw your enclosing object. Or better say, when you finish drawing enclosing object, you will have to use command pedit and join all segments into a single closed polyline.

 

What are your units of drawing ? Inches

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 46 of 52

Anonymous
Not applicable

@hak_vz sir, 

#" Or better say, when you finish drawing enclosing object, you will have to use command pedit and join all segments into a single closed polyline."

-I will go for it. I would like to request you, kindly make a short video for me 😞

 

# "What are your units of drawing ? Inches"

- Meters

0 Likes
Message 47 of 52

hak_vz
Advisor
Advisor
Accepted solution

Sorry, have no time to do a video, but you will manage it. It is not anything complex to do.

 

1) When you create your enclosing object from splines, lines, arcs or other elements, join them into a single line with 

command PEDIT  (this are basics of using autocad)

2) When you create fan of lines use command ARRAYCLASSIC or explode array object you receive using command ARRAY so that you have set of individual lines (this are changes in newer versions)

3) Use command INTERSECTIONS to label intersection points  and export them in Excel

4) If something is missing you can calculate it in Excel.

 

Test this code in attachment and see how it works.  That's all for the weekend.

 

 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Message 48 of 52

hak_vz
Advisor
Advisor

Also take care for duplicate (overlapping) lines, usually starting line in polar array.

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Message 49 of 52

Anonymous
Not applicable

@hak_vz Sir, It is working. You are great. Thank you very much sir. 😄

0 Likes
Message 50 of 52

Anonymous
Not applicable

@hak_vz sir, Yes here is some duplicate file 

0 Likes
Message 51 of 52

hak_vz
Advisor
Advisor

Just overwrite the old file. If it works select my last code post as a solution. 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Message 52 of 52

prashanth_sh
Observer
Observer

This really helped! thanks!

0 Likes