Jump to content
Toggle sidebar
Search
English
Log in
Personal tools
Log in
Index
Overview
Features
Screenshots
Download
FAQ
Forum
Tracker
General usage
User Hub
Manual
Tutorials
Installing
Getting started
Navigation styles
Customizing FreeCAD
Commands list
Workbenches
Workbenches list
Assembly
BIM/Arch
CAM/Path
Draft
FEM
Inspection
Material
Mesh
OpenSCAD
Part
PartDesign
Points
Reverse Engineering
Robot
Sketcher
Spreadsheet
Surface
TechDraw
External workbenches
Python scripting
Powerusers hub
Discovering Python
Python in FreeCAD
Macros
Mesh scripting
Part scripting
Pivy
PySide
Parametric objects
Code examples
Python API
Development
Developers hub
How to contribute
Git repository
Compiling
License details
Organization chart
Startup options
Branding
Translating
Help & Feedback
Forum
Bugs tracker
IRC channel
Facebook
Twitter
Mastodon
Meta
Recent changes
Random page
Links
Tools
Special pages
Printable version
Export translations
Translate
English
Language statistics
Message group statistics
Export
More
Language statistics
Message group statistics
Export
Settings
Group
3D input devices
3D view
3Dconnexion input devices
A2plus Workbench
About FreeCAD
Add Button to FEM Toolbar Tutorial
Add FEM Constraint Tutorial
Add FEM Equation Tutorial
Add Workbench to Addon Manager
Addon
Advanced Attachment OYX
Advanced TechDraw Tutorial
Aeroplane
Analysis of reinforced concrete with FEM
Animation Workbench
ANSI templates
App DocumentObject
App DocumentObjectGroup
App FeaturePython
App GeoFeature
App Link
App OriginGroupExtension
App Part
AppImage
Arch 3DS
Arch 3Views
Arch Add
Arch API
Arch Axis
Arch AxisSystem
Arch Building
Arch BuildingPart
Arch Check
Arch CloneComponent
Arch CloseHoles
Arch Component
Arch CurtainWall
Arch CutLine
Arch CutPlane
Arch DAE
Arch Equipment
Arch Fence
Arch Floor
Arch Frame
Arch Grid
Arch IFC
Arch IfcSpreadsheet
Arch JSON
Arch MergeWalls
Arch MeshToShape
Arch MultiMaterial
Arch Nest
Arch OBJ
Arch Panel
Arch Panel Cut
Arch Panel Sheet
Arch panel tutorial
Arch Pipe
Arch PipeConnector
Arch Profile
Arch Project
Arch Rebar
Arch Reference
Arch Remove
Arch RemoveShape
Arch Roof
Arch Schedule
Arch SectionPlane
Arch SelectNonSolidMeshes
Arch SetMaterial
Arch SHP
Arch Site
Arch Space
Arch SplitMesh
Arch Stairs
Arch Structure
Arch Survey
Arch templates
Arch ToggleIfcBrepFlag
Arch ToggleSubs
Arch Truss
Arch tutorial
Arch Wall
Arch Window
Arch Workbench
Artwork
Artwork Assembly
Artwork Assembly3
Artwork BIM
Artwork CAM
Artwork Draft
Artwork Fem
Artwork Gui
Artwork Guidelines
Artwork Inspection
Artwork Material
Artwork Mesh
Artwork MeshPart
Artwork OpenSCAD
Artwork Part
Artwork PartDesign
Artwork Plot
Artwork Points
Artwork Reinforcement
Artwork Render
Artwork ReverseEngineering
Artwork Robot
Artwork Ship
Artwork Sketcher
Artwork Splash screen
Artwork Spreadsheet
Artwork Surface
Artwork TechDraw
Artwork Test
Artwork Tux
Assembly
Assembly CreateAssembly
Assembly CreateBom
Assembly CreateJointAngle
Assembly CreateJointBall
Assembly CreateJointBelt
Assembly CreateJointCylindrical
Assembly CreateJointDistance
Assembly CreateJointFixed
Assembly CreateJointGears
Assembly CreateJointParallel
Assembly CreateJointPerpendicular
Assembly CreateJointRackPinion
Assembly CreateJointRevolute
Assembly CreateJointScrew
Assembly CreateJointSlider
Assembly CreateView
Assembly ExportASMT
Assembly InsertLink
Assembly SolveAssembly
Assembly ToggleGrounded
Assembly Workbench
Assembly2 Workbench
Assembly3 AddOrigin
Assembly3 AddPlacement
Assembly3 AddWorkplane
Assembly3 AddXZWorkplane
Assembly3 AddZYWorkplane
Assembly3 AutoElementVisibility
Assembly3 AutoFixElement
Assembly3 AutoRecompute
Assembly3 AxialMove
Assembly3 ConstraintAlignment
Assembly3 ConstraintAngle
Assembly3 ConstraintArcLineTangent
Assembly3 ConstraintAttachment
Assembly3 ConstraintAttachmentOffset
Assembly3 ConstraintAxial
Assembly3 ConstraintCoincidence
Assembly3 ConstraintColinear
Assembly3 ConstraintDiameter
Assembly3 ConstraintEqualAngle
Assembly3 ConstraintEqualLength
Assembly3 ConstraintEqualLineArcLength
Assembly3 ConstraintEqualPointLineDistance
Assembly3 ConstraintEqualRadius
Assembly3 ConstraintLengthDifference
Assembly3 ConstraintLengthEqualPointLineDistance
Assembly3 ConstraintLengthRatio
Assembly3 ConstraintLineHorizontal
Assembly3 ConstraintLineLength
Assembly3 ConstraintLineVertical
Assembly3 ConstraintLock
Assembly3 ConstraintMidPoint
Assembly3 ConstraintMore
Assembly3 ConstraintMultiParallel
Assembly3 ConstraintPerpendicular
Assembly3 ConstraintPointDistance
Assembly3 ConstraintPointInPlane
Assembly3 ConstraintPointLineDistance
Assembly3 ConstraintPointOnCircle
Assembly3 ConstraintPointOnLine
Assembly3 ConstraintPointPlaneDistance
Assembly3 ConstraintPointsCoincident
Assembly3 ConstraintPointsDistance
Assembly3 ConstraintPointsHorizontal
Assembly3 ConstraintPointsProjectDistance
Assembly3 ConstraintPointsSymmetric
Assembly3 ConstraintPointsVertical
Assembly3 ConstraintSameOrientation
Assembly3 ConstraintSketchPlane
Assembly3 ConstraintSymmetric
Assembly3 ConstraintSymmetricHorizontal
Assembly3 ConstraintSymmetricLine
Assembly3 ConstraintSymmetricVertical
Assembly3 CreateAssembly
Assembly3 CreateElement
Assembly3 GoToRelation
Assembly3 GroupObjects
Assembly3 ImportFromSTEP
Assembly3 ImportMultiDocument
Assembly3 LockMover
Assembly3 MeasureAngle
Assembly3 MeasurePointLine
Assembly3 MeasurePointPlane
Assembly3 MeasurePoints
Assembly3 MoveItemDown
Assembly3 MoveItemUp
Assembly3 MovePart
Assembly3 MultiplyConstraint
Assembly3 QuickMove
Assembly3 QuickSolve
Assembly3 ResolveConstraints
Assembly3 ShowElementCS
Assembly3 SmartRecompute
Assembly3 TogglePartVisibility
Assembly3 TracePartMove
Assembly3 Workbench
Assembly4 Workbench
Asymptote
B-Splines
Base API
Basic Attachment Tutorial
Basic modeling tutorial
Basic Part Design Tutorial
Basic Part Design Tutorial 019
Basic Sketcher Tutorial
Basic TechDraw Tutorial
BIM application compatibility table
BIM Beam
BIM Box
BIM Classification
BIM Clone
BIM Column
BIM Copy
BIM DimensionAligned
BIM DimensionHorizontal
BIM DimensionVertical
BIM Door
BIM IfcElements
BIM IfcExplorer
BIM IfcProperties
BIM IfcQuantities
BIM ingame tutorial
BIM Layers
BIM Leader
BIM Library
BIM Preferences
BIM Preflight
BIM ProjectManager
BIM Setup
BIM Shape2DView
BIM Sketch
BIM Slab
BIM TDPage
BIM TDView
BIM Text
BIM Views
BIM Windows
BIM Workbench
Bitmap
Body
BOLTSFC Workbench
Books
Branding
Builtin modules
CadQuery Workbench
CAM Adaptive
CAM Area
CAM Area Workplane
CAM Array
CAM Comment
CAM Copy
CAM Custom
CAM Deburr
CAM DressupAxisMap
CAM DressupDogbone
CAM DressupDragKnife
CAM DressupLeadInOut
CAM DressupPathBoundary
CAM DressupRampEntry
CAM DressupTag
CAM DressupZCorrect
CAM Drilling
CAM Engrave
CAM experimental
CAM ExportTemplate
CAM FAQ
CAM Fixture
CAM fourth axis
CAM Helix
CAM Inspect
CAM Job
CAM MillFace
CAM OpActiveToggle
CAM Pocket 3D
CAM Pocket Shape
CAM Post
CAM Postprocessor Customization
CAM Preferences
CAM Probe
CAM Profile
CAM Sanity
CAM scripting
CAM SelectLoop
CAM SetupSheet
CAM Shape
CAM SimpleCopy
CAM Simulator
CAM Slot
CAM Stop
CAM Surface
CAM ThreadMilling
CAM ToolBit
CAM ToolBit Library
CAM ToolBitDock
CAM ToolBitLibraryOpen
CAM ToolController
CAM Tools
CAM ToolShape
CAM Vcarve
CAM Walkthrough for the Impatient
CAM Waterline
CAM Workbench
Cfd Workbench
Changelog
Civil Engineering Workbench
Code snippets
Coin3d snippets
Combo view
Command
Common Airfoil Data Import
Compile on Docker
Compile on Linux
Compile on MacOS
Compile on MinGW
Compile on Windows
CompileOnWindows - Reducing Disk Footprint
Compiling
Compiling (Speeding up)
Conda
Console API
Constructive solid geometry
Continuous Integration
Contributors
Copying Objects
Create a FeaturePython object part I
Create a FeaturePython object part II
Creating a simple part with Draft and Part WB
Creating a simple part with Part WB
Creating a simple part with PartDesign
Crowdin Administration
Crowdin Scripts
CurvedShapes CurvedArray
CurvedShapes Workbench
Curves CompressionSpring
Curves Discretize
Curves EditableSpline
Curves ExtendCurve
Curves GordonSurface
Curves Interpolate
Curves IsoCurve
Curves JoinCurve
Curves Line
Curves MultiLoft
Curves ParametricComb
Curves ParametricSolid
Curves PasteSVG
Curves Pipeshell
Curves PipeshellProfile
Curves ProfileSupport
Curves ReflectLines
Curves SegmentSurface
Curves SketchOnSurface
Curves SplitCurve
Curves ToConsole
Curves Workbench
Curves ZebraTool
Custom icon in tree view
Customize Toolbars
DAG view
Datum
Debian development
Debian Unstable
Debugging
Defeaturing
Defeaturing Workbench
Developer hub
Developing FreeCAD with GitKraken
Developing FreeCAD with KDevelop
Development roadmap
Dialog creation
Dialog creation image and animated GIF
Dialog creation reading and writing files
Dialog creation setting colors
Dialog creation with various widgets
Document structure
Donate
Download
Doxygen
Draft AddConstruction
Draft AddNamedGroup
Draft AddToGroup
Draft annotation scale widget
Draft AnnotationStyleEditor
Draft API
Draft ApplyStyle
Draft Arc
Draft Arc 3Points
Draft Array
Draft AutoGroup
Draft BezCurve
Draft BSpline
Draft Circle
Draft CircularArray
Draft Clone
Draft Constrain
Draft CubicBezCurve
Draft DAT
Draft Dimension
Draft Downgrade
Draft Draft2Sketch
Draft Drawing
Draft DXF
Draft Edit
Draft Ellipse
Draft Facebinder
Draft Fillet
Draft FlipDimension
Draft Hatch
Draft Heal
Draft Join
Draft Label
Draft Layer
Draft LayerManager
Draft Line
Draft Mirror
Draft Move
Draft OCA
Draft Offset
Draft OrthoArray
Draft PathArray
Draft PathLinkArray
Draft Pattern
Draft Point
Draft PointArray
Draft PointLinkArray
Draft PolarArray
Draft Polygon
Draft Preferences
Draft Rectangle
Draft Rotate
Draft Scale
Draft SelectGroup
Draft SelectPlane
Draft SetStyle
Draft Shape2DView
Draft ShapeString
Draft ShapeString tutorial
Draft ShowSnapBar
Draft Slope
Draft Snap
Draft Snap Angle
Draft Snap Center
Draft Snap Dimensions
Draft Snap Endpoint
Draft Snap Extension
Draft Snap Grid
Draft Snap Intersection
Draft Snap Lock
Draft Snap Midpoint
Draft Snap Near
Draft Snap Ortho
Draft Snap Parallel
Draft Snap Perpendicular
Draft Snap Special
Draft snap widget
Draft Snap WorkingPlane
Draft Split
Draft Stretch
Draft SubelementHighlight
Draft SVG
Draft Text
Draft ToggleConstructionMode
Draft ToggleContinueMode
Draft ToggleDisplayMode
Draft ToggleGrid
Draft Tray
Draft Trimex
Draft tutorial
Draft Upgrade
Draft Wire
Draft WireToBSpline
Draft Workbench
Draft WorkingPlaneProxy
Drawing
Drawing Annotation
Drawing API example
Drawing Clip
Drawing Dimensioning Addon
Drawing Documentation
Drawing Landscape A3
Drawing Open SVG
Drawing Openbrowser
Drawing Orthoviews
Drawing ProjectShape
Drawing Save
Drawing SpreadsheetView
Drawing Symbol
Drawing Template HowTo
Drawing templates
Drawing tutorial
Drawing View
Drawing Workbench
DXF
DynamicData Workbench
EM FHEquiv
EM FHInputFile
EM FHNode
EM FHPath
EM FHPlane
EM FHPlaneAddRemoveNodeHole
EM FHPlaneHole
EM FHPort
EM FHSegment
EM FHSolver
EM Workbench
Embedding FreeCAD
Embedding FreeCADGui
Engine Block Tutorial
Example Combined Footing
Example Slab Having LShape Rebars Reinforcement Mesh
Example Slab Having Mesh Of Straight Rebars
Example Slab Having UShape Rebars Reinforcement Mesh
Example Slab Spanning in One Direction
Example Slab Spanning in Two Directions
ExplodedAssembly Workbench
Export to STL or OBJ
Expressions
Extend FEM Module
External workbenches
Extra python modules
Fasteners BOM
Fasteners ChamferHole
Fasteners ChangeParameters
Fasteners Flip
Fasteners MatchTypeInner
Fasteners MatchTypeOuter
Fasteners Move
Fasteners ScrewCalculator
Fasteners Simplify
Fasteners Workbench
FCGear BevelGear
FCGear CrownGear
FCGear CycloidGear
FCGear CycloidRack
FCGear GearConnector
FCGear HypoCycloidGear
FCGear InternalInvoluteGear
FCGear InvoluteGear
FCGear InvoluteRack
FCGear LanternGear
FCGear TimingGear
FCGear Workbench
FCGear WormGear
Fcmcua Workbench
Feature
Feature editing
Feature list
FeaturePython Custom Properties
FeaturePython methods
FEM Analysis
FEM CalculiX
FEM CalculiX Cantilever 3D
FEM ClippingPlaneAdd
FEM ClippingPlaneRemoveAll
FEM Concrete
FEM ConstantVacuumPermittivity
FEM ConstraintBearing
FEM ConstraintBodyHeatSource
FEM ConstraintCentrif
FEM ConstraintContact
FEM ConstraintCurrentDensity
FEM ConstraintDisplacement
FEM ConstraintElectrostaticPotential
FEM ConstraintFixed
FEM ConstraintFlowVelocity
FEM ConstraintFluidBoundary
FEM ConstraintForce
FEM ConstraintGear
FEM ConstraintHeatflux
FEM ConstraintInitialFlowVelocity
FEM ConstraintInitialPressure
FEM ConstraintInitialTemperature
FEM ConstraintMagnetization
FEM ConstraintPlaneRotation
FEM ConstraintPressure
FEM ConstraintPulley
FEM ConstraintRigidBody
FEM ConstraintSectionPrint
FEM ConstraintSelfWeight
FEM ConstraintSpring
FEM ConstraintTemperature
FEM ConstraintTie
FEM ConstraintTransform
FEM CreateNodesSet
FEM Element Types
FEM ElementFluid1D
FEM ElementGeometry1D
FEM ElementGeometry2D
FEM ElementRotation1D
FEM EquationDeformation
FEM EquationElasticity
FEM EquationElectricforce
FEM EquationElectrostatic
FEM EquationFlow
FEM EquationFlux
FEM EquationHeat
FEM EquationMagnetodynamic
FEM EquationMagnetodynamic2D
FEM Example Capacitance Two Balls
FEM Examples
FEM FemMesh2Mesh
FEM FrontISTR Workbench
FEM Geometry Preparation and Meshing
FEM Install
FEM MaterialEditor
FEM MaterialFluid
FEM MaterialMechanicalNonlinear
FEM MaterialReinforced
FEM MaterialSolid
FEM Mesh
FEM Mesh CalculiX
FEM MeshBoundaryLayer
FEM MeshClear
FEM MeshDisplayInfo
FEM MeshGmshFromShape
FEM MeshGroup
FEM MeshNetgenFromShape
FEM MeshRegion
FEM PostApplyChanges
FEM PostCreateFunctionBox
FEM PostCreateFunctionCylinder
FEM PostCreateFunctionPlane
FEM PostCreateFunctionSphere
FEM PostFilterClipRegion
FEM PostFilterClipScalar
FEM PostFilterContours
FEM PostFilterCutFunction
FEM PostFilterDataAlongLine
FEM PostFilterDataAtPoint
FEM PostFilterLinearizedStresses
FEM PostFilterWarp
FEM PostPipelineFromResult
FEM Preferences
FEM ResultShow
FEM ResultsPurge
FEM Shear of a Composite Block
FEM Solver
FEM SolverCalculiX
FEM SolverCalculixCxxtools
FEM SolverControl
FEM SolverElmer
FEM SolverElmer SolverSettings
FEM SolverMystran
FEM SolverRun
FEM SolverZ88
FEM tutorial
FEM Tutorial Python
FEM Workbench
FEMbyGEN Workbench
File Format FCStd
Fine-tuning
Flamingo Workbench
Flatpak
FreeCAD and DWG Import
FreeCAD and DXF Import
FreeCAD and Mesh Import
FreeCAD API
FreeCAD Build Tool
FreeCAD Community Portal
FreeCAD Docker CLI mode
FreeCAD Managing Expectations
FreeCAD Scripting Basics
FreeCAD used in production
FreeCAD vector math library
FreeCAD-SH3D
FreeCAD-Ship s60 tutorial
FreeCAD-Ship s60 tutorial (II)
FreeCADGui API
Frequently asked questions
Getting started
Git buildpackage
Glossary
GlTF
Gui Command
GuiCommand model
Headless FreeCAD
Help
Help FreeCAD
History
How to install additional workbenches
How to install macros
IfcOpenShell
IfcPlusPlus
Image CreateImagePlane
Image Open
Image Scaling
Image Workbench
Import Export
Import Export Preferences
Import from STL or OBJ
Import OpenSCAD code
Import text and geometry from Inkscape
Import/Export IFC - compiling IfcOpenShell
Important information
Importing From Sketchup
InputField
Inspection Workbench
Installing additional components
Installing Helpfile
Installing more workbenches
Installing on Linux
Installing on Mac
Installing on Windows
Interface
Interface creation
Interface Customization
Introduction to Python
Key ASCII
KicadStepUp Workbench
Lattice2 AttachablePlacement
Lattice2 Workbench
LGTM
License
Line drawing function
LinkSub
LinkSubList
Linux packaging
Localisation
Localisation Sidebar
Localization Older Methods
LuxCoreRender
LuxRender
MacOS packaging
Macro 3D Parametric Curve
Macro 3d Printer Slicer
Macro 3d Printer Slicer Individual Parts
Macro 3D Printer Workflow
Macro 3DXML import
Macro AeroFoil
Macro Airfoil Import & Scale
Macro Alias For Table For Object
Macro Align Camera to Working Plane
Macro Align Face Object to View
Macro Align Object to View
Macro Align View to Face
Macro Align Working Plane to Camera
Macro Animated Constrain
Macro Animator
Macro Apothem Based Prism GUI
Macro Arch Axis System Repartition
Macro ArrayCopy
Macro Assemblage Imprimante 3D
Macro Assembly
Macro at Startup
Macro Automatic drawing
Macro Bevel
Macro BOLTS
Macro BoundingBox Tracing
Macro BSurf from grid
Macro Build Utility
Macro Cabinets32
Macro CartoucheFC
Macro CartoucheFC 2
Macro CartoucheFC Full
Macro Center Align Objects with Faces or Edges
Macro CenterFace
Macro CenterOfMass
Macro Circle
Macro CirclePlus
Macro clone explicit
Macro CloneConvert
Macro Colorize
Macro Compound Plus
Macro Connect And Sweep
Macro Constraint Draft
Macro ConstraintToAlias
Macro Convert 021
Macro Copy3DViewToClipboard
Macro Corner shapes wizard
Macro Corner shapes wizard/update
Macro crank simul
Macro Creating faces from a DXF file
Macro cross section
Macro Cut Circle
Macro Cut Line
Macro DeepCopy
Macro Delta xyz
Macro documentation
Macro Draft Circle 3 Points
Macro Draft Circle 3 Points 3D
Macro Draft Circle Tangent
Macro Draw 2D Function
Macro Draw Parametric 2D Function
Macro Dump Objects
Macro Duplicate Selection
Macro DXF to Face and Sketch
Macro Easy cutouts for Enclosure Design
Macro EasyAlias
Macro EasyReflector
Macro EdgesToArc
Macro Editor Assistant
Macro Ellipse-Center+2Points
Macro ExpandTreeItem
Macro export transient FEM results
Macro Extract Wires from Mesh
Macro FaceToSketch
Macro FC Convert Lines
Macro FC element selector
Macro FCBmpImport
Macro FCCamera
Macro FCCamGroover
Macro FCCircularText
Macro FCGear
Macro FCHoneycombMaker
Macro FCInfo
Macro FCInfo Alternate Linux
Macro FCInfo ToolBar
Macro FCInfoGlass
Macro FCInfoToMouse
Macro FCSpreadSheet Extract
Macro FCSpring Helix Variable
Macro FCSpring On Surface
Macro FCTreeView
Macro FCWire To Volume
Macro FindAliasReferences
Macro findConfigFiles
Macro FlattenWire
Macro FlattenWire3Points
Macro Fonts Win10 PYMP
Macro ForceRecompute
Macro FreeCAD to Kerkythea
Macro GenerateDrawing
Macro GenerateViews
Macro Geneva Wheel
Macro Geneva Wheel GUI
Macro Geodesic Dome
Macro Global Variable Watcher
Macro GMSH
Macro GuiResetToolbars
Macro Guitar fretboard
Macro Guitar Nut
Macro Half turn stairs
Macro Half-Hull Model
Macro HealArcs
Macro HiddenAlls
Macro HighlightCommon
Macro HighlightDifference
Macro HilbertCurve
Macro hinge
Macro Honeycomb
Macro If Selected Stay If Not Then Delete
Macro Iges PyImporter
Macro Image Scaling
Macro ImperialScales
Macro ImportAirfoil
Macro Intersection
Macro Joint
Macro JointWire
Macro Kerkythea
Macro Line Length
Macro Loft
Macro MacroMenu
Macro MacroToolbarManager
Macro Make Arc 3 Points
Macro Make Circle 3 Points
Macro Make Cube
Macro MatrixTransform
Macro MeasureCircle
Macro Megaminx
Macro merge duplicate materials
Macro MeshToPart
Macro MessageBox
Macro Mouse Cross
Macro Mouse over cb
Macro MoveToOrigin
Macro MultiCopy
Macro MultiCuts
Macro Normal Vector
Macro ObjectInfo
Macro Overlap
Macro Parametric Curve FP
Macro Parametric Defeaturing
Macro PartsLibrary
Macro PartToVRML
Macro PCBWay
Macro PDWrapper
Macro Perpendicular To Wire
Macro Pinger
Macro Place Image
Macro PlacementAbsolufy
Macro Polyhedrons
Macro Print SceneGraph
Macro PropertyMemo
Macro Pyramid
Macro Python Assistant Window
Macro Recompute Profiler
Macro Rectellipse
Macro Remove parametric history
Macro Replace Part in Assembly
Macro Repro Wire
Macro Rotate To Point
Macro Rotate View
Macro Rotate View Free
Macro Rotate ViewAxonometric
Macro Rubik Cube
Macro Screen Wiki
Macro screw maker1 2
Macro Section
Macro Select Hovering
Macro SelectVisible
Macro Shake Sketch
Macro Sheet Metal Unfolder
Macro SimpleProperties
Macro Site From Contours
Macro Sketch Constraint From Spreadsheet
Macro SketchUnmap
Macro Snip
Macro Solid Sweep
Macro SplitPropEditor
Macro Spreadsheet2html
Macro SpreadsheetTools
Macro Spring
Macro Stairs
Macro StraightenObject
Macro SuperWire
Macro TemplateHelper
Macro Texture
Macro Texture Objects
Macro TimingGear
Macro TNP Solution
Macro Toggle Drawstyle
Macro Toggle Drawstyle Optimized
Macro Toggle Panels Visibility
Macro Toggle Visibility
Macro Toggle Visibility2 1-2
Macro Toggle Visibility2 2-2
Macro TreeToAscii
Macro Triangle AH
Macro Unbind Numpad Shortcuts
Macro Unfold Box
Macro Unroll Ruled Surface
Macro View Rotation
Macro Visibility Manager
Macro VisibleAlls
Macro Wiki Object Properties List Generator
Macro Wiki Object Properties List Generator Basic Version
Macro WireFilter
Macro WireXYZ
Macro Wiring And Hoses
Macro WorkFeatures
Macro Z Height Map
Macro Zoom1 1
Macros
Macros recipes
Main Page
Main view area
Manipulator Workbench
Manual:A gentle introduction
Manual:All workbenches at a glance
Manual:BIM modeling
Manual:Creating and manipulating geometry
Manual:Creating FEM analyses
Manual:Creating interface tools
Manual:Creating parametric objects
Manual:Creating renderings
Manual:Generating 2D drawings
Manual:Import and export to other filetypes
Manual:Installing
Manual:Introduction
Manual:Modeling for product design
Manual:Navigating in the 3D view
Manual:Parametric objects
Manual:Preparing models for 3D printing
Manual:Summary
Manual:The Community
Manual:The FreeCAD document
Manual:The FreeCAD Interface
Manual:Traditional 2D drafting
Manual:Traditional modeling, the CSG way
Manual:Using spreadsheets
Manual:What is FreeCAD
Material Workbench
Matrix API
Measurement Of Angles On Holes
Mesh
Mesh AddFacet
Mesh API
Mesh BoundingBox
Mesh BuildRegularSolid
Mesh CrossSections
Mesh CurvatureInfo
Mesh Decimating
Mesh Difference
Mesh EvaluateFacet
Mesh EvaluateSolid
Mesh Evaluation
Mesh Export
Mesh Feature
Mesh FillInteractiveHole
Mesh FillupHoles
Mesh FlipNormals
Mesh FromPartShape
Mesh HarmonizeNormals
Mesh Import
Mesh Intersection
Mesh Merge
Mesh MeshObject
Mesh PolyCut
Mesh PolyTrim
Mesh RemeshGmsh
Mesh RemoveCompByHand
Mesh RemoveComponents
Mesh Scale
Mesh Scripting
Mesh SectionByPlane
Mesh Segmentation
Mesh SegmentationBestFit
Mesh Smoothing
Mesh SplitComponents
Mesh to Part
Mesh TrimByPlane
Mesh Union
Mesh VertexCurvature
Mesh Workbench
MeshPart CreateFlatFace
MeshPart CreateFlatMesh
MeshRemodel Workbench
MIBA
Migrating to FreeCAD from Fusion360
Migrating to FreeCAD from OnShape
Migrating to FreeCAD from Revit
Migrating to FreeCAD from SolidWorks
Misc templates
Misc templates Full
Model
ModernUI Workbench
MOOC Workbench
Mouse navigation
Multithreading
Navigation Cube
NumPy
O-X-Y Type Attachment Modes
Object API
Object name
Onboarding FEM Devs
Online Help Startpage
Online Help Toc
OpenCamLib
OpenCASCADE
OpenSCAD AddOpenSCADElement
OpenSCAD ColorCodeShape
OpenSCAD CSG
OpenSCAD Edgestofaces
OpenSCAD ExpandPlacements
OpenSCAD ExplodeGroup
OpenSCAD Hull
OpenSCAD IncreaseToleranceFeature
OpenSCAD MeshBoolean
OpenSCAD Minkowski
OpenSCAD MirrorMeshFeature
OpenSCAD Preferences
OpenSCAD RefineShapeFeature
OpenSCAD RemoveSubtree
OpenSCAD ReplaceObject
OpenSCAD ResizeMeshFeature
OpenSCAD ScaleMeshFeature
OpenSCAD Workbench
Organization chart
OSE 3D Printer Workbench
OSE Piping Workbench
Package Metadata
Packaging
Part
Part and PartDesign
Part API
Part Boolean
Part BooleanFragments
Part Box
Part BoxSelection
Part Builder
Part Chamfer
Part CheckGeometry
Part Circle
Part ColorPerFace
Part Common
Part CompCompoundTools
Part CompJoinFeatures
Part CompOffsetTools
Part Compound
Part CompoundFilter
Part CompSplittingTools
Part Cone
Part CrossSections
Part Cut
Part Cylinder
Part Defeaturing
Part EditAttachment
Part ElementCopy
Part Ellipse
Part Ellipsoid
Part ExplodeCompound
Part Export
Part Extrude
Part Feature
Part Fillet
Part Fuse
Part Helix
Part Import
Part JoinConnect
Part JoinCutout
Part JoinEmbed
Part Line
Part Loft
Part Loft Technical Details
Part MakeFace
Part MakeSolid
Part Measure Angular
Part Measure Clear All
Part Measure Linear
Part Measure Refresh
Part Measure Toggle 3D
Part Measure Toggle All
Part Measure Toggle Delta
Part Mirror
Part Offset
Part Offset2D
Part Part2DObject
Part Plane
Part Point
Part PointsFromMesh
Part Primitives
Part Prism
Part ProjectionOnSurface
Part RefineShape
Part RegularPolygon
Part ReverseShape
Part Revolve
Part RuledSurface
Part Scale
Part scripting
Part Section
Part SectionCut
Part ShapeFromMesh
Part SimpleCopy
Part Slice
Part SliceApart
Part Sphere
Part Spiral
Part Sweep
Part Thickness
Part TopoShape
Part Torus
Part TransformedCopy
Part Tube
Part Wedge
Part Workbench
Part XOR
PartDesign AdditiveBox
PartDesign AdditiveCone
PartDesign AdditiveCylinder
PartDesign AdditiveEllipsoid
PartDesign AdditiveHelix
PartDesign AdditiveLoft
PartDesign AdditivePipe
PartDesign AdditivePrism
PartDesign AdditiveSphere
PartDesign AdditiveTorus
PartDesign AdditiveWedge
PartDesign Bearingholder Tutorial I
PartDesign Bearingholder Tutorial II
PartDesign Body
PartDesign Boolean
PartDesign Chamfer
PartDesign Clone
PartDesign CoordinateSystem
PartDesign Draft
PartDesign Examples
PartDesign Feature
PartDesign Fillet
PartDesign Groove
PartDesign Hole
PartDesign InvoluteGear
PartDesign Line
PartDesign LinearPattern
PartDesign Migrate
PartDesign Mirrored
PartDesign MoveFeature
PartDesign MoveFeatureInTree
PartDesign MoveTip
PartDesign MultiTransform
PartDesign NewSketch
PartDesign Pad
PartDesign Plane
PartDesign Pocket
PartDesign Point
PartDesign PolarPattern
PartDesign Preferences
PartDesign Revolution
PartDesign Scaled
PartDesign ShapeBinder
PartDesign Sprocket
PartDesign SubShapeBinder
PartDesign SubtractiveBox
PartDesign SubtractiveCone
PartDesign SubtractiveCylinder
PartDesign SubtractiveEllipsoid
PartDesign SubtractiveHelix
PartDesign SubtractiveLoft
PartDesign SubtractivePipe
PartDesign SubtractivePrism
PartDesign SubtractiveSphere
PartDesign SubtractiveTorus
PartDesign SubtractiveWedge
PartDesign Thickness
PartDesign tutorial
PartDesign WizardShaft
PartDesign Workbench
Parts Library Workbench
PCB Workbench
PDF
Pivy
Placement
Placement API
Plot Axes
Plot Basic tutorial
Plot Grid
Plot Labels
Plot Legend
Plot MultiAxes tutorial
Plot Positions
Plot Save
Plot Series
Plot Workbench
Points Convert
Points Export
Points Import
Points Merge
Points PolyCut
Points Structure
Points Workbench
Post-Processing of FEM Results with Paraview
POV-Ray
POV-Ray-Rendering Workbench
Power users hub
Preference Packs
Preferences Editor
Private Preference Packs
Profiling
Property
Property editor
PropertyLink: InList and OutList
Pyramids and polyhedrons Workbench
Pyrate Workbench
PySide
PySide Advanced Examples
PySide Beginner Examples
PySide Intermediate Examples
PySide usage snippets
Python
Python console
Python Development Environment
Python scripting tutorial
PythonOCC
Qt Example
Quantity
Raytracing API example
Raytracing ExportProject
Raytracing InsertPart
Raytracing Lux
Raytracing New
Raytracing Preferences
Raytracing Render
Raytracing ResetCamera
Raytracing templates
Raytracing tutorial
Raytracing Workbench
Raytracing WriteCamera
Raytracing WritePart
Raytracing WriteView
Reinforcement API
Reinforcement BarBendingSchedule
Reinforcement BarShapeCutList
Reinforcement BeamRebars
Reinforcement BentShapeRebar
Reinforcement BillOfMaterial
Reinforcement ColumnRebars
Reinforcement ColumnRebars Circular
Reinforcement ColumnRebars TwoTiesSixRebars
Reinforcement Custom Spacing
Reinforcement DrawingDimensioning
Reinforcement FootingRebars
Reinforcement HelicalRebar
Reinforcement LShapeRebar
Reinforcement SlabRebars
Reinforcement StirrupRebar
Reinforcement StraightRebar
Reinforcement UShapeRebar
Reinforcement Workbench
Release notes 0.13
Release notes 0.14
Release notes 0.15
Release notes 0.16
Release notes 0.17
Release notes 0.18
Release notes 0.19
Release notes 0.20
Release notes 0.21
Release notes 1.0
Render Workbench
Report view
Reverse Engineering Workbench
Robot 6-Axis
Robot API example
Robot CreateRobot
Robot CreateTrajectory
Robot Edge2Trac
Robot Export
Robot InsertWaypoint
Robot InsertWaypointPre
Robot RestoreHomePos
Robot SetDefaultOrientation
Robot SetDefaultValues
Robot SetHomePos
Robot Simulate
Robot TrajectoryCompound
Robot TrajectoryDressUp
Robot tutorial
Robot Workbench
Rocket BodyTube
Rocket Bulkhead
Rocket CenteringRing
Rocket CompLaunchGuide
Rocket Ejection Charge Calculator
Rocket Fin
Rocket FinCan
Rocket LaunchLug
Rocket NoseCone
Rocket Parachute Size Calculator
Rocket RailButton
Rocket RailGuide
Rocket Thrust To Weight Calculator
Rocket Transition
Rocket Vent Hole Size Calculator
Rocket Workbench
Scenegraph
Scientific literature
Screenshots
Scripted objects
Scripted objects migration
Scripted objects saving attributes
Scripted objects with attachment
Scripted Parts: Ball Bearing - Part 1
Scripted Parts: Ball Bearing - Part 2
Scripting and macros
Scripts
SearchBar Mod
Selection API
Selection methods
Selection view
Shape
SheetMetal AddBase
SheetMetal AddBend
SheetMetal AddCornerRelief
SheetMetal AddFoldWall
SheetMetal AddJunction
SheetMetal AddRelief
SheetMetal AddWall
SheetMetal BaseShape
SheetMetal Examples
SheetMetal Extrude
SheetMetal Forming
SheetMetal SketchOnSheet
SheetMetal UnattendedUnfold
SheetMetal Unfold
SheetMetal Workbench
Ship AreasCurve
Ship Capacity
Ship CreateShip
Ship GZ
Ship Hydrostatics
Ship LoadCondition
Ship LoadExample
Ship Tank
Ship Weight
Ship Workbench
Silk Workbench
Sketch
Sketcher ArcOverlay
Sketcher BSplineComb
Sketcher BSplineConvertToNURBS
Sketcher BSplineDecreaseDegree
Sketcher BSplineDecreaseKnotMultiplicity
Sketcher BSplineDegree
Sketcher BSplineIncreaseDegree
Sketcher BSplineIncreaseKnotMultiplicity
Sketcher BSplineInsertKnot
Sketcher BSplineKnotMultiplicity
Sketcher BSplinePoleWeight
Sketcher BSplinePolygon
Sketcher CarbonCopy
Sketcher Clone
Sketcher CloseShape
Sketcher ConnectLines
Sketcher ConstrainAngle
Sketcher ConstrainBlock
Sketcher ConstrainCoincident
Sketcher ConstrainCoincidentUnified
Sketcher ConstrainDiameter
Sketcher ConstrainDistance
Sketcher ConstrainDistanceX
Sketcher ConstrainDistanceY
Sketcher ConstrainEqual
Sketcher ConstrainHorizontal
Sketcher ConstrainHorVer
Sketcher ConstrainLock
Sketcher ConstrainParallel
Sketcher ConstrainPerpendicular
Sketcher ConstrainPointOnObject
Sketcher ConstrainRadiam
Sketcher ConstrainRadius
Sketcher ConstrainSnellsLaw
Sketcher ConstrainSymmetric
Sketcher ConstrainTangent
Sketcher ConstrainVertical
Sketcher Copy
Sketcher Create3PointArc
Sketcher Create3PointCircle
Sketcher CreateArc
Sketcher CreateArcOfEllipse
Sketcher CreateArcOfHyperbola
Sketcher CreateArcOfParabola
Sketcher CreateArcSlot
Sketcher CreateBSpline
Sketcher CreateBSplineByInterpolation
Sketcher CreateChamfer
Sketcher CreateCircle
Sketcher CreateEllipseBy3Points
Sketcher CreateEllipseByCenter
Sketcher CreateFillet
Sketcher CreateHeptagon
Sketcher CreateHexagon
Sketcher CreateLine
Sketcher CreateOblong
Sketcher CreateOctagon
Sketcher CreatePentagon
Sketcher CreatePeriodicBSpline
Sketcher CreatePeriodicBSplineByInterpolation
Sketcher CreatePoint
Sketcher CreatePointFillet
Sketcher CreatePolyline
Sketcher CreateRectangle
Sketcher CreateRectangle Center
Sketcher CreateRegularPolygon
Sketcher CreateSlot
Sketcher CreateSquare
Sketcher CreateTriangle
Sketcher DeleteAllConstraints
Sketcher DeleteAllGeometry
Sketcher Dialog
Sketcher Dimension
Sketcher EditSketch
Sketcher Examples
Sketcher Extend
Sketcher External
Sketcher Grid
Sketcher helper constraint
Sketcher JoinCurves
Sketcher LeaveSketch
Sketcher MapSketch
Sketcher MergeSketches
Sketcher Micro Tutorial - Constraint Practices
Sketcher MirrorSketch
Sketcher Move
Sketcher NewSketch
Sketcher Offset
Sketcher Preferences
Sketcher RectangularArray
Sketcher reference
Sketcher RemoveAxesAlignment
Sketcher RenderingOrder
Sketcher ReorientSketch
Sketcher requirement for a sketch
Sketcher RestoreInternalAlignmentGeometry
Sketcher Rotate
Sketcher Scale
Sketcher scripting
Sketcher SelectConflictingConstraints
Sketcher SelectConstraints
Sketcher SelectElementsAssociatedWithConstraints
Sketcher SelectElementsWithDoFs
Sketcher SelectHorizontalAxis
Sketcher SelectOrigin
Sketcher SelectRedundantConstraints
Sketcher SelectVerticalAxis
Sketcher SketchObject
Sketcher Snap
Sketcher Split
Sketcher StopOperation
Sketcher SwitchVirtualSpace
Sketcher Symmetry
Sketcher ToggleActiveConstraint
Sketcher ToggleConstruction
Sketcher ToggleDrivingConstraint
Sketcher Translate
Sketcher Trimming
Sketcher Tutorial
Sketcher ValidateSketch
Sketcher ViewSection
Sketcher ViewSketch
Sketcher Workbench
Source code management
Source documentation
Sphinx
Splash screen
Spreadsheet
Spreadsheet AlignBottom
Spreadsheet AlignCenter
Spreadsheet AlignLeft
Spreadsheet AlignRight
Spreadsheet AlignTop
Spreadsheet AlignVCenter
Spreadsheet CreateSheet
Spreadsheet CSV
Spreadsheet Export
Spreadsheet Import
Spreadsheet MergeCells
Spreadsheet Preferences
Spreadsheet SetAlias
Spreadsheet SplitCell
Spreadsheet StyleBold
Spreadsheet StyleItalic
Spreadsheet StyleUnderline
Spreadsheet Workbench
Standard Menu
Start Preferences
Start up and Configuration
Start Workbench
Status bar
Std About
Std ActivateNextWindow
Std ActivatePrevWindow
Std AddonMgr
Std Alignment
Std AxisCross
Std Base
Std BoxElementSelection
Std BoxSelection
Std CascadeWindows
Std CloseActiveWindow
Std CloseAllWindows
Std Copy
Std Cut
Std Delete
Std DemoMode
Std DependencyGraph
Std DlgCustomize
Std DlgMacroExecute
Std DlgMacroExecuteDirect
Std DlgMacroRecord
Std DlgParameter
Std DlgPreferences
Std DrawStyle
Std DuplicateSelection
Std Edit
Std Edit Menu
Std Export
Std File Menu
Std FreeCADDonation
Std FreeCADFAQ
Std FreeCADForum
Std FreeCADPowerUserHub
Std FreeCADUserHub
Std FreeCADWebsite
Std FreezeViews
Std Group
Std Help Menu
Std HideObjects
Std HideSelection
Std Import
Std LinkImport
Std LinkImportAll
Std LinkMake
Std LinkMakeRelative
Std LinkReplace
Std LinkSelectAllLinks
Std LinkSelectLinked
Std LinkSelectLinkedFinal
Std LinkUnlink
Std Macro Menu
Std MacroAttachDebugger
Std MacroStartDebug
Std MacroStepInto
Std MacroStepOver
Std MacroStopDebug
Std MacroStopRecord
Std MainFullscreen
Std Measure
Std MeasureDistance
Std MergeProjects
Std New
Std OnlineHelp
Std Open
Std OrthographicCamera
Std Part
Std Paste
Std PerspectiveCamera
Std Placement
Std Print
Std PrintPdf
Std PrintPreview
Std ProjectInfo
Std ProjectUtil
Std PythonHelp
Std Quit
Std RandomColor
Std RecallWorkingView
Std RecentFiles
Std Redo
Std Refresh
Std ReportBug
Std Revert
Std Save
Std SaveAll
Std SaveAs
Std SaveCopy
Std SceneInspector
Std SelBack
Std SelBoundingBox
Std SelectAll
Std SelectVisibleObjects
Std SelForward
Std SendToPythonConsole
Std SetAppearance
Std ShowObjects
Std ShowSelection
Std StoreWorkingView
Std TextDocument
Std TextureMapping
Std TileWindows
Std ToggleBreakpoint
Std ToggleClipPlane
Std ToggleNavigation
Std ToggleObjects
Std ToggleSelectability
Std ToggleVisibility
Std Tools Menu
Std TransformManip
Std TreeCollapseDocument
Std TreeDrag
Std TreeMultiDocument
Std TreePreSelection
Std TreeRecordSelection
Std TreeSelection
Std TreeSingleDocument
Std TreeSyncPlacement
Std TreeSyncSelection
Std TreeSyncView
Std Undo
Std UnitsCalculator
Std UserEditMode
Std View Menu
Std ViewBottom
Std ViewBoxZoom
Std ViewCreate
Std ViewDimetric
Std ViewDockUndockFullscreen
Std ViewFitAll
Std ViewFitSelection
Std ViewFront
Std ViewFullscreen
Std ViewHome
Std ViewIsometric
Std ViewIvIssueCamPos
Std ViewIvStereoInterleavedColumns
Std ViewIvStereoInterleavedRows
Std ViewIvStereoOff
Std ViewIvStereoQuadBuff
Std ViewIvStereoRedGreen
Std ViewLeft
Std ViewLoadImage
Std ViewRear
Std ViewRight
Std ViewRotateLeft
Std ViewRotateRight
Std ViewScreenShot
Std ViewStatusBar
Std ViewTop
Std ViewTrimetric
Std ViewZoomIn
Std ViewZoomOut
Std WhatsThis
Std Windows
Std Windows Menu
Std Workbench
Stemfie Workbench
Surface BlendCurve
Surface CurveOnMesh
Surface ExtendFace
Surface Filling
Surface GeomFillSurface
Surface Sections
Surface Workbench
SVG
Svg Namespace
Swag
Symbols Library Workbench
Task panel
Tasks Placement
TechDraw 2LineCenterLine
TechDraw 2PointCenterLine
TechDraw 2PointCosmeticLine
TechDraw 3PtAngleDimension
TechDraw ActiveView
TechDraw AngleDimension
TechDraw Annotation
TechDraw API
TechDraw ArchView
TechDraw AxoLengthDimension
TechDraw Balloon
TechDraw BrokenView
TechDraw ClipGroup
TechDraw ClipGroupAdd
TechDraw ClipGroupRemove
TechDraw CommandAddOffsetVertex
TechDraw ComplexSection
TechDraw CosmeticCircle
TechDraw CosmeticEraser
TechDraw CosmeticVertex
TechDraw DecorateLine
TechDraw DetailView
TechDraw DiameterDimension
TechDraw DimensionRepair
TechDraw DraftView
TechDraw ExportPageDXF
TechDraw ExportPageSVG
TechDraw ExtensionArcLengthAnnotation
TechDraw ExtensionAreaAnnotation
TechDraw ExtensionCascadeHorizDimension
TechDraw ExtensionCascadeObliqueDimension
TechDraw ExtensionCascadeVertDimension
TechDraw ExtensionChangeLineAttributes
TechDraw ExtensionCircleCenterLines
TechDraw ExtensionCreateHorizChainDimension
TechDraw ExtensionCreateHorizChamferDimension
TechDraw ExtensionCreateHorizCoordDimension
TechDraw ExtensionCreateLengthArc
TechDraw ExtensionCreateObliqueChainDimension
TechDraw ExtensionCreateObliqueCoordDimension
TechDraw ExtensionCreateVertChainDimension
TechDraw ExtensionCreateVertChamferDimension
TechDraw ExtensionCreateVertCoordDimension
TechDraw ExtensionCustomizeFormat
TechDraw ExtensionDecreaseDecimal
TechDraw ExtensionDrawCosmArc
TechDraw ExtensionDrawCosmCircle
TechDraw ExtensionDrawCosmCircle3Points
TechDraw ExtensionExtendLine
TechDraw ExtensionHoleCircle
TechDraw ExtensionIncreaseDecimal
TechDraw ExtensionInsertDiameter
TechDraw ExtensionInsertSquare
TechDraw ExtensionLineParallel
TechDraw ExtensionLinePerpendicular
TechDraw ExtensionLockUnlockView
TechDraw ExtensionPosHorizChainDimension
TechDraw ExtensionPositionSectionView
TechDraw ExtensionPosObliqueChainDimension
TechDraw ExtensionPosVertChainDimension
TechDraw ExtensionRemovePrefixChar
TechDraw ExtensionSelectLineAttributes
TechDraw ExtensionShortenLine
TechDraw ExtensionThreadBoltBottom
TechDraw ExtensionThreadBoltSide
TechDraw ExtensionThreadHoleBottom
TechDraw ExtensionThreadHoleSide
TechDraw ExtensionVertexAtIntersection
TechDraw FaceCenterLine
TechDraw FillTemplateFields
TechDraw General Examples
TechDraw Geometric dimensioning and tolerancing
TechDraw GeometricHatch
TechDraw Hatch
TechDraw Hatching
TechDraw HoleShaftFit
TechDraw HorizontalDimension
TechDraw HorizontalExtentDimension
TechDraw HowTo Page
TechDraw Image
TechDraw LandmarkDimension
TechDraw LeaderLine
TechDraw LengthDimension
TechDraw LineGroup
TechDraw LinkDimension
TechDraw Midpoints
TechDraw MoveView
TechDraw PageDefault
TechDraw PageTemplate
TechDraw Pitch Circle Tutorial
TechDraw Preferences
TechDraw PrintAll
TechDraw ProjectionGroup
TechDraw ProjectShape
TechDraw Quadrants
TechDraw RadiusDimension
TechDraw RedrawPage
TechDraw RichTextAnnotation
TechDraw Section Examples
TechDraw SectionView
TechDraw ShareView
TechDraw ShowAll
TechDraw SpreadsheetView
TechDraw StackBottom
TechDraw StackDown
TechDraw StackTop
TechDraw StackUp
TechDraw SurfaceFinishSymbol
TechDraw Symbol
TechDraw TemplateGenerator
TechDraw TemplateHowTo
TechDraw Templates
TechDraw ToggleFrame
TechDraw VerticalDimension
TechDraw VerticalExtentDimension
TechDraw View
TechDraw WeldSymbol
TechDraw Workbench
TechDrawGui API
Testing
The FreeCAD source code
Third Party Libraries
Third Party Tools
Thread for Screw Tutorial
ThreadProfile Workbench
Timber Workbench
Toothbrush Head Stand
Topological data scripting
Topological naming problem
TopoShape API
Tracker
Transient FEM analysis
Translating an external workbench
Transportation Workbench
Tree view
Tutorial custom placing of windows and doors
Tutorial for open windows
Tutorial FreeCAD POV ray
Tutorial KinematicAssembly
Tutorial KinematicController
Tutorial KinematicSkeleton
Tutorial Render with Blender
Tutorials
Ubuntu Snap
Units
User hub
Vector API
Video tutorials
Video tutorials for architectural design
Video tutorials for product design
View Measure Clear All
View Measure Toggle All
ViewObject API
Viewprovider
VRML Preparation for Robot Simulation
Web BrowserBack
Web BrowserNext
Web BrowserRefresh
Web BrowserSetURL
Web BrowserStop
Web BrowserZoomIn
Web BrowserZoomOut
Web OpenWebsite
Web Workbench
WebTools BimServer
WebTools Git
WebTools Sketchfab
WebTools Workbench
Which workbench should I choose
Whiffle Ball tutorial
Wikihouse porting tutorial
WikiPages
WikiRobots
Windows packaging
Wood Frame Workbench
Workarounds
Workbench creation
Workbenches
Workfeature Workbench
Wrapping a Cplusplus class in Python
Language
aa - Qafár af
ab - аԥсшәа
abs - bahasa ambon
ace - Acèh
ady - адыгабзэ
ady-cyrl - адыгабзэ
aeb - تونسي / Tûnsî
aeb-arab - تونسي
aeb-latn - Tûnsî
af - Afrikaans
ak - Akan
aln - Gegë
alt - алтай тил
am - አማርኛ
ami - Pangcah
an - aragonés
ang - Ænglisc
ann - Obolo
anp - अंगिका
ar - العربية
arc - ܐܪܡܝܐ
arn - mapudungun
arq - جازايرية
ary - الدارجة
arz - مصرى
as - অসমীয়া
ase - American sign language
ast - asturianu
atj - Atikamekw
av - авар
avk - Kotava
awa - अवधी
ay - Aymar aru
az - azərbaycanca
azb - تۆرکجه
ba - башҡортса
ban - Basa Bali
ban-bali - ᬩᬲᬩᬮᬶ
bar - Boarisch
bbc - Batak Toba
bbc-latn - Batak Toba
bcc - جهلسری بلوچی
bci - wawle
bcl - Bikol Central
be - беларуская
be-tarask - беларуская (тарашкевіца)
bg - български
bgn - روچ کپتین بلوچی
bh - भोजपुरी
bho - भोजपुरी
bi - Bislama
bjn - Banjar
blk - ပအိုဝ်ႏဘာႏသာႏ
bm - bamanankan
bn - বাংলা
bo - བོད་ཡིག
bpy - বিষ্ণুপ্রিয়া মণিপুরী
bqi - بختیاری
br - brezhoneg
brh - Bráhuí
bs - bosanski
btm - Batak Mandailing
bto - Iriga Bicolano
bug - ᨅᨔ ᨕᨘᨁᨗ
bxr - буряад
ca - català
cbk-zam - Chavacano de Zamboanga
cdo - 閩東語 / Mìng-dĕ̤ng-ngṳ̄
ce - нохчийн
ceb - Cebuano
ch - Chamoru
cho - Chahta Anumpa
chr - ᏣᎳᎩ
chy - Tsetsêhestâhese
ckb - کوردی
co - corsu
cps - Capiceño
cr - Nēhiyawēwin / ᓀᐦᐃᔭᐍᐏᐣ
crh - qırımtatarca
crh-cyrl - къырымтатарджа (Кирилл)
crh-latn - qırımtatarca (Latin)
cs - čeština
csb - kaszëbsczi
cu - словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ
cv - чӑвашла
cy - Cymraeg
da - dansk
dag - dagbanli
de - Deutsch
de-at - Österreichisches Deutsch
de-ch - Schweizer Hochdeutsch
de-formal - Deutsch (Sie-Form)
dga - Dagaare
din - Thuɔŋjäŋ
diq - Zazaki
dsb - dolnoserbski
dtp - Dusun Bundu-liwan
dty - डोटेली
dv - ދިވެހިބަސް
dz - ཇོང་ཁ
ee - eʋegbe
egl - Emiliàn
el - Ελληνικά
eml - emiliàn e rumagnòl
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - español
es-419 - español de América Latina
es-formal - español (formal)
et - eesti
eu - euskara
ext - estremeñu
fa - فارسی
fat - mfantse
ff - Fulfulde
fi - suomi
fit - meänkieli
fj - Na Vosa Vakaviti
fo - føroyskt
fon - fɔ̀ngbè
fr - français
frc - français cadien
frp - arpetan
frr - Nordfriisk
fur - furlan
fy - Frysk
ga - Gaeilge
gaa - Ga
gag - Gagauz
gan - 贛語
gan-hans - 赣语(简体)
gan-hant - 贛語(繁體)
gcr - kriyòl gwiyannen
gd - Gàidhlig
gl - galego
gld - на̄ни
glk - گیلکی
gn - Avañe'ẽ
gom - गोंयची कोंकणी / Gõychi Konknni
gom-deva - गोंयची कोंकणी
gom-latn - Gõychi Konknni
gor - Bahasa Hulontalo
got - 𐌲𐌿𐍄𐌹𐍃𐌺
gpe - Ghanaian Pidgin
grc - Ἀρχαία ἑλληνικὴ
gsw - Alemannisch
gu - ગુજરાતી
guc - wayuunaiki
gur - farefare
guw - gungbe
gv - Gaelg
ha - Hausa
hak - 客家語/Hak-kâ-ngî
haw - Hawaiʻi
he - עברית
hi - हिन्दी
hif - Fiji Hindi
hif-latn - Fiji Hindi
hil - Ilonggo
ho - Hiri Motu
hr - hrvatski
hrx - Hunsrik
hsb - hornjoserbsce
hsn - 湘语
ht - Kreyòl ayisyen
hu - magyar
hu-formal - magyar (formal)
hy - հայերեն
hyw - Արեւմտահայերէն
hz - Otsiherero
ia - interlingua
id - Bahasa Indonesia
ie - Interlingue
ig - Igbo
igl - Igala
ii - ꆇꉙ
ik - Iñupiatun
ike-cans - ᐃᓄᒃᑎᑐᑦ
ike-latn - inuktitut
ilo - Ilokano
inh - гӀалгӀай
io - Ido
is - íslenska
it - italiano
iu - ᐃᓄᒃᑎᑐᑦ / inuktitut
ja - 日本語
jam - Patois
jbo - la .lojban.
jut - jysk
jv - Jawa
ka - ქართული
kaa - Qaraqalpaqsha
kab - Taqbaylit
kbd - адыгэбзэ
kbd-cyrl - адыгэбзэ
kbp - Kabɩyɛ
kcg - Tyap
kea - kabuverdianu
kg - Kongo
khw - کھوار
ki - Gĩkũyũ
kiu - Kırmancki
kj - Kwanyama
kjh - хакас
kjp - ဖၠုံလိက်
kk - қазақша
kk-arab - قازاقشا (تٴوتە)
kk-cn - قازاقشا (جۇنگو)
kk-cyrl - қазақша (кирил)
kk-kz - қазақша (Қазақстан)
kk-latn - qazaqşa (latın)
kk-tr - qazaqşa (Türkïya)
kl - kalaallisut
km - ភាសាខ្មែរ
kn - ಕನ್ನಡ
ko - 한국어
ko-kp - 조선말
koi - перем коми
kr - kanuri
krc - къарачай-малкъар
kri - Krio
krj - Kinaray-a
krl - karjal
ks - कॉशुर / کٲشُر
ks-arab - کٲشُر
ks-deva - कॉशुर
ksh - Ripoarisch
ksw - စှီၤ
ku - kurdî
ku-arab - كوردي (عەرەبی)
ku-latn - kurdî (latînî)
kum - къумукъ
kus - Kʋsaal
kv - коми
kw - kernowek
ky - кыргызча
la - Latina
lad - Ladino
lb - Lëtzebuergesch
lbe - лакку
lez - лезги
lfn - Lingua Franca Nova
lg - Luganda
li - Limburgs
lij - Ligure
liv - Līvõ kēļ
lki - لەکی
lld - Ladin
lmo - lombard
ln - lingála
lo - ລາວ
loz - Silozi
lrc - لۊری شومالی
lt - lietuvių
ltg - latgaļu
lus - Mizo ţawng
luz - لئری دوٙمینی
lv - latviešu
lzh - 文言
lzz - Lazuri
mad - Madhurâ
mag - मगही
mai - मैथिली
map-bms - Basa Banyumasan
mdf - мокшень
mg - Malagasy
mh - Ebon
mhr - олык марий
mi - Māori
min - Minangkabau
mk - македонски
ml - മലയാളം
mn - монгол
mni - ꯃꯤꯇꯩ ꯂꯣꯟ
mnw - ဘာသာ မန်
mo - молдовеняскэ
mos - moore
mr - मराठी
mrh - Mara
mrj - кырык мары
ms - Bahasa Melayu
ms-arab - بهاس ملايو
mt - Malti
mus - Mvskoke
mwl - Mirandés
my - မြန်မာဘာသာ
myv - эрзянь
mzn - مازِرونی
na - Dorerin Naoero
nah - Nāhuatl
nan - Bân-lâm-gú
nap - Napulitano
nb - norsk bokmål
nds - Plattdüütsch
nds-nl - Nedersaksies
ne - नेपाली
new - नेपाल भाषा
ng - Oshiwambo
nia - Li Niha
niu - Niuē
nl - Nederlands
nl-informal - Nederlands (informeel)
nmz - nawdm
nn - norsk nynorsk
no - norsk
nod - ᨣᩤᩴᨾᩮᩬᩥᨦ
nog - ногайша
nov - Novial
nqo - ߒߞߏ
nrm - Nouormand
nso - Sesotho sa Leboa
nv - Diné bizaad
ny - Chi-Chewa
nyn - runyankore
nys - Nyunga
oc - occitan
ojb - Ojibwemowin
olo - livvinkarjala
om - Oromoo
or - ଓଡ଼ିଆ
os - ирон
pa - ਪੰਜਾਬੀ
pag - Pangasinan
pam - Kapampangan
pap - Papiamentu
pcd - Picard
pcm - Naijá
pdc - Deitsch
pdt - Plautdietsch
pfl - Pälzisch
pi - पालि
pih - Norfuk / Pitkern
pl - polski
pms - Piemontèis
pnb - پنجابی
pnt - Ποντιακά
prg - prūsiskan
ps - پښتو
pt - português
pt-br - português do Brasil
pwn - pinayuanan
qqq - Message documentation
qu - Runa Simi
qug - Runa shimi
rgn - Rumagnôl
rif - Tarifit
rki - ရခိုင်
rm - rumantsch
rmc - romaňi čhib
rmy - romani čhib
rn - ikirundi
ro - română
roa-tara - tarandíne
rsk - руски
ru - русский
rue - русиньскый
rup - armãneashti
ruq - Vlăheşte
ruq-cyrl - Влахесте
ruq-latn - Vlăheşte
rw - Ikinyarwanda
ryu - うちなーぐち
sa - संस्कृतम्
sah - саха тыла
sat - ᱥᱟᱱᱛᱟᱲᱤ
sc - sardu
scn - sicilianu
sco - Scots
sd - سنڌي
sdc - Sassaresu
sdh - کوردی خوارگ
se - davvisámegiella
se-fi - davvisámegiella (Suoma bealde)
se-no - davvisámegiella (Norgga bealde)
se-se - davvisámegiella (Ruoŧa bealde)
sei - Cmique Itom
ses - Koyraboro Senni
sg - Sängö
sgs - žemaitėška
sh - srpskohrvatski / српскохрватски
sh-cyrl - српскохрватски (ћирилица)
sh-latn - srpskohrvatski (latinica)
shi - Taclḥit
shi-latn - Taclḥit
shi-tfng - ⵜⴰⵛⵍⵃⵉⵜ
shn - ၽႃႇသႃႇတႆး
shy - tacawit
shy-latn - tacawit
si - සිංහල
simple - Simple English
sjd - кӣллт са̄мь кӣлл
sje - bidumsámegiella
sk - slovenčina
skr - سرائیکی
skr-arab - سرائیکی
sl - slovenščina
sli - Schläsch
sm - Gagana Samoa
sma - åarjelsaemien
smn - anarâškielâ
sms - nuõrttsääʹmǩiõll
sn - chiShona
so - Soomaaliga
sq - shqip
sr - српски / srpski
sr-ec - српски (ћирилица)
sr-el - srpski (latinica)
srn - Sranantongo
sro - sardu campidanesu
ss - SiSwati
st - Sesotho
stq - Seeltersk
sty - себертатар
su - Sunda
sv - svenska
sw - Kiswahili
syl - ꠍꠤꠟꠐꠤ
szl - ślůnski
szy - Sakizaya
ta - தமிழ்
tay - Tayal
tcy - ತುಳು
tdd - ᥖᥭᥰᥖᥬᥳᥑᥨᥒᥰ
te - తెలుగు
tet - tetun
tg - тоҷикӣ
tg-cyrl - тоҷикӣ
tg-latn - tojikī
th - ไทย
ti - ትግርኛ
tk - Türkmençe
tl - Tagalog
tly - tolışi
tly-cyrl - толыши
tn - Setswana
to - lea faka-Tonga
tok - toki pona
tpi - Tok Pisin
tr - Türkçe
tru - Ṫuroyo
trv - Seediq
ts - Xitsonga
tt - татарча / tatarça
tt-cyrl - татарча
tt-latn - tatarça
tum - chiTumbuka
tw - Twi
ty - reo tahiti
tyv - тыва дыл
tzm - ⵜⴰⵎⴰⵣⵉⵖⵜ
udm - удмурт
ug - ئۇيغۇرچە / Uyghurche
ug-arab - ئۇيغۇرچە
ug-latn - Uyghurche
uk - українська
ur - اردو
uz - oʻzbekcha / ўзбекча
uz-cyrl - ўзбекча
uz-latn - oʻzbekcha
ve - Tshivenda
vec - vèneto
vep - vepsän kel’
vi - Tiếng Việt
vls - West-Vlams
vmf - Mainfränkisch
vmw - emakhuwa
vo - Volapük
vot - Vaďďa
vro - võro
wa - walon
wal - wolaytta
war - Winaray
wls - Fakaʻuvea
wo - Wolof
wuu - 吴语
xal - хальмг
xh - isiXhosa
xmf - მარგალური
xsy - saisiyat
yi - ייִדיש
yo - Yorùbá
yrl - Nhẽẽgatú
yue - 粵語
za - Vahcuengh
zea - Zeêuws
zgh - ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ
zh - 中文
zh-cn - 中文(中国大陆)
zh-hans - 中文(简体)
zh-hant - 中文(繁體)
zh-hk - 中文(香港)
zh-mo - 中文(澳門)
zh-my - 中文(马来西亚)
zh-sg - 中文(新加坡)
zh-tw - 中文(臺灣)
zu - isiZulu
Format
Export for off-line translation
Export in native format
Export in CSV format
Fetch
<languages/> {{TOCright}} ==Introduction== This page covers medium level examples of the [[PySide|PySide]] GUI manager (accompanying pages cover aspects that are both less or more advanced, [[PySide_Beginner_Examples|Beginner PySide Examples]] and [[PySide_Advanced_Examples|Advanced PySide Examples]]). In this page an example program is used to cover the different PySide topics. The intention is to present some functional PySide code so anyone who needs to use PySide can copy out the relevant section, modify and adapt it to their own purposes. ===Notes=== * This page is not intended to cover the Python language or to serve as an instruction in Python. * The variable names are not descriptive but have been kept in sequence to better organise the explanations * There are numerous naming conventions for GUI components, none of which are "right" or "wrong" * There are a variety of different sequencings of the declarations for the widgets, the signals, the methods, once again none are "right" or "wrong" * It is worth keeping in mind that PySide operates with strings when dealing with user input, what appears on the screen as a number is actually a text representation of a number ==Code Based Discussion - Declarative Portion== The "example program" is actually a large Class definition, the definition of a PySide GUI class, and has over 150 lines of code (including comments). There is no functional purpose to the Class or it's behaviour, the sole purpose is to demonstrate possible GUI actions and present some code that hopefully can be used by other FreeCAD users. The Class definition and the small number of lines of code that invoke are described in the order the occur in the file. This order is based on the screen layout which is rather arbitrary and solely intended to demonstrate features. This is the modal GUI screen the PySide Class generates: [[File:PySideScreenSnapshot3.jpg]] Most of the remainder of this section will describe the contents of the Class definition which appears at the end of this section. First we will cover the declarative elements that define how things operate and how the GUI is assembled, then we will cover the operative sections (i.e. the code that will execute when user interactions occur). This window is based on the class QDialog and so is modal - which means no activities can be made outside of the window while it is open. ===Import Statement=== The mandatory Import statement {{Code|code= from PySide import QtGui, QtCore }} This is best placed at the top of the Python file. ===Class Definition=== {{Code|code= class ExampleModalGuiClass(QtGui.QDialog): """""" def __init__(self): super(ExampleModalGuiClass, self).__init__() self.initUI() def initUI(self): }} This code is best copied out verbatim and altered. The gist of the code is that we are sub-classing the QDialog Class of PySide. In adapting this code you will want to change the class name "ExampleModalGuiClass" - make sure to change it in both locations (e.g. lines 1 & 4). ===Window Return Status=== {{Code|code= self.result = userCancelled }} This is not mandatory but rather a good programming practice, this sets a default return status for the window which will be there regardless of what the user does. Later in the code this may be changed by the Python code to indicate different options the user may have selected. ===Window Creation=== {{Code|code= # create our window # define window xLoc,yLoc,xDim,yDim self.setGeometry( 250, 250, 400, 350) self.setWindowTitle("Our Example Program Window") self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) }} Remembering that screen dimensions are measured from the upper-left corner, on the 3rd line the values refer to: * the number of pixels the upper-left corner will be to the right of the lefthand screen edge (250) * the number of pixels the upper-left corner will be below the upper screen edge (250) * the width of the screen in pixels (400) * the height of the screen in pixels (350) The title of the window is set and the final line simply means that this window will never be obscured by another window - if this is not desired then simply place a Python comment character ('#') as the first character of the line. ===Label Creation=== {{Code|code= # create some Labels self.label1 = QtGui.QLabel(" ", self) self.label1.setFont('Courier') # set to a non-proportional font self.label1.move(20, 20) self.label2 = QtGui.QLabel("sample string number two", self) self.label2.move(20, 70) self.label3 = QtGui.QLabel(" ", self) self.label3.setFont('Courier') # set to a non-proportional font self.label3.move(20, 120) self.label4 = QtGui.QLabel("can you see this?", self) self.label4.move(20, 170) }} In PySide labels serve two purposes, static labels (as the name implies) as well as read-only (i.e. display-only) text fields. So unchanging instructions to the user such as "Don't push the red button" as well as dynamic calculation results such as "42" can be communicated to the user. The 2nd line declares a Label and sets it's initial value (which is blank in this case). The 3rd line specifies the font, any font (on the system) can be specified, if not specified the default font is used. In this case the font is specified as a non-proportional one. The label is moved to it's location in the window - it's coordinates specify it's position with respect to the window (not the screen). ===Checkbox Creation=== {{Code|code= # checkboxes self.checkbox1 = QtGui.QCheckBox("Left side", self) self.checkbox1.clicked.connect(self.onCheckbox1) #self.checkbox1.toggle() # will set an initial value if executed self.checkbox1.move(210,10) # self.checkbox2 = QtGui.QCheckBox("Right side", self) self.checkbox2.clicked.connect(self.onCheckbox2) self.checkbox2.move(210,30) }} Checkboxes can be off and on in any combination (unlike radio buttons). Line 2 declares one and set's it initial Value. Line 3 specifies which method will be executed when the Checkbox is clicked (in this case the method 'onCheckBox1'). If the 4th line did not have the Python comment character ('#') as the first character, then it would be executed and it would mark the checkbox as checked. Finally the 5th line moves the Checkbox into position. ===Radio Button Creation=== {{Code|code= # radio buttons self.radioButton1 = QtGui.QRadioButton("random string one",self) self.radioButton1.clicked.connect(self.onRadioButton1) self.radioButton1.move(210,60) # self.radioButton2 = QtGui.QRadioButton("owt gnirts modnar",self) self.radioButton2.clicked.connect(self.onRadioButton2) self.radioButton2.move(210,80) }} The creation of the Radio Buttons is very similar to the Checkboxes. The only difference really is the behaviour of the Radio Buttons in that only one of them can be 'on' at a time. ===Pop-Up Menu Creation=== {{Code|code= # set up lists for pop-ups self.popupItems1 = ("pizza","apples","candy","cake","potatoes") # set up pop-up menu self.popup1 = QtGui.QComboBox(self) self.popup1.addItems(self.popupItems1) self.popup1.setCurrentIndex(self.popupItems1.index("candy")) self.popup1.activated[str].connect(self.onPopup1) self.popup1.move(210, 115) }} In line 2 a list is built up of what will be the user choices. An alternative is to build up a Dictionary but only use the Keys for the list of menu choices. Line 4 creates the pop-up menu (known as a ComboBox to PySide), the user options are added in line 5. As a side note, if the Dictionary was used then the lines would appear as: {{Code|code= self.popupItems1 = OrderedDict([("2","widget"),("pink","foobar"),("4","galopsis")]) self.popup1.addItems(self.popupItems1.keys()) }} Returning to the main code sample for this section, line 6 sets the default choice, this line may be omitted, also the value of the default choice could be loaded into the corresponding Label (once again if appropriate). And finally the move into position at line 8. ===Button Creation Part 1=== {{Code|code= # toggle visibility button pushButton1 = QtGui.QPushButton('Toggle visibility', self) pushButton1.clicked.connect(self.onPushButton1) pushButton1.setAutoDefault(False) pushButton1.move(210, 165) }} The button is created in line 2 with it's name, the handler for it's signal when clicked is specified in line 3. Line 4 is there to prevent the button from becoming the 'default button' - the button that will be clicked if the user simply presses the {{KEY|Return}} key. And a move to position finished up the code segment. ===Button Creation Part 2=== {{Code|code= # cancel button cancelButton = QtGui.QPushButton('Cancel', self) cancelButton.clicked.connect(self.onCancel) cancelButton.setAutoDefault(True) cancelButton.move(150, 280) # OK button okButton = QtGui.QPushButton('OK', self) okButton.clicked.connect(self.onOk) okButton.move(260, 280) }} Both buttons are created with a name (which will appear as their label), associated with a method which will execute when they are clicked, and moved into position. The one exception is line 4 which specifies the 'Cancel' button as the default button - that means it will be "clicked" if the user preses the {{KEY|Return}} key. ===Text Input Creation=== {{Code|code= # text input field self.textInput = QtGui.QLineEdit(self) self.textInput.setText("cats & dogs") self.textInput.setFixedWidth(190) self.textInput.move(20, 220) }} The QLineEdit widget is probably the most common for user textual input, in this example the code section after this one will set up a contextual menu to operate on it. This code section creates (line 2), sets an initial value (line 3), sets a width to the field (line 4) and moves the widget into place (line 5). ===QuantitySpinBox Creation=== {{Code|code= # QuantitySpinBox from FreeCAD import Units ui = FreeCADGui.UiLoader() quantityInput = ui.createWidget("Gui::QuantitySpinBox") self.quantityInput.setProperty( 'minimum', 0.0) potential = 2.87 unit = "V" # only set the value self.quantityInput.setProperty('rawValue', potential ) # set quantity (value + unit) quantity = Units.Quantity("{} {}".format(potential , unit)) self.quantityInput.setProperty('value', quantity) # read value from the spinbox quantity = self.quantityInput.property('value') }} The Gui::QuantitySpinBox widget is a FreeCAD-special, designed to display and handle values together with their [[Expressions#Units|units]]. It is derived from Qt's [https://doc.qt.io/qt-5/qabstractspinbox.html QAbstractSpinBox class]. For all its properties see the list in the source code file [https://github.com/FreeCAD/FreeCAD/blob/master/src/Gui/QuantitySpinBox.h#L42 QuantitySpinBox.h] ===Contextual Menu Creation=== {{Code|code= # set contextual menu options for text editing widget # set text field to some dogerel popMenuAction1 = QtGui.QAction(self) popMenuAction1.setText("load some text") popMenuAction1.triggered.connect(self.onPopMenuAction1) # make text uppercase popMenuAction2 = QtGui.QAction(self) popMenuAction2.setText("uppercase") popMenuAction2.triggered.connect(self.onPopMenuAction2) # menu dividers popMenuDivider = QtGui.QAction(self) popMenuDivider.setText('---------') popMenuDivider.triggered.connect(self.onPopMenuDivider) # remove all text popMenuAction3 = QtGui.QAction(self) popMenuAction3.setText("clear") popMenuAction3.triggered.connect(self.onPopMenuAction3) # define menu and add options self.textInput.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) self.textInput.addAction(popMenuAction1) self.textInput.addAction(popMenuAction2) self.textInput.addAction(popMenuDivider) self.textInput.addAction(popMenuAction3) }} This code has numerous repetitions as the same action is performed with different values - this is part of what makes GUI code so lengthy (no matter what the system). First a QAction is created - it is a pairing (or linkage) of the text that the user will see as their selectable option along with the method that will execute if they select that option. It is basically a pairing of a user choice with a piece of code. Line 3 creates it, line 4 defines the user option (as they will see it) and line 5 specifies which piece of Python code will execute. Skipping to line 19 (the line with "self.textInput.setContextMenuPolicy") a ActionsContextMenu is created which is holder for all the separate QAction linkages between user choice and code to execute. Each widget can only have a single Contextual Menu (i.e. the menu associated with the right-click) so line 19 defines that menu. The following 4 lines add the linkages created at the beginning of this code section. Order is significant here, the user will see the menu options in the order they are added. Notice that the 3rd menu option is really a bit of nothing, it's code is null but it serves to separate 2 groups of options on the Contextual Menu. ===Numeric Input Creation=== {{Code|code= # numeric input field self.numericInput = QtGui.QLineEdit(self) self.numericInput.setInputMask("999") self.numericInput.setText("000") self.numericInput.setFixedWidth(50) self.numericInput.move(250, 220) }} The creation of the field for numeric input really follows that for Text Input earlier. In fact the code is identical with exception of the 3rd and 4th lines. The 3rd line sets the Mask as defined by PySide, which in this case specifies up to 3 digits (which may include 0). A full list of the InputMask codes can be found at [http://doc.qt.io/qt-5/qlineedit.html#inputMask-prop QLineEdit InputMask] ===Window Display=== {{Code|code= # now make the window visible self.show() }} There is only one line and it causes the GUI to be displayed after the setup. ==Code Based Discussion - Operative Portion== We now move onto the operative portion of the GUI definition which is the code that executes in response to user interactions with the GUI. The order of statement groups is not very relevant - with the caveat that something must be declared before it can be referenced. Some people put all the handlers of a certain type (e.g. handlers for buttons) in one group, others list the handlers alphabetically. For specific application there may be a problem related reason that all handlers relating to a specific aspect be gathered together There is a high degree of similarity between the handlers. Most do not receive a parameter, the fact they are executing is realy the only parameter (or signal) they get. Others like "onPopup1" and "mousePressEvent" accept a parameter. There must be a one to one correspondance between the handlers specified in the declarative section and the handler declared in this, the operative section. There may be extra handlers declared which are never invoked but there may not be any missing. ===Generic Handler=== In this code example, generic handlers handle the following events: * onCheckbox1 * onCheckbox2 * onRadioButton1 * onRadioButton2 * onPushButton1 * onPopMenuAction1 * onPopMenuAction2 * onPopMenuDivider * onPopMenuAction3 * onCancel * onOk The general form for the handlers is: {{Code|code= def handlerName(self): lineOfCode1 lineOfCode2 }} The first line has the keyword "def" followed by the handler name. The handler name must match the name from the earlier declarative section exactly. The parameter "self" is part of the standard syntax as are the enclosing parenthesis and the final colon character. Once the first line is finished then there are no requirements of the following code, it is purely application specific. ===Pop-Up Menu Handler=== {{Code|code= def onPopup1(self, selectedText): }} The Pop-Up menu handler is the same as the generic handler with exception that a second parameter, the text selected by the user, is passed in. Remember that everything is text coming from the Pop-Up menu and even if the user has selected the number 3, it will be passed in as the string "3". ===Mouse Event Handler=== {{Code|code= def mousePressEvent(self, event): # print mouse position, X & Y print("X = ", event.pos().x()) print("Y = ", event.pos().y()) # if event.button() == QtCore.Qt.LeftButton: print("left mouse button") if self.label1.underMouse(): print("over the text '"+self.label1.text()+"'") }} The Mouse Event handler is the same as the generic handler with exception that a second parameter, the mouse event (e.g. left-click, right-click) from the user is passed in. The name of the handler, "mousePressEvent", is reserved and if it is changed then the handler will no longer receive the event from the mouse presses. The X and Y coordinates of the mouse press are given by the reference "event.pos().x()" and "event.pos().y()". The constants "QtCore.Qt.LeftButton" and "QtCore.Qt.RightButton" are used to determine which mouse button was pressed. A reference to a widget can be made of the form "self.widgetName.underMouse()" which will return {{TRUE}} or {{FALSE}} as to whether the mouse cursor is over the widget "widgetName". Although presented in the same code excerpt the "underMouse()" handler is not tied to the "mousePressEvent" handler and can be used at any time. ==Code Based Discussion - Main Routine== Most of the volume of code is in the GUI Class definition, there is not much in the main procedure. {{Code|code= # Constant definitions global userCancelled, userOK userCancelled = "Cancelled" userOK = "OK" }} Lines 2,3 & 4 deal with coordinating the status of the user interaction with the GUI - e.g. Cancelled, OK, or any other application defined status. The handler routines On Cancel and OnOk earlier also set these statuses. {{Code|code= form = ExampleGuiClass() form.exec_() if form.result==userCancelled: pass # steps to handle user clicking Cancel if form.result==userOK: # steps to handle user clicking OK localVariable1 = form.label1.text() localVariable2 = form.label2.text() localVariable3 = form.label3.text() localVariable4 = form.label4.text() }} Lines 1 and 2 show the method for invoking the GUI. There may be multiple GUI definitions for a program and also the GUI need not be invoked as the first thing in the Python file, it may be invoked at any point. The Name of the GUI Class is specified in line 1 ("ExampleGuiClass" in this case) but the rest of the 2 lines are to be copied verbatim. Lines 4 and 6 use the result field to determine the appropriate action. The last 4 lines simply show the copying of the data in the GUI object to variables local to the executing main procedure. ==Complete Modal Code Example== This is the complete code example (developed on FreeCAD v0.14): {{Code|code= # import statements from PySide import QtGui, QtCore # UI Class definitions class ExampleModalGuiClass(QtGui.QDialog): """""" def __init__(self): super(ExampleModalGuiClass, self).__init__() self.initUI() def initUI(self): self.result = userCancelled # create our window # define window xLoc,yLoc,xDim,yDim self.setGeometry( 250, 250, 400, 350) self.setWindowTitle("Our Example Modal Program Window") self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) # create some Labels self.label1 = QtGui.QLabel(" ", self) self.label1.setFont('Courier') # set to a non-proportional font self.label1.move(20, 20) self.label2 = QtGui.QLabel("sample string number two", self) self.label2.move(20, 70) self.label3 = QtGui.QLabel(" ", self) self.label3.setFont('Courier') # set to a non-proportional font self.label3.move(20, 120) self.label4 = QtGui.QLabel("can you see this?", self) self.label4.move(20, 170) # checkboxes self.checkbox1 = QtGui.QCheckBox("Left side", self) self.checkbox1.clicked.connect(self.onCheckbox1) #self.checkbox1.toggle() # will set an initial value if executed self.checkbox1.move(210,10) # self.checkbox2 = QtGui.QCheckBox("Right side", self) self.checkbox2.clicked.connect(self.onCheckbox2) self.checkbox2.move(210,30) # radio buttons self.radioButton1 = QtGui.QRadioButton("random string one",self) self.radioButton1.clicked.connect(self.onRadioButton1) self.radioButton1.move(210,60) # self.radioButton2 = QtGui.QRadioButton("owt gnirts modnar",self) self.radioButton2.clicked.connect(self.onRadioButton2) self.radioButton2.move(210,80) # set up lists for pop-ups self.popupItems1 = ("pizza","apples","candy","cake","potatoes") # set up pop-up menu self.popup1 = QtGui.QComboBox(self) self.popup1.addItems(self.popupItems1) self.popup1.setCurrentIndex(self.popupItems1.index("candy")) self.popup1.activated[str].connect(self.onPopup1) self.popup1.move(210, 115) # toggle visibility button pushButton1 = QtGui.QPushButton('Toggle visibility', self) pushButton1.clicked.connect(self.onPushButton1) pushButton1.setAutoDefault(False) pushButton1.move(210, 165) # text input field self.textInput = QtGui.QLineEdit(self) self.textInput.setText("cats & dogs") self.textInput.setFixedWidth(190) self.textInput.move(20, 220) # set contextual menu options for text editing widget # set text field to some dogerel popMenuAction1 = QtGui.QAction(self) popMenuAction1.setText("load some text") popMenuAction1.triggered.connect(self.onPopMenuAction1) # make text uppercase popMenuAction2 = QtGui.QAction(self) popMenuAction2.setText("uppercase") popMenuAction2.triggered.connect(self.onPopMenuAction2) # menu dividers popMenuDivider = QtGui.QAction(self) popMenuDivider.setText('---------') popMenuDivider.triggered.connect(self.onPopMenuDivider) # remove all text popMenuAction3 = QtGui.QAction(self) popMenuAction3.setText("clear") popMenuAction3.triggered.connect(self.onPopMenuAction3) # define menu and add options self.textInput.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) self.textInput.addAction(popMenuAction1) self.textInput.addAction(popMenuAction2) self.textInput.addAction(popMenuDivider) self.textInput.addAction(popMenuAction3) # numeric input field self.numericInput = QtGui.QLineEdit(self) self.numericInput.setInputMask("999") self.numericInput.setText("000") self.numericInput.setFixedWidth(50) self.numericInput.move(250, 220) # cancel button cancelButton = QtGui.QPushButton('Cancel', self) cancelButton.clicked.connect(self.onCancel) cancelButton.setAutoDefault(True) cancelButton.move(150, 280) # OK button okButton = QtGui.QPushButton('OK', self) okButton.clicked.connect(self.onOk) okButton.move(260, 280) # now make the window visible self.show() # def onCheckbox1(self): text = self.label1.text() if text[0]==' ': self.label1.setText('left'+text[4:]) else: self.label1.setText(' '+text[4:]) def onCheckbox2(self): text = self.label1.text() if text[-1]==' ': self.label1.setText(text[:-5]+'right') else: self.label1.setText(text[:-5]+' ') def onRadioButton1(self): self.label2.setText(self.radioButton1.text()) def onRadioButton2(self): self.label2.setText(self.radioButton2.text()) def onPopup1(self, selectedText): if self.label3.text().isspace(): self.label3.setText(selectedText) else: self.label3.setText(self.label3.text()+","+selectedText) def onPushButton1(self): if self.label4.isVisible(): self.label4.hide() else: self.label4.show() def onPopMenuAction1(self): # load some text into field self.textInput.setText("Lorem ipsum dolor sit amet") def onPopMenuAction2(self): # set text in field to uppercase self.textInput.setText(self.textInput.text().upper()) def onPopMenuDivider(self): # this option is the divider and is really there as a spacer on the menu list # consequently it has no functional code to execute if user selects it pass def onPopMenuAction3(self): # clear the text from the field self.textInput.setText('') def onCancel(self): self.result = userCancelled self.close() def onOk(self): self.result = userOK self.close() def mousePressEvent(self, event): # print mouse position, X & Y print("X = ", event.pos().x()) print("Y = ", event.pos().y()) # if event.button() == QtCore.Qt.LeftButton: print("left mouse button") if self.label1.underMouse(): print("over the text '"+self.label1.text()+"'") if self.label2.underMouse(): print("over the text '"+self.label2.text()+"'") if self.label3.underMouse(): print("over the text '"+self.label3.text()+"'") if self.label4.underMouse(): print("over the text '"+self.label4.text()+"'") if self.textInput.underMouse(): print("over the text '"+self.textInput.text()+"'") if event.button() == QtCore.Qt.RightButton: print("right mouse button") # Class definitions # Function definitions # Constant definitions userCancelled = "Cancelled" userOK = "OK" # code *********************************************************************************** form = ExampleModalGuiClass() form.exec_() if form.result==userCancelled: pass # steps to handle user clicking Cancel if form.result==userOK: # steps to handle user clicking OK localVariable1 = form.label1.text() localVariable2 = form.label2.text() localVariable3 = form.label3.text() localVariable4 = form.label4.text() # #OS: Mac OS X #Word size: 64-bit #Version: 0.14.3703 (Git) #Branch: releases/FreeCAD-0-14 #Hash: c6edd47334a3e6f209e493773093db2b9b4f0e40 #Python version: 2.7.5 #Qt version: 4.8.6 #Coin version: 3.1.3 #SoQt version: 1.5.0 #OCC version: 6.7.0 # }} The best way to use this code is to copy it into an editor or FreeCAD macro file and play around with it. ==Code Based Discussion - Nonmodal Code Example== All of the widget specific from the previous modal example transfer to use in a nonmodal window. The main difference is that the nonmodal window does not restrict the user from interacting with other windows. Basically, a nonmodal window is one that can be opened and left open for as long as needed without it placing any restrictions on other application windows. There are a small number of code differences between the two which will be highlighted, consequently this code example is quite brief. Anything that is the same as the previous modal example will be left out in the interests of keeping this overview brief. This is the nonmodal GUI screen the PySide Class generates: [[File:PySideScreenSnapshot4.jpg]] ===Import Statement=== The mandatory Import statement {{Code|code= from PySide import QtGui, QtCore }} This is best placed at the top of the Python file. ===Class Definition=== {{Code|code= class ExampleNonmodalGuiClass(QtGui.QMainWindow): """""" def __init__(self): super(ExampleNonmodalGuiClass, self).__init__() self.initUI() def initUI(self): }} This code is best copied out verbatim and altered. The gist of the code is that we are sub-classing the QMainWindow Class of PySide. In adapting this code you will want to change the class name "ExampleNonmodalGuiClass" - make sure to change it in both locations (e.g. lines 1 & 4). ===Window Creation=== {{Code|code= # create our window # define window xLoc,yLoc,xDim,yDim self.setGeometry( 250, 250, 400, 150) self.setWindowTitle("Our Example Nonmodal Program Window") self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) self.setMouseTracking(True) }} Obviously our window dimensions and title are different. The main point to note is the last line which lets PySide know that it is to send out mouse position events as they happen. Note that these events will not be sent out when the mouse is over a widget like a button as the widget will capture the events. ===Mouse Move Event Handler=== {{Code|code= def mouseMoveEvent(self,event): self.label6.setText("X: "+str(event.x()) + " Y: "+str(event.y())) }} This handler receives the event of a Mouse Move and displays the formatted form of it. Test what happens when it is over widgets or outside of the window. ===Invoking the Window=== {{Code|code= form = ExampleNonmodalGuiClass() }} Invoking the window is another area of difference from the previous example. This time only 1 line is needed for invoking the GUI. ==Complete Nonmodal Code Example== {{Code|code= from PySide import QtGui, QtCore # UI Class definitions class ExampleNonmodalGuiClass(QtGui.QMainWindow): """""" def __init__(self): super(ExampleNonmodalGuiClass, self).__init__() self.initUI() def initUI(self): self.result = userCancelled # create our window # define window xLoc,yLoc,xDim,yDim self.setGeometry( 250, 250, 400, 150) self.setWindowTitle("Our Example Nonmodal Program Window") self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) self.setMouseTracking(True) # create Labels self.label4 = QtGui.QLabel("can you see this?", self) self.label4.move(20, 20) self.label5 = QtGui.QLabel("Mouse position:", self) self.label5.move(20, 70) self.label6 = QtGui.QLabel(" ", self) self.label6.move(135, 70) # toggle visibility button pushButton1 = QtGui.QPushButton('Toggle visibility', self) pushButton1.clicked.connect(self.onPushButton1) pushButton1.setMinimumWidth(150) #pushButton1.setAutoDefault(False) pushButton1.move(210, 20) # cancel button cancelButton = QtGui.QPushButton('Cancel', self) cancelButton.clicked.connect(self.onCancel) cancelButton.setAutoDefault(True) cancelButton.move(150, 110) # OK button okButton = QtGui.QPushButton('OK', self) okButton.clicked.connect(self.onOk) okButton.move(260, 110) # now make the window visible self.show() # def onPushButton1(self): if self.label4.isVisible(): self.label4.hide() else: self.label4.show() def onCancel(self): self.result = userCancelled self.close() def onOk(self): self.result = userOK self.close() def mouseMoveEvent(self,event): self.label6.setText("X: "+str(event.x()) + " Y: "+str(event.y())) # Class definitions # Function definitions # Constant definitions global userCancelled, userOK userCancelled = "Cancelled" userOK = "OK" # code *********************************************************************************** form = ExampleNonmodalGuiClass() # #OS: Mac OS X #Word size: 64-bit #Version: 0.14.3703 (Git) #Branch: releases/FreeCAD-0-14 #Hash: c6edd47334a3e6f209e493773093db2b9b4f0e40 #Python version: 2.7.5 #Qt version: 4.8.6 #Coin version: 3.1.3 #SoQt version: 1.5.0 #OCC version: 6.7.0 }} ==Misc Additional Topics== There are 3 concepts to the screen real estate in a GUI environment: * physical space on the screen * frame * geometry Within the software all are measured in pixels. PySide has function to measure in real world units but these are undependable as the manufacturers have no standard for pixel size or aspect ratio. The Frame is the size of a window including it's side bars, top bar (possibly with a menu in it) and bottom bar. The Geometry is the space lying within the Frame and so is always less than or equal to the Frame. In turn the Frame is always less than or equal to the available screen size. ===Available Screen Size=== {{Code|code= # get screen dimensions (Available Screen Size) screenWidth = QtGui.QDesktopWidget().screenGeometry().width() screenHeight = QtGui.QDesktopWidget().screenGeometry().height() # get dimensions for available space on screen availableWidth = QtGui.QDesktopWidget().availableGeometry().width() availableHeight = QtGui.QDesktopWidget().availableGeometry().height() }} Generally the "availableHeight" should be less than the "screenHeight" by the height of the menu bar. These 4 values are based on the hardware environment and will change from computer to computer. They are not dependent on any application window size. (Since Python 3.9 this warning appears when the above code is executed: '''DeprecationWarning: QDesktopWidget.screenGeometry(int screen) const is deprecated'''. A replacement seems to be needed from Python 3.10 onwards.) ===Frame Size and Geometry=== {{Code|code= # set up a variable to hold the Main Window to save some typing... mainWin = FreeCAD.Gui.getMainWindow() mainWin.showFullScreen() # no menu bars, every last pixel is given over to FreeCAD mainWin.geometry() mainWin.frameSize() mainWin.frameGeometry() mainWin.showMaximized() # show maximised within the screen, window edges and the menu bar will be displayed mainWin.geometry() mainWin.frameSize() mainWin.frameGeometry() mainWin.showNormal() # show at the last non-maximised or non-minimised size (and location) mainWin.geometry() mainWin.frameSize() mainWin.frameGeometry() mainWin.setGeometry(50, 50, 800, 800) # specifically set FreeCAD main window's size and location, this will become the new setting for 'showNormal()' mainWin.showMinimized() # FreeCAD will disappear from view after this command... mainWin.geometry() mainWin.frameSize() mainWin.frameGeometry() }} These same commands can be executed on a user generated window, the syntax does not change. {{Powerdocnavi{{#translation:}}}} [[Category:Developer Documentation{{#translation:}}]] [[Category:Python Code{{#translation:}}]]