New features
New Features (largely untested)
-------------------------------------------------------------------------------------------------------------------------------------
version3g7 with autoderive user-defined methods
2006.12.04 (Draft)
1. At the time of Autoderive operation, the following user-defined function can be run with no argment.
nt_autoderive_init_method ; this runs only once when a user starts autoderive
nt_autoderive_reset_method ; this runs at the beginning of each autoderive cycle
nt_autoderive_cancel_method ; this runs right after the user cancels autoderive in interactive mode
For example,
(defun nt_autoderive_init_method ()
(print “init”)
(setq current-step step))
(defun nt_autoderive_reset_method ()
(print “reset”)
(setq step current-step))
(defun nt_autoderive_cancel_method ()
(print “cancel”)
(setq step current-step))
-------------------------------------------------------------------------------------------------------------------------------------
version3g6 with collision detection tools
2006.05.04 (Draft)
1. assignment of test_function for nt_def_trans
2. nt_visible_literal_geometries returns a list of all the visible NITROS entities
Quick explanation follows.
(nt_def_trans
'("tn1_dome")
"tn1_lantern"
'(tn1_dome2lantern tn1_dome2lantern_test_func)
; if the above is a list, the first element is the usual transformation function
; and the second element is the name of the test function
; The second function needs to take the same set of parameters as the first function.
; It should return T or nil. If it returns nil, the
; test signals failure and the transformation will be excluded from the list
; when a user double-click on a shape. Also, it will be excluded when
; auto-derive processes the derivation. See the example below.
nil ; keep this nil as before, please!
'add
)
(defun tn1_dome2lantern_test_func (dome_list trans_plist / dome ent1 ent1_plist dome_plist)
(setq dome (car dome_list))
(setq dome_plist (nt_plist dome))
; Do some collision detection calucation here and return t-or-nil in the end.
;
; To access the parameter values of the dome, do something like
; (nt_val "xo" dome_plist)
; (nt_val "radius" dome_plist)
;
; If you need to access visible objects in the drawing, the following function returns the list of all visible objects.
; It includes the NITROS generated ones only.
; (nt_visible_literal_geometries)
;
; Further more, you can access the parameter values of these geometry. For instance, I get the first entity from the list.
; (setq ent1 (car (nt_visible_literal_geometries)))
; Then, extract its parameter list.
; (setq ent1_plist (nt_plist ent1))
; Then, extract its parameter values.
; (nt_val "xo" ent1_plist)
; (nt_val "radius" ent1_plist)
;
; If you want to know the type of the entity, this returns it.
; (nt_type ent1)
;
; At the end, make sure to return t-or-nil where nil signals the failure of the test and transformation is prevented.
)
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.