Part Sphere/fr: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 18: Line 18:
}}
}}


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


<div class="mw-translate-fuzzy">
Crée une sphère paramétrique simple avec des paramètres de position angle1, angle2, angle3 et rayon.
Crée une sphère paramétrique simple avec des paramètres de position angle1, angle2, angle3 et rayon.
</div>


A Part Sphere can be truncated at the top and/or bottom by changing its {{PropertyData|Angle1}} and/or {{PropertyData|Angle2}} properties. It can be turned into a segment of a sphere by changing its {{PropertyData|Angle3}} property.
[[File:SimpleSphere.jpg|400px]]

[[Image:Part_Sphere_Example.png|400px]]


==Utilisation==
==Utilisation==


<div class="mw-translate-fuzzy">
# Basculez vers l'[[Image:Workbench_Part.svg|16px]] [[Part_Workbench/fr|Atelier PArt]]
# Basculez vers l'[[Image:Workbench_Part.svg|16px]] [[Part_Workbench/fr|Atelier PArt]]
# Lancez la commande de plusieurs manières:
# Lancez la commande de plusieurs manières:
#* Appuyez sur le bouton {{Button|[[Image:Part_Sphere.svg|16px]] Sphère}} dans la barre d'outils.
#* Appuyez sur le bouton {{Button|[[Image:Part_Sphere.svg|16px]] Sphère}} dans la barre d'outils.
#* Sélectionnez {{MenuCommand|Pièce → Primitives → [[Image:Part_Sphere.svg|16px]] Sphère}} dans la barre de menus.
#* Sélectionnez {{MenuCommand|Pièce → Primitives → [[Image:Part_Sphere.svg|16px]] Sphère}} dans la barre de menus.
</div>


== Example ==
'''Résultat:''' la sphère sera positionnée à l'origine (point 0,0,0) à la création. Les paramètres d'angle permettent de faire une partie de sphère au lieu d'une sphère entière (ils sont réglés à 360° par défaut).


[[Image:Part_Sphere_Scripting_Example.png|thumb|Part Sphere from the scripting example]]
Les propriétés de l'objet peuvent être modifiées, soit dans l'[[Property_editor/fr|Éditeur de propriétés]], soit en double-cliquant sur l'objet dans la [[Tree_view/fr|Vue en arborescence]].


A Part Sphere object created with the [[#Scripting|scripting example]] below is shown here.

== Notes ==

* A Part Sphere can also be created with the [[Image:Part_Primitives.svg|16px]] [[Part_Primitives|Part Primitives]] command. With that command you can specify the dimensions and placement at creation time.

<div class="mw-translate-fuzzy">
== Propriétés ==
== Propriétés ==
</div>

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

A Part Sphere object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:


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

{{TitleProperty|Attachment}}

The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].


{{TitleProperty|Sphere}}
{{TitleProperty|Sphere}}


<div class="mw-translate-fuzzy">
* {{PropertyData|Radius:}} rayon de la sphère
* {{PropertyData|Radius:}} rayon de la sphère
* {{PropertyData|Angle 1:}} 1er angle pour couper/définir la sphère
* {{PropertyData|Angle 1:}} 1er angle pour couper/définir la sphère
* {{PropertyData|Angle 2:}} 2ème angle pour couper/définir la sphère
* {{PropertyData|Angle 2:}} 2ème angle pour couper/définir la sphère
* {{PropertyData|Angle 3:}} 3ème angle pour couper/définir la sphère
* {{PropertyData|Angle 3:}} 3ème angle pour couper/définir la sphère
</div>

Comme il est assez difficile d’expliquer la signification des paramètres angle 1, angle 2, angle 3, l’illustration ci-dessous explique ces paramètres avec les valeurs suivantes: angle 1 = -45 °, angle 2 = 45 ° et angle 3 = 90 °.

[[File:SphereCutThreeAngles.jpg|400px]]


== Script ==
== Script ==


See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

<div class="mw-translate-fuzzy">
Une Part Sphère peut être créée en utilisant la fonction suivante:
Une Part Sphère peut être créée en utilisant la fonction suivante:
</div>


{{Code|code=
{{Code|code=
Line 60: Line 86:
* Où {{Incode|"mySphere"}} est le nom de l'objet.
* Où {{Incode|"mySphere"}} est le nom de l'objet.
* La fonction restitue l'objet nouvellement créé.
* La fonction restitue l'objet nouvellement créé.

Example:

{{Code|code=
import FreeCAD as App

doc = App.activeDocument()

sphere = doc.addObject("Part::Sphere", "mySphere")
sphere.Radius = 20
sphere.Angle1 = -30
sphere.Angle2 = 45
sphere.Angle3 = 90
sphere.Placement = App.Placement(App.Vector(3, 9, 11), App.Rotation(75, 60, 30))

doc.recompute()
}}





Revision as of 09:53, 3 March 2022

Part Sphère

Emplacement du menu
Pièce → Primitives → Sphère
Ateliers
Part
Raccourci par défaut
Aucun
Introduit dans la version
-
Voir aussi
Part Primitives

Description

Crée une sphère paramétrique simple avec des paramètres de position angle1, angle2, angle3 et rayon.

A Part Sphere can be truncated at the top and/or bottom by changing its DonnéesAngle1 and/or DonnéesAngle2 properties. It can be turned into a segment of a sphere by changing its DonnéesAngle3 property.

Utilisation

  1. Basculez vers l' Atelier PArt
  2. Lancez la commande de plusieurs manières:
    • Appuyez sur le bouton Sphère dans la barre d'outils.
    • Sélectionnez Pièce → Primitives → Sphère dans la barre de menus.

Example

Part Sphere from the scripting example

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

Notes

  • A Part Sphere can also be created with the Part Primitives command. With that command you can specify the dimensions and placement at creation time.

Propriétés

See also: Property editor.

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

Données

Attachment

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

Sphere

  • DonnéesRadius: rayon de la sphère
  • DonnéesAngle 1: 1er angle pour couper/définir la sphère
  • DonnéesAngle 2: 2ème angle pour couper/définir la sphère
  • DonnéesAngle 3: 3ème angle pour couper/définir la sphère

Script

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

Une Part Sphère peut être créée en utilisant la fonction suivante:

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

Example:

import FreeCAD as App

doc = App.activeDocument()

sphere = doc.addObject("Part::Sphere", "mySphere")
sphere.Radius = 20
sphere.Angle1 = -30
sphere.Angle2 = 45
sphere.Angle3 = 90
sphere.Placement = App.Placement(App.Vector(3, 9, 11), App.Rotation(75, 60, 30))

doc.recompute()