Part Line/fr: Difference between revisions

From FreeCAD Documentation
(Created page with "Voir Part Primitives.")
(Created page with "== Propriétés ==")
Line 28: Line 28:
Voir [[Part_Primitives/fr#Utilisation|Part Primitives]].
Voir [[Part_Primitives/fr#Utilisation|Part Primitives]].


== Properties ==
== Propriétés ==


See also: [[Property_editor|Property editor]].
See also: [[Property_editor|Property editor]].

Revision as of 20:31, 4 March 2022

Part Ligne

Emplacement du menu
Pièce → Créer des primitives → Ligne
Ateliers
Part, OpenSCAD
Raccourci par défaut
Aucun
Introduit dans la version
-
Voir aussi
Part Primitives

Description

Une Part Ligne est une ligne paramétrique qui peut être créée avec la commande Part Primitives. Les coordonnées de son point de départ et de son point d'arrivée sont relatives au système de coordonnées défini par sa propriété DonnéesPlacement.

Utilisation

Voir Part Primitives.

Propriétés

See also: Property editor.

A Part Line object is derived from a Part Feature object and inherits all its properties. It also has the following additional properties:

Data

Attachment

The object has the same attachment properties as a Part Part2DObject.

Vertex 1 - Start

  • DonnéesX1 (Distance): The X coordinate of the start point of the line. The default is 0mm.
  • DonnéesY1 (Distance): The Y coordinate of the start point of the line. The default is 0mm.
  • DonnéesZ1 (Distance): The Z coordinate of the start point of the line. The default is 0mm.

Vertex 2 - Finish

  • DonnéesX2 (Distance): The X coordinate of the end point of the line. The default is 10mm.
  • DonnéesY2 (Distance): The Y coordinate of the end point of the line. The default is 10mm.
  • DonnéesZ2 (Distance): The Z coordinate of the end point of the line. The default is 10mm.

Scripting

See also: Autogenerated API documentation, Part scripting and FreeCAD Scripting Basics.

A Part Line can be created with the addObject() method of the document:

line = FreeCAD.ActiveDocument.addObject("Part::Line", "myLine")
  • Where "myCircle" is the name for the object.
  • The function returns the newly created object.

Example:

import FreeCAD as App

doc = App.activeDocument()

line = doc.addObject("Part::Line", "myLine")
line.X1 = 1
line.Y1 = 3
line.Z1 = 6
line.X2 = 2
line.Y2 = 3
line.Z2 = 9

doc.recompute()