Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/21/2022 in all areas

  1. The ANGLE function determines the angle formed by a line passing through two points and the X WCS axis. To find the angle between two lines that may be at any orientation in 3D space define two unit vectors, v1 from from point 1 to point 2, and v2, from point 1 to point 3. Then take the arc-cosine of the dot product of the two vectors for the true angle.
    2 points
  2. You did not answer the question how you made the excel in the 1st place was it some other software like GIS.
    1 point
  3. Here's a program to calculate the angle between two line defined by three points. (defun c:3dangle (/ p1 p2 p3 v1 v2 angrad angdeg) (setq p1 (getpoint "\nPick point common to both lines.") p2 (getpoint p1 "\nPick end of first line.") p3 (getpoint p1 "\nPick end of second line.") v1 (uvec (mapcar '- p2 p1)) v2 (uvec (mapcar '- p3 p1)) angrad (@acos (dot v1 v2)) angdeg (/ (* angrad 180.) 3.14159265359) ) (princ "\nAngle between the two lines (degrees): ") (princ angdeg) (princ) ) ;;------------------------------------------------------ ;; Function to return the arccos of an angle in radians: ;; author unknown (defun @acos (cosine / sine) (cond ((zerop cosine)(* pi 0.5)) ((<= cosine -1.0) pi) ((>= cosine 1.0) 0.0) (1 (atan (/ (sqrt (- 1.0 (expt cosine 2))) cosine))) ) ) ;;------------------------------------------------------ ;;; Compute the dot product of 2 vectors a and b (defun dot (a b / dd) (setq dd (mapcar '* a b)) (setq dd (+ (nth 0 dd) (nth 1 dd) (nth 2 dd))) ) ;end of dot ;;------------------------------------------------------ ; calculate unit vector of vector v1 (defun uvec (v1 / s) (setq s (distance '(0 0 0) v1 )) (setq s (mapcar '/ v1 (list s s s))) )
    1 point
  4. So looking again at this over lunch, it inserts a block named 'tick' - so you will need that in your drawing, and if you have an attribute in that you should be able to modify the code to complete that with the a chainage reference or distance Lee Macs website has info on how to do that, insert the block using the above, then (entlast), sending that to Lees attribute L:ISP and job done. I'll leave it to you to do that part now.
    1 point
  5. Sort of like tombu we always had fixed size title blocks and used viewports for scaling, so plotting always worked and we never used FIT rather true scales like 1=1 and 1=2. So think about using a title block even just a fixed size rectang and we used window select lower left, upper right and center. Lastly we use a plot lisp so don't read the page setup, plotted up to 88 layouts in one button press. There are plenty of lisp examples out there, just google, Maratovich has a very good one.
    1 point
  6. The default option for the -VPORTS command is <Fit>: so simply hitting enter automatically matches the viewport to the dashed lines indicating the plottable area in the Layout. Since there's no way to snap to those dashed lines manually <Fit> is the only proper way to do it. Your issue may be because the plottable area in the Layout is determined by the page setup and you've somehow modified it. I'd recommend using the [Import…] button in the Page Setup Manager to import page setups you need into the template drawings you use so you only need to create each of them once. I have two page setups for each, one for hardcopy and one for PDF as the plottable area is different for my printers and plotters than for PDF's.
    1 point
  7. AutoCAD, hah! In my day you drew up your plans on a big adjustable table with big adjustable pencils. If you wanted to communicate with your client, you cranked out an actual letter on actual paper with a manual typewriter. Then you put it in an envelope, seeded your fields, punched out a nazi, walked to the post office, mailed your letter, walked home, punched out a commie, and harvested your fields. None of your new-fangled telephones or electricity or flivvers, neither! You did math in your head or it didn't get done. Machines are for sissies!
    1 point
×
×
  • Create New...