Author Topic: Add angle limits to attached routines.  (Read 181 times)

0 Members and 1 Guest are viewing this topic.

jntm226

  • Mosquito
  • Posts: 2
Add angle limits to attached routines.
« on: November 18, 2018, 04:06:18 PM »

Is possible to add limiting options to allow code work just in a certain range of angles or ignore block between certain angles choice for the user?

I want to use lisp code to link just with blocks that are between an angle range of 0 grades (variable) and 180 grades ( variable) respect to block base point and their rotation (per each link between blocks), I need to ignore all block between 180 grades and 360 grades respect to block base point and their rotation(per each link between blocks).

kdub

  • SuperMod
  • Swamp Rat
  • Posts: 1138
  • class keyThumper<T>:ILazy<T>
Re: Add angle limits to attached routines.
« Reply #1 on: November 18, 2018, 08:41:41 PM »
Perhaps incorperate something like this :-

Code - Auto/Visual Lisp: [Select]
  1. (setq vmin 0.0
  2.      vmax 180.0
  3.      testval2 0
  4.      testval3 22.4
  5.      testval4 180
  6.      testval5 180.1    
  7. )
  8.  
  9. (and (>= testval2 vmin) (<= testval2 vmax))
  10.  
  11. (and (>= testval3 vmin) (<= testval3 vmax))
  12.  
  13. (and (>= testval4 vmin) (<= testval4 vmax))
  14.  
  15. (and (>= testval5 vmin) (<= testval5 vmax))
  16.  
  17.  
  18.  
called Kerry in my other life

Sometimes the question is more important than the answer.