Finding the two points

Finding the two points

mehsan
Advocate Advocate
328 Views
3 Replies
Message 1 of 4

Finding the two points

mehsan
Advocate
Advocate

I have an arch which is runinng between four lines when i trimed the inside portion how can i know the point1 and point2.

thanks

0 Likes
329 Views
3 Replies
Replies (3)
Message 2 of 4

Kent1Cooper
Consultant
Consultant

@mehsan wrote:

I have an arch which is runinng between four lines when i trimed the inside portion how can i know the point1 and point2.

....


The information about an Arc is stored with it running in the counterclockwise direction, no matter how it was drawn.  When you Break or Trim a piece out of the middle of an Arc, the portion at the beginning end of that [the clockwise-ward end] keeps the same entity name as the original Arc, and the "downstream" remaining portion becomes a new entity, which is then the last entity in the drawing.

 

So if you selected the Arc before Trimming it, and put its entity name into a variable, with something like:

 

(setq arc1 (car (entsel "\nSelect Arc to Trim: ")))

 

then you can do this:

 

(vl-load-com); [if needed]

(setq

  Point1 (vlax-curve-getStartPoint (entlast))

  Point2 (vlax-curve-getEndPoint arc1)

); setq

 

[It can also be done without the (vlax-curve-...) functions, with more code.]

Kent Cooper, AIA
0 Likes
Message 3 of 4

mehsan
Advocate
Advocate

No, it is taking only oneside curve start and end point i want the start and the end points of the curve trimmed, it would be even better if i can get the database for the remaining arcs.

thanks

0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant

@mehsan wrote:

No, it is taking only oneside curve start and end point i want the start and the end points of the curve trimmed, it would be even better if i can get the database for the remaining arcs.

thanks


It got the two Points in your image for me.  If you post your complete code, maybe the issue will be apparent.

 

Assuming the original full Arc was saved to a variable 'arc1' as in my previous suggestion, you can get those database lists with (entget arc1) for the "upstream" piece [after the Trimming, to replace its information from before, if you got that] and (entget (entlast)) for the "downstream" piece.

Kent Cooper, AIA
0 Likes