<!DOCTYPE KigMacroFile> <KigMacroFile Number="1" Version="0.10.7" > <Macro> <Name>ÐовоÑÐ¾Ñ ÑоÑки</Name> <Description></Description> <Construction> <input requirement="any" id="1" /> <input requirement="any" id="2" /> <input requirement="any" id="3" /> <intermediate action="push" type="string" id="4" >def calc( arg1, arg2, arg3 ): # Calculate whatever you want to show here, and return it. # For example, to implement a mid point, you would put # this code here: b=Coordinate() b.x=arg1.coordinate().x b.y=arg1.coordinate().y c=Coordinate() c.x=arg2.coordinate().x c.y=arg2.coordinate().y f=arg3.size() x1=b.x+(c.x-b.x)*cos(f)-(c.y-b.y)*sin(f) y1=b.y+(c.x-b.x)*sin(f)+(c.y-b.y)*cos(f) return Point(Coordinate(x1,y1)) # Please refer to the manual for more information. </intermediate> <intermediate action="calc" type="PythonCompileType" id="5" > <arg>4</arg> </intermediate> <result action="calc" type="PythonExecuteType" id="6" > <arg>5</arg> <arg>1</arg> <arg>2</arg> <arg>3</arg> </result> </Construction> </Macro> </KigMacroFile>