Jump to content

Search the Community

Showing results for tags 'triangle'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 4 results

  1. This routine helps me to draw surveys of irregular spaces, with triangles (sides and diagonals). It asks for the measures of the three sides, insertion, lying and direction (clockwise/counterclockwise). Do you have any idea to make it better? I would love for example to be able to see the ghosted triangle (elastic band animations?) when I place and rotate it, and a quicker clock/counteclock switch. Thank you for any advice and improvement (sorry - many comments are in Italian only) ;;; ***************************************************************************************************** ;;; ARsurvey v0.1.0 © 2009 Andrea Ricci http://andrearicci.it <°))); ;;; ;;; IT ;;; tentativo 01 di creare una routine per semplificare l'immissioni di triangolazioni di rilievo ;;; il prodotto finale dovrebbe, date tre misure, verso, punto di inserimento e allineamento, ;;; tracciare un triangolo delle misure date nel punto e con l'allineamento dato ;;; ;;; si rilascia con licenza LGPL v3.0 <http://www.opensource.org/licenses/lgpl-3.0.html> ;;; per cui, fra l'altro, non è possibile ricavarne un prodotto commerciale, e qualsiasi ;;; derivato (modifiche, incorporamenti in altro codice) deve avere la medesima licenza ;;; ;;; EN ;;; draws a triangle given three sides, insertion point and alignement, ;;; intended to help in the boring survey procedure ;;; relased under the LGPL licence v3.0 <http://www.opensource.org/licenses/lgpl-3.0.html> ;;; ***************************************************************************************************** ;;; IT ;;; uso: ;;; avviare il programma digitando "srv" (da SuRVey). ;;; Il programma chiede anzitutto tre misure (si può inserirle con mouse), ;;; poi punto d'inserimento e direzione, infine chiede se il triangolo vada ;;; tracciato in senso antiorario (default, basta dare l'invio) ;;; oppure orario (premere C per "clockwise") ;;; ;;; EN ;;; use: ;;; start the command with "srv" (as in SuRVey) ;;; The routine will ask you for three sides' measures (you can input them by mouse), ;;; then the insertion point, and the direction. Lastly it will ask you if you want ;;; to draw it counterclockwise (default, just press "enter") or Clockwise (press "C") ;;per convertire radianti in gradi (defun rad2grad (radianti / gradi) (setq gradi (* radianti (/ 180 pi))) gradi ) ;; per convertire gradi in radianti (defun grad2rad (gradi / radianti) (setq radianti (* gradi (/ pi 180))) radianti ) ;; dati tre lati ricava angoli interni (formule di Briggs - http://www.math.it/formulario/goniometria.htm) (defun briggs (latoadiacente1 latoadiacente2 latoopposto / corner) (setq corner ; angolo opposto al lato sideC (abs (* (atan (sqrt (/ (* (- p latoadiacente1) (- p latoadiacente2) ) ;fine_numeratore (* p (- p latoopposto) ) ;fine_denominatore ) ;_end frazione ) ;_end radice quadrata ) ;_end reciproco tangente 2 ) ;_end moltiplica per 2 ) ;_end abs (rimuove eventuale "-") ) corner ) ;_end funzione briggs ;;; inizio main function (defun c:srv () ; mnemonico da SuRVey (signature);_he he he (princ "\nCommand SRV (SuRVey) v0.1.0 © 2009 Andrea Ricci http://andrearicci.it _m__(*_°)__ooo____" ) ;(setq lprecision (getvar "luprec")) ; memorizza la precisione lineare in uso per successivo ripristino ;(setvar "luprec" 8) ;(setq aprecision (getvar "auprec")) ; memorizza la precisione angolare in uso per successivo ripristino ;(setvar "auprec" 8) (initget 103) ; non consente valore nullo (+1), zero (+2), negativo (+4), usa linea tratteggiata (+32), ignora Z (+64). (setq sideA (getdist "\nfirst side lenght: ") ) (initget 103) (setq sideB (getdist "\nSecond side lenght: ") ) (initget 103) (setq sideC (getdist "\nThird side lenght: ") ) ;; controllo che sia un triangolo (la somma dei lati minori supera il lato maggiore?) ;; is the triangle possible? (if (or (> (max sideA sideB sideC) (- (+ sideA sideB sideC) (max sideA sideB sideC)) ) ;_">" valuta se un valore è maggiore dell'elemento alla sua destra (= (max sideA sideB sideC) (- (+ sideA sideB sideC) (max sideA sideB sideC)) ) ;_oppure uguale ) ;_end or (progn (alert "sorry, not a triangle") ;;(setvar "luprec" lprecision) ;_resetta la precisione lineare originale ;;(setvar "auprec" aprecision) ;_resetta la precisione angolare originale (gc) (princ) (exit) ) ;_end progn ) ;_endif (initget 65) ;non consente valore nullo (+1), zero (+2), negativo (+4), usa linea tratteggiata (+32), ignora Z (+64). (setq pointA ;origine triangolo (getpoint "\nInsertion Point: ") ) (initget 103) ;; angolo iniziale (setq delta (angle pointA (getpoint (princ pointA) "\nFirst side direction") ; (princ pointA) all'interno di getpoint serve a piazzare l'origine della linea tratteggiata ) ) (princ (strcat " [angle= " (rtos (rad2grad delta) 2 8)"]")) (setq p (/ (+ sideA sideB sideC) 2)) ; p= semiperimetro ;; angoli ottenuti con briggs' formula ;; (setq alpha (briggs sidec sideb sidea)) ;; (setq beta (briggs sidea sidec sideb)) (setq gamma (briggs sidea sideb sidec)) (setq gamma (- pi gamma)) ;_correzione dell'angolo reciproco **************************************** ;; correzione del verso di tracciamento (default: antiorario) http://www.lee-mac.com/promptwithdefault.html (initget "Cw or ccW") (setq dir (getkword "\nSpecify order of given measures [Cw/ccW (clockwise/counterclockwise)]: <ccW>" ) ) (if (= dir "Cw") (setq verso -1) (progn (setq dir "ccW") (setq verso 1) ;_else ) ;_end progn ) ;_end if (princ dir) (setq dir nil) ;_resetting the variable for next use ;; end of triangle direction routine ;; punto B in coordinate relative da pointA e radianti (setq pointB (strcat "@" (rtos sideA 2 8) "<" (rtos delta 2 8) "r" ) ) ;; punto C in coordinate relative da pointB e radianti (setq pointC (strcat "@" (rtos sideB 2 8) "<" (rtos (+ delta (* verso gamma)) 2 8);_corretion by direction->verso "r" ) ) ;; disegno della polilinea (setq snapmode (getvar "osmode")) (setvar "osmode" 0) (command "_.PLINE" pointA pointB pointC "_close") (setvar "osmode" snapmode) ;; ;(setvar "luprec" lprecision) ;_resetta la precisione lineare originale ;(setvar "auprec" aprecision) ;_resetta la precisione angolare originale ;; stampa le tre lunghezze (princ (strcat "\n1st side= " (rtos sideA 2 8) "; 2nd side= " (rtos sideB 2 8) "; 3rd side= " (rtos sideC 2 8) ) ) ;| per verifica stampo l'ultimo lato calcolato, corrisponde con il terzo inserito? verify: is the calculated last side equal to imput?|; (princ (strcat " [Last side: " (rtos (distance (getvar "LASTPOINT") pointa) 2 8) "]" ) ) ) ;_end_defun ;;; ;;; ------------ Command Line Load Sequence-------------------------------------------- (princ "\nARsurvey v0.1.0 \n© Andrea Ricci, \n July, 2009....loaded.") (princ "\nARsurvey v0.1.0 ) (princ "Type \"SRV\" (SuRVey) to draw a triangle given tree sides, insertion point and alignment") (print) ;;;;;;
  2. Hello! I was wondering how I would go about writing a function that would calculate the length of a diagonal of a rectangle using SQRT function? I've been trying but so far nothing! Thanks!
  3. This is more of a trigonometry question, but I want to know if there is an easier ACAD solution for drawing. In the given triangle of ABC (sides and angels are known) I want to draw line CM so that the area of BCM becomes 2000 cm (are of ABC is 5311.7 cm3). Is there an easy ACAD way for drawing this line without using trigonometry for calculation?
  4. In triangle ABC, AD is drawn as angle bisector and BE is drawn perpendicular to AD. I want to draw these two lines and triangle ABC by means of constrains, so that when I move point A (make it bigger or smaller), I can get those two lines move automatically. What kind of constrains should I use? For triangle itself, I use "coincident" constrain. I think this part is correct. Whenever I move a vertex after selecting a line and using red grips, it responds and triangle reshapes. Do we have angle bisector constrain? I draw angle dimension line for two equal angle and tried to impose equal constrain for these two angle but couldn't succeed. Drawing11.dwg
  • Create New...