|
Menu location |
---|
None |
Workbenches |
All |
Default shortcut |
None |
Introduced in version |
1.1 |
See also |
Part DatumPlane, Part DatumLine, Part DatumPoint |
The Part CoordinateSystem command creates a coordinate system object that can be attached to other objects. A coordinate system is one of several datum objects. A datum object is typically used to attach multiple other objects to. If the position or orientation of a datum object changes, all objects attached to it will follow.
A datum object can also provide a geometric reference for a feature or operation. Depending on its type it may for example be used as a direction vector, a rotation axis or a mirror plane.
See also: Property editor.
A Part CoordinateSystem object, formally a Part::LocalCoordinateSystem
object, is derived from an App::LocalCoordinateSystem
object. All its properties are inherited except those listed under Attachment.
Attachment
The object has the same attachment properties as a Part Part2DObject.
Base
LinkList
): The axes, planes and origin point controlled by the coordinate system.Placement
): See Part Feature.String
): Idem.String
): Idem.ExpressionEngine
): Idem.Bool
): Idem.LinkList
):Bool
):Display Options
Enumeration
): See Part Feature.Bool
): Idem.Bool
): Idem.Selection
Enumeration
): See Part Feature.Enumeration
): Idem.import FreeCAD as App
doc = App.newDocument()
body = doc.addObject("PartDesign::Body", "Body")
lcs = doc.addObject("Part::LocalCoordinateSystem", "LCS")
lcs.Visibility = True
body.addObjects([lcs])
orig = body.Origin
plane = next(f for f in orig.OriginFeatures if f.Role == "XZ_Plane")
lcs.AttachmentSupport = [(orig, (plane.Name + ".", ))]
lcs.AttachmentOffset = App.Placement(App.Vector(), App.Vector(1, 0, 0), 45)
lcs.MapMode = "FlatFace"
doc.recompute()