(setq f (/ (- ABdy*APdx ABdx*APdy) (- ABdx*APdmy ABdy*APdmx))) (setq rotco (rotlst co i) rotmxy (rotlst mxy i) n 0)ĭelta (if (equal ABdx 0.0 1e-8) (/ ABdx ABdy) (/ ABdy ABdx)) Rotate co and mxy by i to find the list of f when point 'P become inside each polyline's segments (setq lnlst (cons (distance (nth n co) (if (= n (1- (length co))) (car co) (nth (1+ n) co))) lnlst)) (setq co (split-list (vlax-get obj 'Coordinates) 2)) Pmy rotco rotmxy A Ax Ay Amx Amy B Bx By Bmx BmyĪBdx ABdy Delta APdx APdy APdmx APdmy ABdx*APdy (defun fdrop ( ent / co mxy lnlst n i maxln flst p px py pmx f * return the smallest offset that change the form of the polyline The distance of the change in the position of C is both: 1) different from the distance of change in the position of the A-B edge and 2) not in the same or opposite direction, so they are not approaching each other on equal footing.Īnd since A-B is a curve in this case, the position along it where the self-intersection would occur is a moving target, beyond the capabilities of trigonometry to calculate.Īlso, how would a routine have any way of knowing which vertex is going to be the one that first hits somewhere else on the Offset results? It would need to know, if it's going to calculate the change in C for a given change in Offset distance, since the angle at C determines that.Īnd what if the vertex that's going to hit first is not between two line segments, so that there is no angle from which to calculate the change in is the code that catches the offset distance at first-intersect for closed LWPOLYLINE that don't include curve segments ** The shorter-dashed magenta is Offset 1 unit farther in the same direction. The dashed grey is your 50-unit-Offset result in your color.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |