Author Topic: TINs in BricsCAD  (Read 296 times)

0 Members and 1 Guest are viewing this topic.

donnieworld

  • Newt
  • Posts: 26
  • BricsCAD Fan
TINs in BricsCAD
« on: January 06, 2023, 02:58:46 AM »
BricsCAD now has a TIN object :-) I am refining processes for a couple of firms that only use the very basic surface design tools from addons and verticals. My testing so far has been GREAT. Here is a taste of how simple a beginning could be.

; just beginning to experiment with TINs :-)
;
; created by Donald Broussard - January 2023
; last modified by ... not yet
;
;
(defun FET:TinLabel ( / bTIN sTIN oPnt lPnt nTinElev)
 
  (defun *error* (sMsg)
      (if (wcmatch (strcase sMsg) "*BREAK,*CANCEL*,*EXIT*") ; user escape
        (progn
          (FET:DWGSettings "RESTORE")
          (quit)
        )
        (progn
          (FET:DWGSettings "RESTORE")
          (FET:Notify (strcat "\nFET-E Unexpected Error: " sMsg) 3)
          (quit)
        )
      )
      (princ) ; exit quietly
  )

  (vl-load-tin)
 
  (while (not bTIN)
    (setq sTIN (car (entsel "\nSelect TIN > ")))
       
    (if (EQ (vla-get-EntityName (vlax-ename->vla-object sTIN)) "BsysCvDbTinSurface")
      (setq bTIN T)
      (princ "\nThat was not a BricsCAD TIN :-( ")
    )
  )
   
  (while
    (setq oPnt (getpoint "\nSelect Point on TIN > "))
    (setq lPnt (list (nth 0 oPnt) (nth 1 oPnt)))
    (setq nTinElev (tin:elevationAtPoint sTIN lPnt))
    (princ (rtos nTinElev 2 3))
  )
 
)
Donald Broussard
Fusion Engineering and Technology

donnieworld

  • Newt
  • Posts: 26
  • BricsCAD Fan
Re: TINs in BricsCAD
« Reply #1 on: January 07, 2023, 03:04:23 AM »
changed to select in XREF :-)

(setq sTIN (car (nentsel "\nSelect TIN > ")))
Donald Broussard
Fusion Engineering and Technology