Jump to content
Toggle sidebar
FreeCAD Documentation
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
Arch
Assembly
CAM/Path
Draft
FEM
Mesh
OpenSCAD
Part
PartDesign
Points
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 CompAxis
Arch Component
Arch CompPanel
Arch CompPipe
Arch CompRebarStraight
Arch CompSetMaterial
Arch CurtainWall
Arch CutLine
Arch CutPlane
Arch DAE
Arch Door
Arch Equipment
Arch Fence
Arch Floor
Arch Frame
Arch Grid
Arch IFC
Arch IfcExplorer
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 Preferences
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 Arch
Artwork Assembly
Artwork Assembly3
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 Start
Artwork Surface
Artwork TechDraw
Artwork Test
Artwork Tux
Artwork Web
Assembly
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 Box
BIM Classification
BIM Clone
BIM Copy
BIM IfcElements
BIM IfcProperties
BIM IfcQuantities
BIM ingame tutorial
BIM Layers
BIM Library
BIM Preflight
BIM Project
BIM Setup
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
Constraint
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 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
ImageConv
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
Licence
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 Alias Manager
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
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 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 FaceColors
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 Module
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 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 CompPrimitiveAdditive
PartDesign CompPrimitiveSubtractive
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 0.22
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 BSplineApproximate
Sketcher BSplineComb
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 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 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 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 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
SweetHome3D
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 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 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
{{DISPLAYTITLE:Skriptované objekty}}<languages/> {{Docnav |[[Topological_data_scripting|Topological data scripting]] |[[Scenegraph|Scenegraph]] }} {{TOCright}} ==Introduction== <div class="mw-translate-fuzzy"> Kromě standardních objektových typů jako jsou anotace, sítě a díly, nabízí FreeCAD skvělou možnost vytváření objektů 100% vytvořených skritpy Pythonu, které se nazývají Pythonovské objekty. Tyto objekty se chovají stejně jako jiné objekty FreeCADu a jsou ukládány a načítány automaticky při ukládání a otevírání souboru. </div> <div class="mw-translate-fuzzy"> Je třeba pochopit jednu zvláštnost, tyto objekty jsou ukládány ve FcStd souborech FreeCADu s pythonovským modulem [http://docs.python.org/2/library/json.html json]. Tento modul převede pythonovský objekt do řetězce, který je pak možno uložit v souboru. Při načítání naopak tento modul použije uložený řetězec ke znovuvytvoření původního objektu, při tom musí mít přístup ke zdrojovému kódu, který vytvoří objekt. To znamená, že když uložíte takový uživatelský objekt a pak jej otevíráte na počítači kde není pythonovský kód, tak nebude tento objekt vytvořen. Když tedy distribuujete takový objekt někomu jinému, musíte společně s ním distribuovat i pythonovský skript, který objekt vytváří. </div> '''Note''': It is possible to pack python code inside a FreeCAD file using json serializing with an App::PropertyPythonObject, but that code can never directly be run, and therefore has little use for our purpose here. <div class="mw-translate-fuzzy"> Pythonovský objekt má stejné pravidlo jako FreeCAD: Aplikace a GUI jsou odděleny do samostatných částí. Aplikační část, Document Object, definuje konstrukci objektu, zatímco část GUI, View Provider Object, definuje jak bude objekt zobrazen na displeji. View Provider Object, stejně jako další GUI objekty FreeCADu je dostupný pouze když FreeCAD běží se svým vlastním GUI. Pro vytvoření objektu je použitelných několik vlastností a metod. Vlastnosti musejí být některé z předdefinovaných typových vlastností, které nabízí FreeCAD a zobrazují se v dialogovém okně vlastností, takže mohou být uživatelem upravovány. Tímto způsobem jsou Pythonovské objekty správně a zcela parametrizovány. Můžete samostatně definovat vlastnosti objektu a jeho zobrazovacího objektu. </div> == Basic example == <div class="mw-translate-fuzzy"> == Základní příklad == Následující příklad najdete v souboru [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/TemplatePyMod/FeaturePython.py?view=markup src/Mod/TemplatePyMod/FeaturePython.py], společně s několika dalšími příklady: </div> {{Code|code= '''Examples for a feature class and its view provider.''' import FreeCAD, FreeCADGui from pivy import coin class Box: def __init__(self, obj): '''Add some custom properties to our box feature''' obj.addProperty("App::PropertyLength", "Length", "Box", "Length of the box").Length = 1.0 obj.addProperty("App::PropertyLength", "Width", "Box", "Width of the box").Width = 1.0 obj.addProperty("App::PropertyLength", "Height", "Box", "Height of the box").Height = 1.0 obj.Proxy = self def onChanged(self, fp, prop): '''Do something when a property has changed''' FreeCAD.Console.PrintMessage("Change property: " + str(prop) + "\n") def execute(self, fp): '''Do something when doing a recomputation, this method is mandatory''' FreeCAD.Console.PrintMessage("Recompute Python Box feature\n") class ViewProviderBox: def __init__(self, obj): '''Set this object to the proxy object of the actual view provider''' obj.addProperty("App::PropertyColor","Color", "Box", "Color of the box").Color = (1.0, 0.0, 0.0) obj.Proxy = self def attach(self, obj): '''Setup the scene sub-graph of the view provider, this method is mandatory''' self.shaded = coin.SoGroup() self.wireframe = coin.SoGroup() self.scale = coin.SoScale() self.color = coin.SoBaseColor() data=coin.SoCube() self.shaded.addChild(self.scale) self.shaded.addChild(self.color) self.shaded.addChild(data) obj.addDisplayMode(self.shaded, "Shaded"); style=coin.SoDrawStyle() style.style = coin.SoDrawStyle.LINES self.wireframe.addChild(style) self.wireframe.addChild(self.scale) self.wireframe.addChild(self.color) self.wireframe.addChild(data) obj.addDisplayMode(self.wireframe, "Wireframe"); self.onChanged(obj,"Color") def updateData(self, fp, prop): '''If a property of the handled feature has changed we have the chance to handle this here''' # fp is the handled feature, prop is the name of the property that has changed l = fp.getPropertyByName("Length") w = fp.getPropertyByName("Width") h = fp.getPropertyByName("Height") self.scale.scaleFactor.setValue(float(l), float(w), float(h)) pass def getDisplayModes(self,obj): '''Return a list of display modes.''' modes=[] modes.append("Shaded") modes.append("Wireframe") return modes def getDefaultDisplayMode(self): '''Return the name of the default display mode. It must be defined in getDisplayModes.''' return "Shaded" def setDisplayMode(self,mode): '''Map the display mode defined in attach with those defined in getDisplayModes.\ Since they have the same names nothing needs to be done. This method is optional''' return mode def onChanged(self, vp, prop): '''Here we can do something when a single property got changed''' FreeCAD.Console.PrintMessage("Change property: " + str(prop) + "\n") if prop == "Color": c = vp.getPropertyByName("Color") self.color.rgb.setValue(c[0], c[1], c[2]) def getIcon(self): '''Return the icon in XPM format which will appear in the tree view. This method is\ optional and if not defined a default icon is shown.''' return """ /* XPM */ static const char * ViewProviderBox_xpm[] = { "16 16 6 1", " c None", ". c #141010", "+ c #615BD2", "@ c #C39D55", "# c #000000", "$ c #57C355", " ........", " ......++..+..", " .@@@@.++..++.", " .@@@@.++..++.", " .@@ .++++++.", " ..@@ .++..++.", "###@@@@ .++..++.", "##$.@@$#.++++++.", "#$#$.$$$........", "#$$####### ", "#$$#$$$$$# ", "#$$#$$$$$# ", "#$$#$$$$$# ", " #$#$$$$$# ", " ##$$$$$# ", " ####### "}; """ def dumps(self): '''When saving the document this object gets stored using Python's json module.\ Since we have some un-serializable parts here -- the Coin stuff -- we must define this method\ to return a tuple of all serializable objects or None.''' return None def loads(self,state): '''When restoring the serialized object from document we have the chance to set some internals here.\ Since no data were serialized nothing needs to be done here.''' return None def makeBox(): FreeCAD.newDocument() a=FreeCAD.ActiveDocument.addObject("App::FeaturePython", "Box") Box(a) ViewProviderBox(a.ViewObject) makeBox() }} === Things to note === If your object relies on being recomputed as soon as it is created, you must do this manually in the {{incode|__init__}} function as it is not called automatically. This example does not require it because the {{incode|onChanged}} method of the {{incode|Box}} class has the same effect as the {{incode|execute}} function, but the examples below rely on being recomputed before anything is displayed in the 3D view. In the examples, this is done manually with {{incode|ActiveDocument.recompute()}} but in more complex scenarios you need to decide where to recompute either the whole document or the FeaturePython object. This example produces a number of exception stack traces in the report view window. This is because the {{incode|onChanged}} method of the {{incode|Box}} class is called each time a property is added in {{incode|__init__}}. When the first one is added, the Width and Height properties don't exist yet and so the attempt to access them fails. An explanation of {{incode|__getstate__}} and {{incode|__setstate__}} which have been replaced by {{incode|dumps}} and {{incode|loads}} is in the forum thread [https://forum.freecadweb.org/viewtopic.php?f=18&t=44009&start=10#p377892 obj.Proxy.Type is a dict, not a string]. {{incode|obj.addProperty(...)}} returns {{incode|obj}}, so that the value of the property can be set on the same line: {{Code|code= obj.addProperty("App::PropertyLength", "Length", "Box", "Length of the box").Length = 1.0 }} Which is equivalent to: {{Code|code= obj.addProperty("App::PropertyLength", "Length", "Box", "Length of the box") obj.Length = 1.0 }} == Other more complex example == <div class="mw-translate-fuzzy"> == Další složitější příklady == Tento příklad používá [[Part_Workbench/cs|Modul Díl]] k vytvoření osmistěnu a potom vytvoří pomocí Pivy jeho reprezentaci v Coinu. </div> První je samotné vytvoření dokumentu: {{Code|code= import FreeCAD, FreeCADGui, Part import pivy from pivy import coin class Octahedron: def __init__(self, obj): "Add some custom properties to our box feature" obj.addProperty("App::PropertyLength","Length","Octahedron","Length of the octahedron").Length=1.0 obj.addProperty("App::PropertyLength","Width","Octahedron","Width of the octahedron").Width=1.0 obj.addProperty("App::PropertyLength","Height","Octahedron", "Height of the octahedron").Height=1.0 obj.addProperty("Part::PropertyPartShape","Shape","Octahedron", "Shape of the octahedron") obj.Proxy = self def execute(self, fp): # Define six vetices for the shape v1 = FreeCAD.Vector(0,0,0) v2 = FreeCAD.Vector(fp.Length,0,0) v3 = FreeCAD.Vector(0,fp.Width,0) v4 = FreeCAD.Vector(fp.Length,fp.Width,0) v5 = FreeCAD.Vector(fp.Length/2,fp.Width/2,fp.Height/2) v6 = FreeCAD.Vector(fp.Length/2,fp.Width/2,-fp.Height/2) # Make the wires/faces f1 = self.make_face(v1,v2,v5) f2 = self.make_face(v2,v4,v5) f3 = self.make_face(v4,v3,v5) f4 = self.make_face(v3,v1,v5) f5 = self.make_face(v2,v1,v6) f6 = self.make_face(v4,v2,v6) f7 = self.make_face(v3,v4,v6) f8 = self.make_face(v1,v3,v6) shell=Part.makeShell([f1,f2,f3,f4,f5,f6,f7,f8]) solid=Part.makeSolid(shell) fp.Shape = solid # helper mehod to create the faces def make_face(self,v1,v2,v3): wire = Part.makePolygon([v1,v2,v3,v1]) face = Part.Face(wire) return face }} Pak máme objekt pro zobrazení (view provider object), zodpovědný za zobrazení objektu ve 3D: {{Code|code= class ViewProviderOctahedron: def __init__(self, obj): "Set this object to the proxy object of the actual view provider" obj.addProperty("App::PropertyColor","Color","Octahedron","Color of the octahedron").Color=(1.0,0.0,0.0) obj.Proxy = self def attach(self, obj): "Setup the scene sub-graph of the view provider, this method is mandatory" self.shaded = coin.SoGroup() self.wireframe = coin.SoGroup() self.scale = coin.SoScale() self.color = coin.SoBaseColor() self.data=coin.SoCoordinate3() self.face=coin.SoIndexedFaceSet() self.shaded.addChild(self.scale) self.shaded.addChild(self.color) self.shaded.addChild(self.data) self.shaded.addChild(self.face) obj.addDisplayMode(self.shaded,"Shaded"); style=coin.SoDrawStyle() style.style = coin.SoDrawStyle.LINES self.wireframe.addChild(style) self.wireframe.addChild(self.scale) self.wireframe.addChild(self.color) self.wireframe.addChild(self.data) self.wireframe.addChild(self.face) obj.addDisplayMode(self.wireframe,"Wireframe"); self.onChanged(obj,"Color") def updateData(self, fp, prop): "If a property of the handled feature has changed we have the chance to handle this here" # fp is the handled feature, prop is the name of the property that has changed if prop == "Shape": s = fp.getPropertyByName("Shape") self.data.point.setNum(6) cnt=0 for i in s.Vertexes: self.data.point.set1Value(cnt,i.X,i.Y,i.Z) cnt=cnt+1 self.face.coordIndex.set1Value(0,0) self.face.coordIndex.set1Value(1,1) self.face.coordIndex.set1Value(2,2) self.face.coordIndex.set1Value(3,-1) self.face.coordIndex.set1Value(4,1) self.face.coordIndex.set1Value(5,3) self.face.coordIndex.set1Value(6,2) self.face.coordIndex.set1Value(7,-1) self.face.coordIndex.set1Value(8,3) self.face.coordIndex.set1Value(9,4) self.face.coordIndex.set1Value(10,2) self.face.coordIndex.set1Value(11,-1) self.face.coordIndex.set1Value(12,4) self.face.coordIndex.set1Value(13,0) self.face.coordIndex.set1Value(14,2) self.face.coordIndex.set1Value(15,-1) self.face.coordIndex.set1Value(16,1) self.face.coordIndex.set1Value(17,0) self.face.coordIndex.set1Value(18,5) self.face.coordIndex.set1Value(19,-1) self.face.coordIndex.set1Value(20,3) self.face.coordIndex.set1Value(21,1) self.face.coordIndex.set1Value(22,5) self.face.coordIndex.set1Value(23,-1) self.face.coordIndex.set1Value(24,4) self.face.coordIndex.set1Value(25,3) self.face.coordIndex.set1Value(26,5) self.face.coordIndex.set1Value(27,-1) self.face.coordIndex.set1Value(28,0) self.face.coordIndex.set1Value(29,4) self.face.coordIndex.set1Value(30,5) self.face.coordIndex.set1Value(31,-1) def getDisplayModes(self,obj): "Return a list of display modes." modes=[] modes.append("Shaded") modes.append("Wireframe") return modes def getDefaultDisplayMode(self): "Return the name of the default display mode. It must be defined in getDisplayModes." return "Shaded" def setDisplayMode(self,mode): return mode def onChanged(self, vp, prop): "Here we can do something when a single property got changed" FreeCAD.Console.PrintMessage("Change property: " + str(prop) + "\n") if prop == "Color": c = vp.getPropertyByName("Color") self.color.rgb.setValue(c[0],c[1],c[2]) def getIcon(self): return """ /* XPM */ static const char * ViewProviderBox_xpm[] = { "16 16 6 1", " c None", ". c #141010", "+ c #615BD2", "@ c #C39D55", "# c #000000", "$ c #57C355", " ........", " ......++..+..", " .@@@@.++..++.", " .@@@@.++..++.", " .@@ .++++++.", " ..@@ .++..++.", "###@@@@ .++..++.", "##$.@@$#.++++++.", "#$#$.$$$........", "#$$####### ", "#$$#$$$$$# ", "#$$#$$$$$# ", "#$$#$$$$$# ", " #$#$$$$$# ", " ##$$$$$# ", " ####### "}; """ def dumps(self): return None def loads(self,state): return None }} A nakonec, když je objekt i jeho zobrazení definováno, stačí ho už jen zavolat: {{Code|code= FreeCAD.newDocument() a=FreeCAD.ActiveDocument.addObject("App::FeaturePython","Octahedron") Octahedron(a) ViewProviderOctahedron(a.ViewObject) }} == Making objects selectable == <div class="mw-translate-fuzzy"> == Zpřístupnění objektu k výběru == Chcete-li aby bylo možné objekt vybrat nebo alespoň jeho část, kliknutím na něj v pohledu, musíte včlenit jeho Coin konstrukci do uzlu SoFCSelection. Má-li objekt komplexní zobrazení s widgety, anotacemi atd., můžete chtít včlenit do SoFCSelection pouze nějakou část. Všechno co je SoFCSelection je průběžně skenováno FreeCADem pro detekci výběru/předvýběru, takže je rozumné nepřetěžovat jej zbytečným skenováním. Tady je co byste měli zahrnout do self.face z příkladu nahoře. </div> Once the parts of the scenegraph that are to be selectable are inside SoFCSelection nodes, you then need to provide two methods to handle the selection path. The selection path can take the form of a string giving the names of each element in the path, or of an array of scenegraph objects. The two methods you provide are {{incode|getDetailPath}}, which converts from a string path to an array of scenegraph objects, and {{incode|getElementPicked}}, which takes an element which has been clicked on in the scenegraph and returns its string name (note, not its string path). Here is the molecule example above, adapted to make the elements of the molecule selectable: {{Code|code= class Molecule: def __init__(self, obj): ''' Add two point properties ''' obj.addProperty("App::PropertyVector","p1","Line","Start point") obj.addProperty("App::PropertyVector","p2","Line","End point").p2=FreeCAD.Vector(5,0,0) obj.Proxy = self def onChanged(self, fp, prop): if prop == "p1" or prop == "p2": ''' Print the name of the property that has changed ''' fp.Shape = Part.makeLine(fp.p1,fp.p2) def execute(self, fp): ''' Print a short message when doing a recomputation, this method is mandatory ''' fp.Shape = Part.makeLine(fp.p1,fp.p2) class ViewProviderMolecule: def __init__(self, obj): ''' Set this object to the proxy object of the actual view provider ''' obj.Proxy = self self.ViewObject = obj sep1=coin.SoSeparator() sel1 = coin.SoType.fromName('SoFCSelection').createInstance() # sel1.policy.setValue(coin.SoSelection.SHIFT) sel1.ref() sep1.addChild(sel1) self.trl1=coin.SoTranslation() sel1.addChild(self.trl1) sel1.addChild(coin.SoSphere()) sep2=coin.SoSeparator() sel2 = coin.SoType.fromName('SoFCSelection').createInstance() sel2.ref() sep2.addChild(sel2) self.trl2=coin.SoTranslation() sel2.addChild(self.trl2) sel2.addChild(coin.SoSphere()) obj.RootNode.addChild(sep1) obj.RootNode.addChild(sep2) self.updateData(obj.Object, 'p2') self.sel1 = sel1 self.sel2 = sel2 def getDetailPath(self, subname, path, append): vobj = self.ViewObject if append: path.append(vobj.RootNode) path.append(vobj.SwitchNode) mode = vobj.SwitchNode.whichChild.getValue() if mode >= 0: mode = vobj.SwitchNode.getChild(mode) path.append(mode) sub = Part.splitSubname(subname)[-1] if sub == 'Atom1': path.append(self.sel1) elif sub == 'Atom2': path.append(self.sel2) else: path.append(mode.getChild(0)) return True def getElementPicked(self, pp): path = pp.getPath() if path.findNode(self.sel1) >= 0: return 'Atom1' if path.findNode(self.sel2) >= 0: return 'Atom2' raise NotImplementedError def updateData(self, fp, prop): "If a property of the handled feature has changed we have the chance to handle this here" # fp is the handled feature, prop is the name of the property that has changed if prop == "p1": p = fp.getPropertyByName("p1") self.trl1.translation=(p.x,p.y,p.z) elif prop == "p2": p = fp.getPropertyByName("p2") self.trl2.translation=(p.x,p.y,p.z) def dumps(self): return None def loads(self,state): return None def makeMolecule(): FreeCAD.newDocument() a=FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Molecule") Molecule(a) ViewProviderMolecule(a.ViewObject) FreeCAD.ActiveDocument.recompute() }} == Working with simple shapes == <div class="mw-translate-fuzzy"> == Práce s jednoduchými tvary == Jestliže z parametrického objektu vychází jednoduchý tvar, není nutné používat zobrazovací objekt. Tvar bude zobrazován použitím standardního zobrazování tvarů ve FreeCADu. </div> {{Code|code= import FreeCAD as App import FreeCADGui import FreeCAD import Part class Line: def __init__(self, obj): '''"App two point properties" ''' obj.addProperty("App::PropertyVector","p1","Line","Start point") obj.addProperty("App::PropertyVector","p2","Line","End point").p2=FreeCAD.Vector(1,0,0) obj.Proxy = self def execute(self, fp): '''"Print a short message when doing a recomputation, this method is mandatory" ''' fp.Shape = Part.makeLine(fp.p1,fp.p2) a=FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Line") Line(a) a.ViewObject.Proxy=0 # just set it to something different from None (this assignment is needed to run an internal notification) FreeCAD.ActiveDocument.recompute() }} Same code with use '''ViewProviderLine''' {{Code|code= import FreeCAD as App import FreeCADGui import FreeCAD import Part class Line: def __init__(self, obj): '''"App two point properties" ''' obj.addProperty("App::PropertyVector","p1","Line","Start point") obj.addProperty("App::PropertyVector","p2","Line","End point").p2=FreeCAD.Vector(100,0,0) obj.Proxy = self def execute(self, fp): '''"Print a short message when doing a recomputation, this method is mandatory" ''' fp.Shape = Part.makeLine(fp.p1,fp.p2) class ViewProviderLine: def __init__(self, obj): ''' Set this object to the proxy object of the actual view provider ''' obj.Proxy = self def getDefaultDisplayMode(self): ''' Return the name of the default display mode. It must be defined in getDisplayModes. ''' return "Flat Lines" a=FreeCAD.ActiveDocument.addObject("Part::FeaturePython","Line") Line(a) ViewProviderLine(a.ViewObject) App.ActiveDocument.recompute() }} == Scenegraph Structure == You may have noticed that the examples above construct their scenegraphs in slightly different ways. Some use {{incode|obj.addDisplayMode(node, "modename")}} while others use {{incode|obj.SwitchNode.getChild(x).addChild(y)}}. Each feature in a FreeCAD document is based the following scenegraph structure: {{Code|code= RootNode \- SwitchNode \- Shaded - Wireframe - etc }} The {{incode|SwitchNode}} displays only one of its children, depending on which display mode is selection in FreeCAD. The examples which use {{incode|addDisplayMode}} are constructing their scenegraphs solely out of coin3d scenegraph elements. Under the covers, {{incode|addDisplayMode}} adds a new child to the {{incode|SwitchNode}}; the name of that node will match the display mode it was passed. The examples which use {{incode|SwitchNode.getChild(x).addChild}} also construct part of their geometry using functions from the Part workbench, such as {{incode|1=fp.Shape = Part.makeLine(fp.p1,fp.p2)}}. This constructs the different display mode scenegraphs under the {{incode|SwitchNode}}; when we later come to add coin3d elements to the scenegraph, we need to add them to the existing display mode scenegraphs using {{incode|addChild}} rather than creating a new child of the {{incode|SwitchNode}}. When using {{incode|addDisplayMode()}} to add geometry to the scenegraph, each display mode should have its own node which is passed to {{incode|addDisplayMode()}}; don't reuse the same node for this. Doing so will confuse the selection mechanism. It's okay if each display mode's node has the same geometry nodes added below it, just the root of each display mode needs to be distinct. Here is the above molecule example, adapted to be drawn only with Coin3D scenegraph objects instead of using objects from the Part workbench: {{Code|code= import Part from pivy import coin class Molecule: def __init__(self, obj): ''' Add two point properties ''' obj.addProperty("App::PropertyVector","p1","Line","Start point") obj.addProperty("App::PropertyVector","p2","Line","End point").p2=FreeCAD.Vector(5,0,0) obj.Proxy = self def onChanged(self, fp, prop): pass def execute(self, fp): ''' Print a short message when doing a recomputation, this method is mandatory ''' pass class ViewProviderMolecule: def __init__(self, obj): ''' Set this object to the proxy object of the actual view provider ''' self.constructed = False obj.Proxy = self self.ViewObject = obj def attach(self, obj): material = coin.SoMaterial() material.diffuseColor = (1.0, 0.0, 0.0) material.emissiveColor = (1.0, 0.0, 0.0) drawStyle = coin.SoDrawStyle() drawStyle.pointSize.setValue(10) drawStyle.style = coin.SoDrawStyle.LINES wireframe = coin.SoGroup() shaded = coin.SoGroup() self.wireframe = wireframe self.shaded = shaded self.coords = coin.SoCoordinate3() self.coords.point.setValues(0, 2, [FreeCAD.Vector(0, 0, 0), FreeCAD.Vector(1, 0, 0)]) wireframe += self.coords wireframe += drawStyle wireframe += material shaded += self.coords shaded += drawStyle shaded += material g = coin.SoGroup() sel1 = coin.SoType.fromName('SoFCSelection').createInstance() sel1.style = 'EMISSIVE_DIFFUSE' p1 = coin.SoType.fromName('SoIndexedPointSet').createInstance() p1.coordIndex.set1Value(0, 0) sel1 += p1 g += sel1 wireframe += g shaded += g g = coin.SoGroup() sel2 = coin.SoType.fromName('SoFCSelection').createInstance() sel2.style = 'EMISSIVE_DIFFUSE' p2 = coin.SoType.fromName('SoIndexedPointSet').createInstance() p2.coordIndex.set1Value(0, 1) sel2 += p2 g += sel2 wireframe += g shaded += g g = coin.SoGroup() sel3 = coin.SoType.fromName('SoFCSelection').createInstance() sel3.style = 'EMISSIVE_DIFFUSE' p3 = coin.SoType.fromName('SoIndexedLineSet').createInstance() p3.coordIndex.setValues(0, 2, [0, 1]) sel3 += p3 g += sel3 wireframe += g shaded += g obj.addDisplayMode(wireframe, 'Wireframe') obj.addDisplayMode(shaded, 'Shaded') self.sel1 = sel1 self.sel2 = sel2 self.sel3 = sel3 self.constructed = True self.updateData(obj.Object, 'p2') def getDetailPath(self, subname, path, append): vobj = self.ViewObject if append: path.append(vobj.RootNode) path.append(vobj.SwitchNode) mode = vobj.SwitchNode.whichChild.getValue() FreeCAD.Console.PrintWarning("getDetailPath: mode {} is active\n".format(mode)) if mode >= 0: mode = vobj.SwitchNode.getChild(mode) path.append(mode) sub = Part.splitSubname(subname)[-1] print(sub) if sub == 'Atom1': path.append(self.sel1) elif sub == 'Atom2': path.append(self.sel2) elif sub == 'Line': path.append(self.sel3) else: path.append(mode.getChild(0)) return True def getElementPicked(self, pp): path = pp.getPath() if path.findNode(self.sel1) >= 0: return 'Atom1' if path.findNode(self.sel2) >= 0: return 'Atom2' if path.findNode(self.sel3) >= 0: return 'Line' raise NotImplementedError def updateData(self, fp, prop): "If a property of the handled feature has changed we have the chance to handle this here" # fp is the handled feature, prop is the name of the property that has changed if not self.constructed: return if prop == "p1": p = fp.getPropertyByName("p1") self.coords.point.set1Value(0, p) elif prop == "p2": p = fp.getPropertyByName("p2") self.coords.point.set1Value(1, p) def getDisplayModes(self, obj): return ['Wireframe', 'Shaded'] def getDefaultDisplayMode(self): return 'Shaded' def setDisplayMode(self, mode): return mode def dumps(self): return None def loads(self,state): return None def makeMolecule(): FreeCAD.newDocument() a=FreeCAD.ActiveDocument.addObject("App::FeaturePython","Molecule") Molecule(a) b=ViewProviderMolecule(a.ViewObject) a.touch() FreeCAD.ActiveDocument.recompute() return a,b a,b = makeMolecule() }} == Part Design scripted objects == When making scripted objects in Part Design the process is similar to the scripted objects discussed above, but with a few additional considerations. We must handle 2 shape properties, one for the shape we see in the 3D view and another for the shape used by the pattern tools, such as polar pattern features. The object shapes also needs to be fused to any existing material already in the Body (or cut from it in the case of Subtractive features). And we must account for the placement and attachment of our objects a little bit differently. Part Design scripted solid object features should be based on either PartDesign::FeaturePython, PartDesign::FeatureAdditivePython, or PartDesign::FeatureSubtractivePython rather than Part::FeaturePython. Only the Additive and Subtractive variants can be used in pattern features, and if based on Part::FeaturePython when the user drops the object into a Part Design Body it becomes a BaseFeature rather than being treated by the Body as a native Part Design object. Note: all of these are expected to be solids, so if you are making a non-solid feature it should be based on Part::FeaturePython or else the next feature in the tree will attempt to fuse to as a solid and it will fail. Here is a simple example of making a Tube primitive, similar to the Tube primitive in Part Workbench except this one will be a Part Design solid feature object. For this we will 2 separate files: pdtube.FCMacro and pdtube.py. The .FCMacro file will be executed by the user to create the object. The .py file will hold the class definitions, imported by the .FCMacro. The reason for doing it this way is to maintain the parametric nature of the object after restarting FreeCAD and opening a document containing one of our Tubes. First, the class definition file: {{Code|code= # -*- coding: utf-8 -*- #classes should go in pdtube.py import FreeCAD, FreeCADGui, Part class PDTube: def __init__(self,obj): obj.addProperty("App::PropertyLength","Radius1","Tube","Radius1").Radius1 = 5 obj.addProperty("App::PropertyLength","Radius2","Tube","Radius2").Radius2 = 10 obj.addProperty("App::PropertyLength","Height","Tube","Height of tube").Height = 10 self.makeAttachable(obj) obj.Proxy = self def makeAttachable(self, obj): if int(FreeCAD.Version()[1]) >= 19: obj.addExtension('Part::AttachExtensionPython') else: obj.addExtension('Part::AttachExtensionPython', obj) obj.setEditorMode('Placement', 0) #non-readonly non-hidden def execute(self,fp): outer_cylinder = Part.makeCylinder(fp.Radius2, fp.Height) inner_cylinder = Part.makeCylinder(fp.Radius1, fp.Height) if fp.Radius1 == fp.Radius2: #just make cylinder tube_shape = outer_cylinder elif fp.Radius1 < fp.Radius2: tube_shape = outer_cylinder.cut(inner_cylinder) else: #invert rather than error out tube_shape = inner_cylinder.cut(outer_cylinder) if not hasattr(fp, "positionBySupport"): self.makeAttachable(fp) fp.positionBySupport() tube_shape.Placement = fp.Placement #BaseFeature (shape property of type Part::PropertyPartShape) is provided for us #with the PartDesign::FeaturePython and related classes, but it might be empty #if our object is the first object in the tree. it's a good idea to check #for its existence in case we want to make type Part::FeaturePython, which won't have it if hasattr(fp, "BaseFeature") and fp.BaseFeature != None: if "Subtractive" in fp.TypeId: full_shape = fp.BaseFeature.Shape.cut(tube_shape) else: full_shape = fp.BaseFeature.Shape.fuse(tube_shape) full_shape.transformShape(fp.Placement.inverse().toMatrix(), True) #borrowed from gears workbench fp.Shape = full_shape else: fp.Shape = tube_shape if hasattr(fp,"AddSubShape"): #PartDesign::FeatureAdditivePython and #PartDesign::FeatureSubtractivePython have this #property but PartDesign::FeaturePython does not #It is the shape used for copying in pattern features #for example in making a polar pattern tube_shape.transformShape(fp.Placement.inverse().toMatrix(), True) fp.AddSubShape = tube_shape class PDTubeVP: def __init__(self, obj): '''Set this object to the proxy object of the actual view provider''' obj.Proxy = self def attach(self,vobj): self.vobj = vobj def updateData(self, fp, prop): '''If a property of the handled feature has changed we have the chance to handle this here''' pass def getDisplayModes(self,obj): '''Return a list of display modes.''' modes=[] modes.append("Flat Lines") modes.append("Shaded") modes.append("Wireframe") return modes def getDefaultDisplayMode(self): '''Return the name of the default display mode. It must be defined in getDisplayModes.''' return "Flat Lines" def setDisplayMode(self,mode): '''Map the display mode defined in attach with those defined in getDisplayModes.\ Since they have the same names nothing needs to be done. This method is optional''' return mode def onChanged(self, vp, prop): '''Here we can do something when a single property got changed''' #FreeCAD.Console.PrintMessage("Change property: " + str(prop) + "\n") pass def getIcon(self): '''Return the icon in XPM format which will appear in the tree view. This method is\ optional and if not defined a default icon is shown.''' return """ /* XPM */ static const char * ViewProviderBox_xpm[] = { "16 16 6 1", " c None", ". c #141010", "+ c #615BD2", "@ c #C39D55", "# c #000000", "$ c #57C355", " ........", " ......++..+..", " .@@@@.++..++.", " .@@@@.++..++.", " .@@ .++++++.", " ..@@ .++..++.", "###@@@@ .++..++.", "##$.@@$#.++++++.", "#$#$.$$$........", "#$$####### ", "#$$#$$$$$# ", "#$$#$$$$$# ", "#$$#$$$$$# ", " #$#$$$$$# ", " ##$$$$$# ", " ####### "}; """ def dumps(self): '''When saving the document this object gets stored using Python's json module.\ Since we have some un-serializable parts here -- the Coin stuff -- we must define this method\ to return a tuple of all serializable objects or None.''' return None def loads(self,state): '''When restoring the serialized object from document we have the chance to set some internals here.\ Since no data were serialized nothing needs to be done here.''' return None }} And now the macro file to create the object: {{Code|code= # -*- coding: utf-8 -*- #pdtube.FCMacro import pdtube #above line needed if the class definitions above are place in another file: PDTube.py #this is needed if the tube object is to remain parametric after restarting FreeCAD and loading #a document containing the object body = FreeCADGui.ActiveDocument.ActiveView.getActiveObject("pdbody") if not body: FreeCAD.Console.PrintError("No active body.\n") else: from PySide import QtGui window = FreeCADGui.getMainWindow() items = ["Additive","Subtractive","Neither additive nor subtractive"] item,ok =QtGui.QInputDialog.getItem(window,"Select tube type","Select whether you want additive, subtractive, or neither:",items,0,False) if ok: if item == items[0]: className = "PartDesign::FeatureAdditivePython" elif item == items[1]: className = "PartDesign::FeatureSubtractivePython" else: className = "PartDesign::FeaturePython" #not usable in pattern features, such as polar pattern tube = FreeCAD.ActiveDocument.addObject(className,"Tube") pdtube.PDTube(tube) pdtube.PDTubeVP(tube.ViewObject) body.addObject(tube) #optionally we can also use body.insertObject() for placing at particular place in tree }} == Available object types == The list of all object types you can create with {{incode|FreeCAD.ActiveDocument.addObject()}} can be obtained with {{incode|FreeCAD.ActiveDocument.supportedTypes()}}. Only object types with a name ending in {{incode|Python}} can be used for scripted objects. These are listed here (for FreeCAD v0.21): * {{incode|App::DocumentObjectGroupPython}} * {{incode|App::FeaturePython}} * {{incode|App::GeometryPython}} * {{incode|App::LinkElementPython}} * {{incode|App::LinkGroupPython}} * {{incode|App::LinkPython}} * {{incode|App::MaterialObjectPython}} * {{incode|App::PlacementPython}} * {{incode|Part::CustomFeaturePython}} * {{incode|Part::FeaturePython}} * {{incode|Part::Part2DObjectPython}} * {{incode|Path::FeatureAreaPython}} * {{incode|Path::FeatureAreaViewPython}} * {{incode|Path::FeatureCompoundPython}} * {{incode|Path::FeaturePython}} * {{incode|Path::FeatureShapePython}} * {{incode|Sketcher::SketchObjectPython}} * {{incode|TechDraw::DrawComplexSectionPython}} * {{incode|TechDraw::DrawLeaderLinePython}} * {{incode|TechDraw::DrawPagePython}} * {{incode|TechDraw::DrawRichAnnoPython}} * {{incode|TechDraw::DrawTemplatePython}} * {{incode|TechDraw::DrawTilePython}} * {{incode|TechDraw::DrawTileWeldPython}} * {{incode|TechDraw::DrawViewPartPython}} * {{incode|TechDraw::DrawViewPython}} * {{incode|TechDraw::DrawViewSectionPython}} * {{incode|TechDraw::DrawViewSymbolPython}} * {{incode|TechDraw::DrawWeldSymbolPython}} == Available methods == See [[FeaturePython_methods|FeaturePython methods]] for the complete reference. == Available properties == <div class="mw-translate-fuzzy"> == Dostupné vlastnosti == Vlastnosti jsou skutečné základní kameny pythonovských objektů. Jejich prostřednictvím je uživatel schopen pracovat s objektem. Po vytvoření Pythonovského objektu v dokumentu ( obj=FreeCAD.ActiveDocument.addObject("App::FeaturePython","Box") ), obdržíte seznam dostupných vlastností zadáním: </div> {{Code|code= obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython", "Box") obj.supportedProperties() }} <div class="mw-translate-fuzzy"> Dostanete seznam dostupných vlastností: </div> <div class="mw-translate-fuzzy"> Když do uživatelského objektu přidáváte vlastnosti dejte pozor na:: * Nepoužívejte znaky "<" a ">" v popisu vlastnosti (odděluje to části XML v souboru .fcstd) * Vlastnosti jsou uloženy podle abecedy ve .fcstd souboru. Máte-li ve vlastnostech tvar (shape), jakékoliv jméno vlastnosti, které je za "Shape" podle abecedy, bude nataženo až po tvaru, což může zapříčinit neočekávané chování. </div> The properties are defined in the [https://github.com/FreeCAD/FreeCAD/blob/master/src/App/PropertyStandard.h PropertyStandard C++ header file]. === Property types === <div class="mw-translate-fuzzy"> ==Typ vlastnosti== Standardně mohou být vlastnosti upravovány. Je ale možné nastavit vlastnosti pouze ke čtení, třeba když má jenom zobrazovat výstup výsledku metody. Je možné také vlastnost skrýt. Typ vlastnosti může být nastaven použitím </div> {{Code|code= obj.setEditorMode("MyPropertyName", mode) }} kde mode je malá celočíselná hodnota, které může být nastavena na: 0 -- defaultní mód, čtení i zápis 1 -- pouze čtení 2 -- skryto The mode can also be set using a list of strings, e.g. {{incode|obj.setEditorMode("Placement", ["ReadOnly", "Hidden"])}}. The EditorModes are not set at FreeCAD file reload. This could to be done by the {{Incode|loads}} function. See http://forum.freecadweb.org/viewtopic.php?f=18&t=13460&start=10#p108072. By using the {{Incode|setEditorMode}} the properties are only read-only in the [[Property_editor|Property editor]]. They can still be changed from Python. To really make them read-only the setting has to be passed directly inside the {{Incode|addProperty}} function. See http://forum.freecadweb.org/viewtopic.php?f=18&t=13460&start=20#p109709 for an example. Using the direct setting in the {{Incode|addProperty}} function, you also have more possibilities. In particular, an interesting one is mark a property as an output property. This way FreeCAD won't mark the feature as touched when changing it (so no need to recompute). Example of output property (see also https://forum.freecadweb.org/viewtopic.php?t=24928): {{Code|code= obj.addProperty("App::PropertyString", "MyCustomProperty", "", "", 8) }} The property types that can be set at last parameter of the addProperty function are: 0 -- Prop_None, No special property type 1 -- Prop_ReadOnly, Property is read-only in the editor 2 -- Prop_Transient, Property won't be saved to file 4 -- Prop_Hidden, Property won't appear in the editor 8 -- Prop_Output, Modified property doesn't touch its parent container 16 -- Prop_NoRecompute, Modified property doesn't touch its container for recompute 32 -- Prop_NoPersist, Property won't be saved to file at all The property types are defined in the [https://github.com/FreeCAD/FreeCAD/blob/master/src/App/PropertyContainer.h PropertyContainer C++ header file]. == Available extensions == The list of available extensions can be obtained with {{incode|grep -RI EXTENSION_PROPERTY_SOURCE_TEMPLATE}} in the repository of the source code and is given here (for FreeCAD v0.21). For objects: * {{incode|App::GeoFeatureGroupExtensionPython}} * {{incode|App::GroupExtensionPython}} * {{incode|App::LinkBaseExtensionPython}} * {{incode|App::LinkExtensionPython}} * {{incode|App::OriginGroupExtensionPython}} * {{incode|Part::AttachExtensionPython}} * {{incode|TechDraw::CosmeticExtensionPython}} For view objects: * {{incode|Gui::ViewProviderExtensionPython}} * {{incode|Gui::ViewProviderGeoFeatureGroupExtensionPython}} * {{incode|Gui::ViewProviderGroupExtensionPython}} * {{incode|Gui::ViewProviderOriginGroupExtensionPython}} * {{incode|PartGui::ViewProviderAttachExtensionPython}} * {{incode|PartGui::ViewProviderSplineExtensionPython}} There exist other extensions but they do not work as-is: * {{incode|App::ExtensionPython}} * {{incode|TechDrawGui::ViewProviderCosmeticExtensionPython}} * {{incode|TechDrawGui::ViewProviderDrawingViewExtensionPython}} * {{incode|TechDrawGui::ViewProviderPageExtensionPython}} * {{incode|TechDrawGui::ViewProviderTemplateExtensionPython}} <span id="Further_information"></span> <div class="mw-translate-fuzzy"> {{docnav/cs|[[PySide/cs|PySide]]|[[Embedding FreeCAD/cs|Vkládání FreeCADu]]}} </div> Additional pages: * [[Scripted_objects_saving_attributes|Scripted objects saving attributes]] * [[Scripted_objects_migration|Scripted objects migration]] * [[Scripted objects with attachment|Scripted objects with attachment]] * [[Viewprovider|Viewproviders]] Interesting forum threads about scripted objects: * [http://forum.freecadweb.org/viewtopic.php?f=22&t=13740 Python object attributes lost at load] * [http://forum.freecadweb.org/viewtopic.php?t=12139 New FeaturePython is grey] * [https://forum.freecadweb.org/viewtopic.php?f=18&t=44009 Explanation on dumps and loads], [https://docs.python.org/3/library/pickle.html#object.__getstate__ official documentation] * [https://forum.freecadweb.org/viewtopic.php?f=18&t=13460&start=20#p109709 Eigenmode frequency always 0?] * [https://forum.freecadweb.org/viewtopic.php?f=22&t=21330 how to implement python feature's setEdit properly?] In addition to the examples presented here have a look at FreeCAD source code [https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/TemplatePyMod/FeaturePython.py src/Mod/TemplatePyMod/FeaturePython.py] for more examples. {{Docnav |[[Topological_data_scripting|Topological data scripting]] |[[Scenegraph|Scenegraph]] }} {{Powerdocnavi{{#translation:}}}} [[Category:Developer Documentation{{#translation:}}]] [[Category:Python Code{{#translation:}}]]