Use point monitor to dynamically draw memory entities and drag to generate fishbone linessing the input point manager (point monitor) allows you to monitor the mouse movement process and do what you want to do through callback functions, such as dynamic dragging, displaying tooltip strings, etc.
===============
Demonstrates the method of displaying memory entities during dynamic dragging
Using ARX's ViewportDraw, the screen refreshes to display entities, which is fast
===============
(xdrx-setpropertyvalue
spl
"setfitpoints"
;;Set fitting points
)
(setq pts
(xdrx
-getpropertyvalue spl
"getpointsatdist" 500.0)) (setq v
(xdrx
-getpropertyvalue spl
"firstderiv" x
) v1 (xdrx-vector-perpvector v)
p1
(mapcar '
+ x
(xdrx
-vector
-product v1
500.0)) p2
(mapcar '
- x
(xdrx
-vector
-product v1
500.0)) )
)
)
;;Display memory entities
)
)
(progn (xdrx
-pointmonitor
"_callback") (setq spl
(xdrx
-spline
-make
)) ;;Create in-memory DB entity
(setq nums
(xdrx
-getpropertyvalue spl
"numfitpoints")) )
(xdrx-pointmonitor)
(if (> (xdrx
-getpropertyvalue spl
"numfitpoints") nums
) (xdrx
-setpropertyvalue spl
"removefitpointat" (length lst
)) )
;;Remove the last fitting point before the last mouse confirmation
(setq pts
(xdrx
-getpropertyvalue spl
"getpointsatdist" 500.0)) (setq v
(xdrx
-getpropertyvalue spl
"firstderiv" x
) v1 (xdrx-vector-perpvector v)
p1
(mapcar '
+ x
(xdrx
-vector
-product v1
500.0)) p2
(mapcar '
- x
(xdrx
-vector
-product v1
500.0)) )
(xdrx-line-make p1 p2)
)
)
(xdrx-entity-make spl)
;;Create from memory entity to database
)
)
)
=============
The above LISP code uses the XDRX-API, which can be downloaded from
https://github.com/xdcad/XDrx-API and is updated at any time.
The XDRX API encapsulates AcDb, AcEd, AcGe, AcBr... C++ library, using C++ methods to develop LISP programs.Thousands of Lisp functions are available.
Modify message