# Arcs -- (poor man pt2)

**URL:** <https://discourse.mcneel.com/t/arcs-poor-man-pt2/15038>\
**Category:** Scripting\
**Created:** [December 17, 2014, 8:55pm UTC](https://discourse.mcneel.com/t/arcs-poor-man-pt2/15038 "2014-12-17T20:55:48Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![jeff\_hammond](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jeff_hammond/32/768846_2.png) [@jeff\_hammond](https://discourse.mcneel.com/u/jeff_hammond)\
**Post date:** [December 18, 2014, 11:19pm UTC](https://discourse.mcneel.com/t/arcs-poor-man-pt2/15038/11 "2014-12-18T23:19:50Z")

</div>

I’m going to write some more of this script in a couple hours and need to add some conditions(?).

it will basically be - if this happens then a whole bunch of stuff is different than if that happens.

will I use def? like-

if boolean is true:  
def1  
else:  
def2

(can’t get it to indent on my phone but I know there are some indent ions there)

is that how that works? and if so, do the defs have to be in a certain place in the script… before or after the if/then statement?

* * *

or for example… a few places in this script, there’s ‘radius+5.5’…  
but I’ll have a GetBoolean at the beginning which lets me either run the arc to the ground or have it start 5.5 above the ground.  
for many of the calculations, I could just do-  
if ground is true: radius = R  
else radius = R+5.5  
and I think it would work out… however, the poly line at the end will need to be different too (if true it has 4 lines… if false it will need a 5th vertical line) so I think I might have to have two separate polyline options and need to know how to steer the script to the right one.

* * *

edit-  
found this:  
[http://code.algorithmicdesign.net/Introduction-To-Python](http://code.algorithmicdesign.net/Introduction-To-Python)

seems pretty good for me… short and sweet with lots of examples 😉

---

_[View the full topic](https://discourse.mcneel.com/t/arcs-poor-man-pt2/15038)._
