Results 1 to 6 of 6

Thread: Points of a viewpoint

Hybrid View

  1. #1
    100 Club
    Join Date
    2001-01
    Posts
    169

    Default Points of a viewpoint

    Hi All-

    Is there a way to extract the four points of standard non-polygonal viewport via lisp? Thanks.

    Manuel A. Ayala

  2. #2
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,519

    Default Re: Points of a viewpoint

    Quick and dirty, not elegant

    Code:
    
    
    (setq a (entget (car (entsel))))
    (setq cen (cdr (assoc 10 a)))
    (setq width (cdr (assoc 40 a)))
    (setq height (cdr (assoc 41 a)))
    (setq ul (list
    	   (- (car cen) (* 0.5 width))
    	   (+ (cadr cen) (* 0.5 height)))
          ur (list
    	   (+ (car cen) (* 0.5 width))
    	   (+ (cadr cen) (* 0.5 height)))
          ll (list
    	   (- (car cen) (* 0.5 width))
    	   (- (cadr cen) (* 0.5 height)))
          lr (list
    	   (+ (car cen) (* 0.5 width))
    	   (- (cadr cen) (* 0.5 height)))
    )      
    
    

  3. #3
    100 Club
    Join Date
    2001-01
    Posts
    169

    Default Re: Points of a viewpoint

    rkmcswain

    Thank you for your assistance. I will try out the code.

    Manuel

  4. #4
    100 Club
    Join Date
    2001-01
    Posts
    169

    Default Re: Points of a viewpoint

    Hi rkmcswain

    Do you by any chances know how I can check if a viewport is polygonal or clipped? Thanks.

    Manuel

  5. #5
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    6,836

    Default Re: Points of a viewpoint

    Looked at the Clipped property of the viewport.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  6. #6
    Certified AUGI Addict rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Houston
    Posts
    7,519

    Default Re: Points of a viewpoint

    If the viewport is non-rectangular, it is clipped.
    The presence of a group 340 entry will confirm this.

Similar Threads

  1. Viewpoint Control
    By ejsanford in forum NavisWorks - General
    Replies: 3
    Last Post: 2010-04-09, 08:31 PM
  2. Viewpoint not correct
    By OCD in forum NavisWorks - General
    Replies: 2
    Last Post: 2009-06-11, 03:16 AM
  3. Viewpoint Animation
    By harrymckinney in forum NavisWorks - General
    Replies: 2
    Last Post: 2008-11-17, 03:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •