Hello forum
Is it possible to identify the intersection of two spatial elements using scripts or single commands?
I am looking for simple commands/script that will assist in a batch automation.
Thanks!
Hello forum
Is it possible to identify the intersection of two spatial elements using scripts or single commands?
I am looking for simple commands/script that will assist in a batch automation.
Thanks!
Hi,
if you are referring to 3D and so where a line goes through a 3D surface then sorry no.
Creation of an edge where two 3D surfaces are intersecting can be done using command _INTERFERE
If you need something else then please create a dwg-file with that parts you want to check and let us know which result you are looking for.
- alfred -
Hi,
if you are referring to 3D and so where a line goes through a 3D surface then sorry no.
Creation of an edge where two 3D surfaces are intersecting can be done using command _INTERFERE
If you need something else then please create a dwg-file with that parts you want to check and let us know which result you are looking for.
- alfred -
Thanks Alfred
I am referring to 2D spatial maps
eg. finding the intersection of a given plot area and a high-way for instance
Thanks Alfred
I am referring to 2D spatial maps
eg. finding the intersection of a given plot area and a high-way for instance
Hi,
>> finding the intersection of a given plot area and a
>> high-way for instance
As that can have multiple intersections you need to write your tool to find all intersection points and handle all them then in your script.
There does not exist a command that returns multiple intersection points between 2 3D entities.
- alfred -
Hi,
>> finding the intersection of a given plot area and a
>> high-way for instance
As that can have multiple intersections you need to write your tool to find all intersection points and handle all them then in your script.
There does not exist a command that returns multiple intersection points between 2 3D entities.
- alfred -
@Anonymous wrote:
.... the intersection of two spatial elements ....
If they're objects like Polylines, Lines, Arcs, Regions, Circles, etc., and if "2D" means they're always in the same plane, try this [in simplest terms]:
(vl-load-com)
(defun C:GetIntof2 (/ obj1 obj2) (setq obj1 (vlax-ename->vla-object (car (entsel "\nSelect 1st object: "))) obj2 (vlax-ename->vla-object (car (entsel "\nSelect 2nd object: "))) ) (vlax-invoke obj1 'IntersectWith obj2 acExtendNone) )
That will return a plain undifferentiated list of the XYZ coordinates of any intersection point(s), such as this:
(23.2811 12.8557 0.0 21.0864 11.7895 0.0)
The test situation had two things that intersect twice -- the first 3 numbers there are the XYZ of one intersection, and the last 3 are the XYZ of the other. There could be 3 numbers, or 9, or.... The list can be put into a variable. The points in it can be pulled apart into separate point lists if needed, also stored into variables for use in further code.
@Anonymous wrote:
.... the intersection of two spatial elements ....
If they're objects like Polylines, Lines, Arcs, Regions, Circles, etc., and if "2D" means they're always in the same plane, try this [in simplest terms]:
(vl-load-com)
(defun C:GetIntof2 (/ obj1 obj2) (setq obj1 (vlax-ename->vla-object (car (entsel "\nSelect 1st object: "))) obj2 (vlax-ename->vla-object (car (entsel "\nSelect 2nd object: "))) ) (vlax-invoke obj1 'IntersectWith obj2 acExtendNone) )
That will return a plain undifferentiated list of the XYZ coordinates of any intersection point(s), such as this:
(23.2811 12.8557 0.0 21.0864 11.7895 0.0)
The test situation had two things that intersect twice -- the first 3 numbers there are the XYZ of one intersection, and the last 3 are the XYZ of the other. There could be 3 numbers, or 9, or.... The list can be put into a variable. The points in it can be pulled apart into separate point lists if needed, also stored into variables for use in further code.
If you are working in 2D then define regions for the highways and the land plots then do a Boolean Intersect which will yield the areas of intersection. For example, on the left are two regions and the right shows the intersection areas. You can then give the area object command to find the amount of intersection.
If you are working in 3D then the object must be solids before giving the intersect command.
If you are working in 2D then define regions for the highways and the land plots then do a Boolean Intersect which will yield the areas of intersection. For example, on the left are two regions and the right shows the intersection areas. You can then give the area object command to find the amount of intersection.
If you are working in 3D then the object must be solids before giving the intersect command.
Clarify something:
Looking at the Topic wording, I assumed [because of the word "line" at the end] that you meant intersection points of the linear aspects [edges in the case of something with area, such as a Region or Circle or closed Polyline]. That's what the "intersectwith" method in AutoLisp gives you. But @leeminardi assumed you meant areas of what I would term "overlap." That's what the INTERSECT command gives you between appropriate things, so it's a legitimate interpretation of the word "intersection," but is it what you mean? Between an area and a line, what could that mean?
Clarify something:
Looking at the Topic wording, I assumed [because of the word "line" at the end] that you meant intersection points of the linear aspects [edges in the case of something with area, such as a Region or Circle or closed Polyline]. That's what the "intersectwith" method in AutoLisp gives you. But @leeminardi assumed you meant areas of what I would term "overlap." That's what the INTERSECT command gives you between appropriate things, so it's a legitimate interpretation of the word "intersection," but is it what you mean? Between an area and a line, what could that mean?
Can't find what you're looking for? Ask the community or share your knowledge.