Heres a drawing puzzle hopefully someone will know the answere to. I am trying to connect two lines with an arc, tangent at both ends to those lines. This sounds easy, however there are some additional requirements as per below: (ignoe the dots ....... as these are just to render Line A ) ................................Line A ................................./ ................................/ .............................../ ............................../ ........ ....................* (end point of Line A must remain fixed) Line B -------------------* (end point of Line B free to move) The joing arc must begin at the endpoint of Line A (which must not move), being tangent to Line A at that point. It must end somewhere on Line B in a tangential fashion - it doesnt matter where though - in fact there is only one point that will satisfy these requirements. I do not know the radius for the arc (and again, there is only one radius that satisfies these requirements). Line B may then be trimmed back appropriately. No where in Autocad can i find a simple 'single click' process to draw this arc. I can draw this using a purely geometric arragement of construction lines, but i have up to 1000 of these arcs to draw, and each one different (ie angles and distances between Lines A and B differ) - but this is an additional ~10 steps so you can imagine the mess i will end up with. No version of AutoCad seems to be able to do this easily (R14, 2000 or 2004) and i have asked many individuals with much expereince using this software. This task is for a photolithography mask layout, so accuracy is pertinent. Software such as ProE can do this (i've tried) but only because one can specify constraints to various entities before/after drawing the entity. However i do not own ProE so thats no good to me. If there already exists a solution to this, any help would be appreicated, Cheers, Ben
I think you're right. Due to lack of constraints you would need to do it geometrically. I think you should go over to the customization ng and ask them. This seems like a simple little program. If no one there gets to it, I will look at it tonight when I get home. Have fun, Dave PS: If you can't find the customization ng, I'm sure some kind soul can post a link. :O)
If i read this right how about drawing a circle by the 2p method picking endpoint of line a and tangent to line b.
Ben, See if this does the trick. If you don't know how to turn it into a AutoLISP file, let me know. Have fun, Dave (defun c:ffillet( / FixtEnt FreeEnt EntInters FixtAngle FreeAngle VectAng StartPt CtrPt FRadius ) (setq FixtEnt (entsel "\nSelect fixed line: ") FreeEnt (entsel "\nSelect free line: ") EntInters (inters (cdr (assoc 10 (entget (car FixtEnt)))) (cdr (assoc 11 (entget (car FixtEnt)))) (cdr (assoc 10 (entget (car FreeEnt)))) (cdr (assoc 11 (entget (car FreeEnt)))) nil) FixtAngle (angle EntInters (cadr FixtEnt)) FreeAngle (angle EntInters (cadr FreeEnt)) VectAng (+ fixtangle (/ (- freeangle fixtangle) 2)) StartPt (if (< (distance (cadr FixtEnt) (cdr (assoc 10 (entget (car FixtEnt))))) (distance (cadr FixtEnt) (cdr (assoc 11 (entget (car FixtEnt)))))) (cdr (assoc 10 (entget (car FixtEnt)))) (cdr (assoc 11 (entget (car FixtEnt))))) CtrPt (inters StartPt (polar StartPt (+ FixtAngle (* 0.5 PI)) 1.0) EntInters (polar EntInters Vectang 1.0) nil) FRadius (distance StartPt CtrPt)) (setvar "filletrad" FRadius) (command "fillet" (cadr FixtEnt) (cadr FreeEnt)) )
That's by design. I can't control what direction the line is created in, so I have to work with the pick points. I probably should have mentioned that. :O) I'll take a peek. We really need to take this to the customization group. You can feel free to post my code and the questions over there. There are a lot better polyline hackers than me hanging out over there and you probably will get much better answers there. Besides that, I think we've stepped outside the "drafting" ng conversational limits. :O) No prob. Have fun, Dave
Also, when you ask your question over there <---- , make sure you tell the guys your trying to fillet a line to a polyline, if that the case. Your drawing is showing lines as the fixed lines and polylines as the free lines, and I'm sure that makes a difference. Have fun, Dave
(defun c:ffillet( / FixtEnt FreeEnt EntInters FixtStartPt FixtEndPt FreeStartPt FreeEndPt FixtAngle FreeAngle VectAng StartPt CtrPt FRadius ) (setq FixtEnt (entsel "\nSelect fixed line: ") FreeEnt (entsel "\nSelect free line: ") EntInters (inters (cdr (assoc 10 (entget (car FixtEnt)))) (cdr (assoc 11 (entget (car FixtEnt)))) (cdr (assoc 10 (entget (car FreeEnt)))) (cdr (assoc 11 (entget (car FreeEnt)))) nil)) (if (< (distance (cadr FixtEnt) (cdr (assoc 10 (entget (car FixtEnt))))) (distance (cadr FixtEnt) (cdr (assoc 11 (entget (car FixtEnt)))))) (progn (setq FixtStartPt (cdr (assoc 10 (entget (car FixtEnt)))) FixtEndPt (cdr (assoc 11 (entget (car FixtEnt)))))) (progn (setq FixtStartPt (cdr (assoc 11 (entget (car FixtEnt)))) FixtEndPt (cdr (assoc 10 (entget (car FixtEnt))))))) (if (< (distance (cadr FreeEnt) (cdr (assoc 10 (entget (car FreeEnt))))) (distance (cadr FreeEnt) (cdr (assoc 11 (entget (car FreeEnt)))))) (progn (setq FreeStartPt (cdr (assoc 10 (entget (car FreeEnt)))) FreeEndPt (cdr (assoc 11 (entget (car FreeEnt)))))) (progn (setq FreeStartPt (cdr (assoc 11 (entget (car FreeEnt)))) FreeEndPt (cdr (assoc 10 (entget (car FreeEnt))))))) (setq FixtAngle (angle EntInters FixtEndPt) FreeAngle (angle EntInters FreeEndPt) VectAng (+ fixtangle (/ (- freeangle fixtangle) 2)) CtrPt (inters FixtStartPt (polar FixtStartPt (+ FixtAngle (* 0.5 PI)) 1.0) EntInters (polar EntInters Vectang 1.0) nil) FRadius (distance FixtStartPt CtrPt)) (setvar "filletrad" FRadius) (command "fillet" (cadr FixtEnt) (cadr FreeEnt)) )
You can do it geometrically pretty quick with a circle centered at the (extended) intersection of the two lines that passes through the fixed endpoint of Line A. Then start a pline from the beginning of Line A to the endpoint, hit "A" for ARC, and the next point is where the circle intersects line B (there are 2 solutions)