4.1.4      Cone

The  button from Primitives section in Geometry tab and Geometry->Primitives->Create Cone... command from main menu invoke Create Cone dialogue for creating a Cone primitive object.

The Create Cone dialogue with default parameters and preview of the cone solid will appear.


Name and medium

We can set the name of the cone and choose the medium assigned to the cone from Medium list. The Medium list contains all media available in the Project Media and the default medium is taken from current active medium (see Project Media chapter for more information).


Parameters

The Parameters section contains the cone bottom radius (Radius1), top radius (Radius2), height (Height) and angle (Angle), which permits the creation of a portion of the cone.


Position

The Position section contains X, Y and Z centre position relative to the origin 0, 0, 0 and the axis of direction: X, Y, Z (default) or User defined described by (x, y, z) vector.

     


The cone at origin position and along X axis.


The cone at origin position and along Y axis.


The cone at origin position and along Z axis.


The cone shifted from origin position and along Z axis.


The cone shifted from origin position and along axis described by (1, 0, 1) vector.


Map to face

From Pick option allows adjusting the centre position, axis of direction and minimum or maximum size to the selected area.


Press left mouse button for face selection.


Press From Pick button to place the bottom of the cone in the middle of the selected face.


Select Use minimum dimension from the list and press From Pick button to place the bottom of the cone in the middle of the selected face and adjust the bottom radius to the minimal dimension of the face.


Select Use maximum dimension from the list and press From Pick button to place the bottom of the cone in the middle of the selected face and adjust the bottom radius to the maximal dimension of the face.


Python code

The python code, which can be useful when creating project scripts, generated by Create Cone dialogue for default parameters:


from FreeCAD import Base

import Part,PartGui

App.ActiveDocument.addObject("Part::Cone","Cone")

App.ActiveDocument.Cone.Radius1 = 4.00000

App.ActiveDocument.Cone.Radius2 = 1.00000

App.ActiveDocument.Cone.Angle = 360.00000

App.ActiveDocument.Cone.Height = 10.00000

App.ActiveDocument.Cone.Placement = Base.Placement(Base.Vector(0.00000,0.00000,0.00000),Base.Rotation(0.00000,0.00000,0.00000,1.00000))

App.ActiveDocument.Cone.Label = "Cone"

App.ActiveDocument.Cone.Medium = QW_Modeller.getQWMedium("metal")

Gui.SendMsgToActiveView("ViewFit")

App.ActiveDocument.recompute()