TuttoCAD Forum

TuttoCAD Forum
[ Home | Registrati | Discussioni Attive | Discussioni Recenti | Segnalibro | Msg privati | Sondaggi Attivi | Utenti | Album Fotografico | Download | | Cerca | FAQ ]
Nome Utente:
Password:
Salva Password
Password Dimenticata?

 Tutti i Forum
 1 - TuttoCAD Software
 AutoLISP
 Proiezione 2D

Nota: Devi essere registrato per poter inserire un messaggio.
Per registrarti, clicca qui. La Registrazione è semplice e gratuita!

Larghezza finestra:
Nome Utente:
Password:
Modo:
Formato: GrassettoCorsivoSottolineatoBarrato Aggiungi Spoiler Allinea a  SinistraCentraAllinea a Destra Riga Orizzontale Inserisci linkInserisci EmailInserisci FlashInserisci Immagine Inserisci CodiceInserisci CitazioneInserisci Lista
   
Icona Messaggio:              
             
Messaggio:

  * Il codice HTML è OFF
* Il Codice Forum è ON

Faccine
Felice [:)] Davvero Felice [:D] Caldo [8D] Imbarazzato [:I]
Goloso [:P] Diavoletto [):] Occhiolino [;)] Clown [:o)]
Occhio Nero [B)] Palla Otto [8] Infelice [:(] Compiaciuto [8)]
Scioccato [:0] Arrabbiato [:(!] Morto [xx(] Assonnato [|)]
Bacio [:X] Approvazione [^] Disapprovazione [V] Domanda [?]
Seleziona altre faccine

    
 
   

V I S U A L I Z Z A    D I S C U S S I O N E
arri Inserito il - 13 ottobre 2014 : 09:49:51
http://www.lee-mac.com/2dprojection.html

Inspired by the superb Projective2D application published by the talented programmer Sean Tessier, here I present an open-source AutoLISP program offering similar functionality.

This program provides the user with a means of applying a projective transformation (also known as a homography, collineation, or less technically, a 'perspective' transformation), projecting a selected set of planar objects from one reference frame (or projective space) to another.

Upon issuing the command syntax 2dpro at the AutoCAD command-line, the user is prompted to select a set of 2D coplanar objects to be projected. This selection is restricted to Arcs, Circles, Elipses, Lines, LWPolylines, 2D (Heavy) Polylines, 2D Splines & Points.

The user is then prompted to select a source reference frame & a destination reference frame. For each of these prompts, the program requires the user to select a closed planar polyline (LWPolyline) with four non-collinear vertices. Following each selection, the program will ensure the points defining the reference frame are counter-clockwise oriented with the points ordered such that the lower-left vertex appears first.

Following valid user responses, the program will then convert the four 2D points defining each reference frame into homogeneous coordinates, and will calculate the transformation matrix to map from the source reference frame (or projective space) to the destination reference frame.

The program will then iterate over the set of selected objects and, for each object, will calculate a 2D point set describing or (in the case of curved objects) approximating the object. Each point is then converted to homogeneous coordinates and mapped to the destination reference frame using the tranformation matrix, before being converted back to cartesian coordinates.

The program will then generate either a Point, Line or LWPolyline from the mapped point(s) with properties matching those of the original object.

TuttoCAD Forum © 2001-2010 CADLandia Torna all'inizio della Pagina
Pagina generata in 0,09 secondi.