CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 7575

CAD tip CAD tip # 14061:

   
Question CAD 
 %  platform  category 
Q - question

Animated drawing of geometry in AutoCAD.

A - answer The LISP function (grdraw) for drawing temporary geometry can help to replace the drawing of real DWG geometry with animated "strokes" of drawing line segments, vectors. This animation, phased painting, can be provided by the auxiliary function aGrDraw, part of the LISP library AnimDraw.lsp, which can be downloaded from the Helpdesk of the authors - ARKANCE. You can use it to create similar outputs:

In addition to specifying the end points of the geometry, you only need to specify the animation speed, the accuracy of the approximation and the colour of the drawing.

In the LISP file itself (and in the video) you can see examples of such animated drawing:

  • geometry specified by coordinates - e.g. you can create an animation of a green crossed square using:

     (aGrDraw '(-5 -5 0) '(5 -5 0) 3) ; CROSS-BOX
     (aGrDraw '(5 -5 0) '(5 5 0) 3)
     (aGrDraw '(5 5 0) '(-5 5 0) 3)
     (aGrDraw '(-5 5 0) '(-5 -5 0) 3)
     (aGrDraw '(-5 -5 0) '(5 5 0) 3)
     (aGrDraw '(-5 5 0) '(5 -5 0) 3)
    

    The yellow sine wave is then drawn/animated using:

     (repeat 75 ; SINUS
      (aGrDraw (list i (sin i) 0) (list (setq i (+ 0.177 i))(sin i) 0) 2)
     )
    
  • interpretation of an X-Y data stream (e.g. ECG curve) or even multiple streams at once - simulated in the example by a definition of data table:

     (setq EKGdata '( (2 81) ; data set - EKG
      (3 83) (4 88) (5 98) (6 92) (7 85) (8 73) (9 71)
      (10 70) (11 83) (12 73) ...
    
  • connection to 2DPLOT - the utility 2Dplot creates an auxiliary data table after generating a mathematical curve, which can then be drawn (if the AnimDraw library is loaded) as animated - by calling the LISP function (2dplotanim)
ACADADTPlantACADMCivilMap
100% *  CAD 
12.3.2024    101147×  

See also:
Tip 12448:Pan view (change view target) in multiple viewports of a layout.
Tip 12446:Quick 1-/2-click dimensioning in AutoCAD.
Tip 11354:Animate dyn.block parameters and dim.constraints in AutoCAD DWGs.
Tip 11295:Iterative Move, Scale and Rotate - till boundary touch.
Tip 8241:An overview of web addresses (URLs) for Autodesk Cloud services and apps.


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Extend your AutoCAD LT productivity with our popular add-on
CADstudio LT Extension More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist