Macro Make Circle 3 Points/it

Description
This macro creates a circle circumscribed on 3 selected points, orthogonal manner or in 3D at the option space. Points can be objects such as cubes, cylinders,... then selected coordinates will be the centre of these forms.



Use
Select 3 points, or forms in the 3D view and run the macro.

If the shape is a line, the coordinate will be the center of the line.

Mode :
Defaut :
 * Mode by default, creates a circle on the three points or shapes in 3d space.
 * The order of selection of fear forms influencing the angle AXIS and reverse the inclination of the circle. In this case, reverse or change the order of selection of the shapes.
 * Coordinates X, Y, Z value 0 or alignment does not allow calculation, can return a division by zero error, and translated by The three points are aligned

Vue Face :
 * Creates the circle in the front views of the form chosen, 1, 2 or 3

Vue Dessus :
 * Creates the circle in the top on the form chosen view, 1, 2 or 3

Vue Droite :
 * Creates the circle in the view of right on the form chosen, 1, 2 or 3

Alignement sur :
Forme 1, 2, 3
 * Forms, in the order of their selections.

Afficher le centre :

 * If this box is checked, a point on the centre of the built circle will be created

Associer les couleurs

 * If this box is checked, the circle will take the colour of the relevant view,
 * View-Top (X,Y) = Blue(axe Z)
 * View-Front (Z,X) = Green(Axe Y)
 * View-Left (Z,Y) = Red(Axe X)

Script
The file should be copied to " C:/Program Files/FreeCAD0.13/ " If you want to put it in another directory, modify the path to line 53

The three icons must be in the same directory as the module.

To download them, resting your mouse over the icon and then right-click and  save image as...

The file Make_Circle_3_Points/fr.FCMacro:

Anaglyphe
Here an Anaglyph view that allows you to see two different positions of the view by using glasses with filters red and Cyan.

Watch alternately with the left eye and the right eye to see the views separately.



Crédits
The genesis of the macro Draft_Circle_3_Points sur le forum (PYTHON) coordonnées d'un point helped flachyjoe thanks.

The formula comes from cercle_3pts.pdf and used with the kind permission of its author.

The formula adapted by " galou_breizh " circle in 3D space comes from Circumscribed_circle

Separate programs are located here,

Macro_Draft_Circle_3_Points

Macro_Draft_Circle_3_Points_3D