Part Circle: Difference between revisions

From FreeCAD Documentation
(Module to Workbench renaming.)
No edit summary
Line 43: Line 43:
* {{Parameter|Angle 0}}: start of the curved edge, (degrees anti-clockwise), the default value is 0
* {{Parameter|Angle 0}}: start of the curved edge, (degrees anti-clockwise), the default value is 0
* {{Parameter|Angle 1}}: end of the curved edge, (degrees anti-clockwise), the default value is 360
* {{Parameter|Angle 1}}: end of the curved edge, (degrees anti-clockwise), the default value is 360

==Scripting==

Creating a circle, defined by center point, axis vector and radius.

</translate>
{{Code|code=
import Part
center = App.Vector(1,2,3)
axis = App.Vector(1,1,1)
radius = 10
myCircle = Part.Circle(center,axis,radius)
}}

<translate>

Creating a circle, defined by three points.

</translate>
{{Code|code=
import Part
p1 = App.Vector(10,0,0)
p2 = App.Vector(0,10,0)
p3 = App.Vector(0,0,10)
myCircle = Part.Circle(p1,p2,p3)
}}

<translate>

Attributes and functions of a Part.Circle object:

* myCircle.Center ... Center as App.Vector
* myCircle.Axis ... Axis vector as App.Vector
* myCircle.Radius ... Radius as Float
* myCircle.TypeID ... 'Part::GeomCircle'
* myCircle.discretize(n) ... List of the vertexes as App.Vector of a polygon inscribed in the circle having n vertexes







Revision as of 07:42, 19 September 2021

Part Circle

Menu location
Part → Create primitives → Circle
Workbenches
Part
Default shortcut
None
Introduced in version
-
See also
None

Description

This command will create a circular curved edge. With the default values, the circular curved edge will be closed and therefore will be a circle. If the properties Angle 0 or Angle 1 are changed from their default values (0 and 360) the edge will be an open curve, an arc.

Alternatively a Part Circle can be initially defined from three points. Once created the circle will only contain the standard Part Circle properties and will no longer contain a reference to the creation points.

Usage

A Circle geometric primitive is available from the Create Primitives dialogue in the Part workbench.

  1. Switch to the Part
  2. There are several ways to access the Create Primitives dialogue:

Properties

  • Radius: the radius of the curved edge (arc or circle)
  • Angle 0: start of the curved edge, (degrees anti-clockwise), the default value is 0
  • Angle 1: end of the curved edge, (degrees anti-clockwise), the default value is 360

Scripting

Creating a circle, defined by center point, axis vector and radius.

import Part 
center = App.Vector(1,2,3)
axis = App.Vector(1,1,1)
radius = 10
myCircle = Part.Circle(center,axis,radius)


Creating a circle, defined by three points.

import Part 
p1 = App.Vector(10,0,0)
p2 = App.Vector(0,10,0)
p3 = App.Vector(0,0,10)
myCircle = Part.Circle(p1,p2,p3)


Attributes and functions of a Part.Circle object:

  • myCircle.Center ... Center as App.Vector
  • myCircle.Axis ... Axis vector as App.Vector
  • myCircle.Radius ... Radius as Float
  • myCircle.TypeID ... 'Part::GeomCircle'
  • myCircle.discretize(n) ... List of the vertexes as App.Vector of a polygon inscribed in the circle having n vertexes