Arch Remove/fr: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
No edit summary
 
(78 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Arch Remove|Workbenches=[[Arch Module|Arch]]|MenuLocation=Arch -> Remove|SeeAlso=[[Arch Add]]}}

{{Docnav/fr
|[[Arch_Add/fr|Ajouter]]
|[[Arch_Survey/fr|Prendre des cotes]]
|[[Arch_Workbench/fr|Atelier Arch]]
|IconL=Arch_Add.svg
|IconR=Arch_Survey.svg
|IconC=Workbench_Arch.svg
}}

{{GuiCommand/fr
|Name=Arch Remove
|Name/fr=Arch Soustraire
|MenuLocation=Arch → Enlever un composant
|Workbenches=[[Arch_Workbench/fr|Arch]]
|SeeAlso=[[Arch_CutLine|Arch Couper selon une ligne]], [[Arch_CutPlane|Arch Couper selon un plan]], [[Arch_Add/fr|Arch Ajouter]]
}}


==Description==
==Description==


Les outils de suppression vous permettent d'effectuer 2 types d'opérations :
The Remove tools allows you to do 2 kinds of operations:
* Supprimer un sous-composant d'un objet Arch, par exemple supprimer une boîte qui a été ajoutée à un mur avec {{Button|[[Image:Arch_Add.svg|16px]] [[Arch_Add/fr|Arch Ajouter]]}}.
* Remove a subcomponent from an Arch object, for example remove a box that has been added to a wall, like in the [[Arch Add]] example
* Soustraire un objet issu de l'[[Part_Workbench/fr|Atelier Part]] d'un composant Arch tel qu'un {{KEY|[[Image:Arch_Wall.svg|16px]] [[Arch_Wall/fr|Arch Mur]]}} ou {{KEY|[[Image:Arch_Structure.svg|16px]] [[Arch_Structure/fr|Arch Structure]]}}.
* Subtract a [[Part Module|shape]]-based object from an Arch component such as a [[Arch Wall|wall]] or [[Arch Structure|structure]]

La contrepartie de cet outil est l'outil {{Button|[[Image:Arch_Add.svg|16px]] [[Arch_Add/fr|Arch Ajouter]]}}


[[Image:Arch Remove example.jpg|600px]]
[[Image:Arch Remove example.jpg|600px]]
{{Caption|Une boîte soustraite d'un mur, laissant un trou dedans.}}


<span id="Usage"></span>
In the above image, a box is being subtracted from a wall
==Utilisation==


# Sélectionnez un sous-composant dans un objet Arch.
==How to use==
# Appuyez sur le bouton {{Button|[[Image:Arch_Remove.svg|16px]]}} ou {{KEY|Arch}} → {{KEY|[[Image:Arch_Remove.svg|16px]] [[Arch_Remove/fr|Enlever un composant]]}} dans le menu supérieur.


Ou
# Select a subcomponent inside an Arch object, '''or''':
# Sélectionnez les objets à soustraire, le dernier objet sélectionné doit être l’objet Arch auquel les autres objets seront soustraits.
# Select object(s) to be subtracted, then the Arch component from which they must be subtracted (the arch component must be the last thing you selected)
# Appuyez sur le bouton {{Button|[[Image:Arch_Remove.svg|16px]]}} ou {{KEY|Arch}} → {{KEY|[[Image:Arch_Remove.svg|16px]] [[Arch_Remove/fr|Enlever un composant]]}} dans le menu supérieur.
# Press the {{KEY|[[Image:Arch Remove.png|16px]] '''Remove'''}} button


==Scripting==
==Script==
{{Emphasis|Voir aussi :}} [[Arch_API/fr|Arch API]] et [[FreeCAD_Scripting_Basics/fr|FreeCAD Scripts de Base]].


The Remove tool can by used in [[macros]] and from the python console by using the following function:
L'outil Soustraire peut être utilisé dans [[Macros/fr|macros]] et à partir de la console [[Python/fr|Python]] à l'aide de la fonction suivante:
{{Code|code=
'''removeComponents (objectsList,[hostObject])'''
removeComponents(objectsList, host=None)
* removes the given component or the components from the given list from their parents. If a host object is specified, this function will try adding the components as holes to the host object instead.
}}
Example:

<syntaxhighlight>
* Supprime les objets donnés dans {{incode|objectsList}} de leurs parents.
import FreeCAD, Arch, Draft, Part
* Si un objet {{incode|host}} est spécifié, cette fonction essaiera d'ajouter les objets dans {{incode|objectsList}} en tant que trous de l'élément {{incode|host}}.
line = Draft.makeWire([FreeCAD.Vector(0,0,0),FreeCAD.Vector(2,2,0)])

wall = Arch.makeWall(line)
Exemple :
box = Part.makeBox(1,1,1)
{{Code|code=
Arch.addComponents(box,wall)
import FreeCAD, Draft, Arch
Arch.removeComponents(box)

</syntaxhighlight>
Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0),FreeCAD.Vector(2000, 2000, 0)])
<languages/>
Wall = Arch.makeWall(Line, width=150, height=3000)

Box = FreeCAD.ActiveDocument.addObject("Part::Box", "Box")
Box.Length = 900
Box.Width = 450
Box.Height = 2000
FreeCAD.ActiveDocument.recompute()

Draft.rotate(Box, 45)
Draft.move(Box, FreeCAD.Vector(1000, 700, 0))

Arch.removeComponents(Box, Wall)
FreeCAD.ActiveDocument.recompute()
}}


