Part Prism/fr: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 25: Line 25:
[[Image:Part_Prism_Example.png|400px]]
[[Image:Part_Prism_Example.png|400px]]


== Utilisation ==
<div class="mw-translate-fuzzy">
==Utilisation==
</div>


See [[Part_Primitives#Usage|Part Primitives]].
See [[Part_Primitives#Usage|Part Primitives]].

Revision as of 10:02, 5 March 2022

Part Prisme

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

Description

Un Part Prisme est un solide paramétrique qui peut être créé avec la commande Part Primitives. Il est le résultat de l'extrusion d'un polygone régulier le long d'une trajectoire droite. Dans le système de coordonnées défini par sa propriété DonnéesPlacement, la face inférieure du prisme se trouve sur le plan XY avec son centre à l'origine et l'un de ses sommets sur l'axe X.

Utilisation

See Part Primitives.

Example

Part Prism from the scripting example

A Part Prism object created with the scripting example below is shown here.

Propriétés

See also: Property editor.

A Part Prism 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.

Prism

  • DonnéesPolygon : Le nombre d'arrêtes du polygone qui forme la base et le plan supérieur du prisme.
  • DonnéesCircumradius : La distance entre le centre du polygone et les arrêtes du prisme.
  • DonnéesHeight : La hauteur est la distance sur l'axe z.
  • DonnéesFirst Angle : Angle dans la première direction. introduced in version 0.19
  • DonnéesSecond Angle : Angle dans la seconde direction. introduced in version 0.19

Scripting

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

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

prism = FreeCAD.ActiveDocument.addObject("Part::Prism", "myPrism")
  • Where "myPrism" is the name for the object.
  • The function returns the newly created object.

Example:

import FreeCAD as App

doc = App.activeDocument()

prism = doc.addObject("Part::Prism", "myPrism")
prism.Polygon = 5
prism.Circumradius = 10
prism.Height = 50
prism.FirstAngle = 22.5
prism.SecondAngle = 45
prism.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(60, 75, 30))

doc.recompute()