Macro Circle

Description
This small macro create a circle or arc giving radius, diameter, circumference, area, startangle, endangle, arc, anglecenter, cord, arrow, center (point), placemObject on choice.

The circle is still facing the screen (with getCameraOrientation) (or give the placement)

Use
Copy the code and paste it in the console Python the FreeCAD the command is used all the time to the disposal FreeCAD open give the parameter on choice :


 * x y z : coordinates of circle if not coordinates the circle is created on point 0,0,0
 * radius : radius of circle
 * diameter : diameter of circle
 * circumference : circumference of circle
 * area : area of circle
 * startangle : start angle for arc
 * endangle : end angle for arc
 * arc and anglecenter : arc in combination with anglecenter
 * arc = length of arc
 * anglecenter = angle of center circle to extremities of arc
 * cord and arrow : cord in combination with arrow of circle
 * cord : length of cord of circle
 * arrow : length of arrow of circle
 * center : if center as different 0 one point is created on center of circle
 * placemObject
 * example :
 * pl=FreeCAD.Placement
 * pl.Rotation.Q=(0.0,-0.0,-0.0,1.0)
 * pl.Base=FreeCAD.Vector(-1.89847898483,-0.490152746439,0.0)
 * give placemObject = pl

if there is no parameter "circle" a list of functions is displayed in the report view

Script
Macro_circle.FCMacro

Memo of circle
Examples codes





Version
ver 0.3 10/06/2018 : replace /2 to /2.0 (float)

ver 0.2 24/02/2015 : adding function "placemObject"