Part Line/fr: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
No edit summary
(16 intermediate revisions by 2 users not shown)
Line 13: Line 13:
|Name=Part Line
|Name=Part Line
|Name/fr=Part Ligne
|Name/fr=Part Ligne
|MenuLocation=Pièce → [[Part_Primitives/fr|Créer des primitives]] → Ligne
|MenuLocation=Part → [[Part_Primitives/fr|Créer des primitives]] → Ligne
|Workbenches=[[Part_Workbench/fr|Part]], [[OpenSCAD_Workbench/fr|OpenSCAD]]
|Workbenches=[[Part_Workbench/fr|Part]], [[OpenSCAD_Workbench/fr|OpenSCAD]]
|SeeAlso=[[Part_Primitives/fr|Part Primitives]]
|SeeAlso=[[Part_Primitives/fr|Part Primitives]]
Line 20: Line 20:
==Description==
==Description==


A [[Image:Part_Line.svg|24px]] '''Part Line''' is a parametric line that can be created with the [[Image:Part_Primitives.svg|24px]] [[Part_Primitives|Part Primitives]] command. The coordinates of its start and end point are relative to the coordinate system defined by its {{PropertyData|Placement}} property.
Une [[Image:Part_Line.svg|24px]] '''Part Ligne''' est une ligne paramétrique qui peut être créée avec la commande [[Image:Part_Primitives.svg|24px]] [[Part_Primitives/fr|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é {{PropertyData|Placement}}.


[[Image:Part_Line_Example.png|400px]]
[[Image:Part_Line_Example.png|400px]]
Line 26: Line 26:
==Utilisation==
==Utilisation==


See [[Part_Primitives#Usage|Part Primitives]].
Voir [[Part_Primitives/fr#Utilisation|Part Primitives]].


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


See also: [[Property_editor|Property editor]].
Voir aussi : [[Property_editor/fr|Éditeur de propriétés]].


A Part Line object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:
Un objet Part Ligne est dérivé d'un [[Part_Feature/fr|Part Feature]] et hérite de toutes ses propriétés. Il possède également les propriétés supplémentaires suivantes :


=== Data ===
=== Données ===


{{TitleProperty|Attachment}}
{{TitleProperty|Attachment}}


The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].
L'objet a les mêmes propriétés d'attachement qu'un [[Part_Part2DObject/fr#Donn.C3.A9es|Part Part2DObject]].


{{TitleProperty|Vertex 1 - Start}}
{{TitleProperty|Vertex 1 - Start}}


* {{PropertyData|X1|Distance}}: The X coordinate of the start point of the line. The default is {{Value|0mm}}.
* {{PropertyData|X1|Distance}} : La coordonnée X du point de départ de la ligne. La valeur par défaut est {{Value|0mm}}.
* {{PropertyData|Y1|Distance}}: The Y coordinate of the start point of the line. The default is {{Value|0mm}}.
* {{PropertyData|Y1|Distance}} : La coordonnée Y du point de départ de la ligne. La valeur par défaut est {{Value|0mm}}.
* {{PropertyData|Z1|Distance}}: The Z coordinate of the start point of the line. The default is {{Value|0mm}}.
* {{PropertyData|Z1|Distance}} : La coordonnée Z du point de départ de la ligne. La valeur par défaut est {{Value|0mm}}.


{{TitleProperty|Vertex 2 - Finish}}
{{TitleProperty|Vertex 2 - Finish}}


* {{PropertyData|X2|Distance}}: The X coordinate of the end point of the line. The default is {{Value|10mm}}.
* {{PropertyData|X2|Distance}} : La coordonnée X du dernier point de la ligne. La valeur par défaut est {{Value|10mm}}.
* {{PropertyData|Y2|Distance}}: The Y coordinate of the end point of the line. The default is {{Value|10mm}}.
* {{PropertyData|Y2|Distance}} : La coordonnée Y du dernier point de la ligne. La valeur par défaut est {{Value|10mm}}.
* {{PropertyData|Z2|Distance}}: The Z coordinate of the end point of the line. The default is {{Value|10mm}}.
* {{PropertyData|Z2|Distance}} : La coordonnée Z du dernier point de la ligne. La valeur par défaut est {{Value|10mm}}.


== Scripting ==
== Script ==


See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
Voir aussi: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting/fr|Part Ecrire un script]] et [[FreeCAD_Scripting_Basics/fr|Débuter avec les scripts FreeCAD]].


A Part Line can be created with the {{Incode|addObject()}} method of the document:
Une Part Ligne est créée avec la méthode {{incode|addObject()}} du document :


{{Code|code=
{{Code|code=
Line 62: Line 62:
}}
}}


* Where {{Incode|"myCircle"}} is the name for the object.
* {{Incode|"myLine"}} est le nom de l'objet.
* La fonction restitue l'objet nouvellement créé.
* The function returns the newly created object.


Exemple :
Example:


{{Code|code=
{{Code|code=

Revision as of 13:58, 3 April 2022

Part Ligne

Emplacement du menu
Part → 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

Voir aussi : Éditeur de propriétés.

Un objet Part Ligne est dérivé d'un Part Feature et hérite de toutes ses propriétés. Il possède également les propriétés supplémentaires suivantes :

Données

Attachment

L'objet a les mêmes propriétés d'attachement qu'un Part Part2DObject.

Vertex 1 - Start

  • DonnéesX1 (Distance) : La coordonnée X du point de départ de la ligne. La valeur par défaut est 0mm.
  • DonnéesY1 (Distance) : La coordonnée Y du point de départ de la ligne. La valeur par défaut est 0mm.
  • DonnéesZ1 (Distance) : La coordonnée Z du point de départ de la ligne. La valeur par défaut est 0mm.

Vertex 2 - Finish

  • DonnéesX2 (Distance) : La coordonnée X du dernier point de la ligne. La valeur par défaut est 10mm.
  • DonnéesY2 (Distance) : La coordonnée Y du dernier point de la ligne. La valeur par défaut est 10mm.
  • DonnéesZ2 (Distance) : La coordonnée Z du dernier point de la ligne. La valeur par défaut est 10mm.

Script

Voir aussi: Autogenerated API documentation, Part Ecrire un script et Débuter avec les scripts FreeCAD.

Une Part Ligne est créée avec la méthode addObject() du document :

line = FreeCAD.ActiveDocument.addObject("Part::Line", "myLine")
  • "myLine" est le nom de l'objet.
  • La fonction restitue l'objet nouvellement créé.

Exemple :

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()