{{Docnav/fr
|[[Arch_Add/fr|Ajouter]]
|[[Arch_Survey/fr|Prendre des cotes]]
|[[Arch_Workbench/fr|Atelier Arch]]
|IconL=Arch_Add.svg
|IconR=Arch_Survey.svg
|IconC=Workbench_Arch.svg
}}

{{Arch Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 20:06, 2 March 2023

Arch Soustraire

Emplacement du menu
Arch → Enlever un composant
Ateliers
Arch
Raccourci par défaut
Aucun
Introduit dans la version
-
Voir aussi
Arch Couper selon une ligne, Arch Couper selon un plan, Arch Ajouter

Description

Les outils de suppression vous permettent d'effectuer 2 types d'opérations :

La contrepartie de cet outil est l'outil Arch Ajouter

Une boîte soustraite d'un mur, laissant un trou dedans.

Utilisation

  1. Sélectionnez un sous-composant dans un objet Arch.
  2. Appuyez sur le bouton ou Arch Enlever un composant dans le menu supérieur.

Ou

  1. Sélectionnez les objets à soustraire, le dernier objet sélectionné doit être l’objet Arch auquel les autres objets seront soustraits.
  2. Appuyez sur le bouton ou Arch Enlever un composant dans le menu supérieur.

Script

Voir aussi : Arch API et FreeCAD Scripts de Base.

L'outil Soustraire peut être utilisé dans macros et à partir de la console Python à l'aide de la fonction suivante:

removeComponents(objectsList, host=None)
  • Supprime les objets donnés dans objectsList de leurs parents.
  • Si un objet host est spécifié, cette fonction essaiera d'ajouter les objets dans objectsList en tant que trous de l'élément host.

Exemple :

import FreeCAD, Draft, Arch

Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0),FreeCAD.Vector(2000, 2000, 0)])
Wall = Arch.makeWall(Line, width=150, height=3000)

Box = FreeCAD.ActiveDocument.addObject("Part::Box", "Box")
Box.Length = 900
Box.Width = 450
Box.Height = 2000
FreeCAD.ActiveDocument.recompute()

Draft.rotate(Box, 45)
Draft.move(Box, FreeCAD.Vector(1000, 700, 0))

Arch.removeComponents(Box, Wall)
FreeCAD.ActiveDocument.recompute()