Implementing a specific algorithm - doable or not?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello to all,
unfortunately I couldn't be more specific in the subject, so I'll try to be in the post. I have only written some basic AutoLISP scripts so far, so I'm not really sure if one could implement the following procedure in a simple way. The procedure is basically this:
1) get a specific point P1 from the user, where P1 lies on a polyline P which exists in a drawing
2) given P1, draw the line of a specific length (also given by the user) to another point P2 on the same polyline
3) P1 and P2 define a line L1, and let P3 be a point with a fixed constant distance to L1
4) place a block B so that the distance between a reference point P4 on the block and the point P3 is minimized (this could in principle be done
iteratively) - also, the block B can be placed only so that it is constrained with respect to the polyline P (for example, one of the block's lines
are always tangent to P, so the block B can only be "rotated along" the polyline P)
I'm interested if this type of problem could be solved with AutoLISP / Visual Lisp. I assume so, but I don't really have the feeling how complicated this is. The application of this problem is to cover certain spans with beams which need to be placed on head beams, but these beams should folow the
polyline P in a "secant"-manner, since the spans which need to be covered are following a curve defined by P.
Certainly this is easily done by simply drawing, but I would like to know if such a procedure could be automatized in general.
Thanks in advance for any advice.