Surface Filling/fr: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 10: Line 10:
}}
}}


<div class="mw-translate-fuzzy">
{{GuiCommand/fr
{{GuiCommand/fr
|Icon=Filling.svg
|Icon=Filling.svg
Line 17: Line 18:
|Workbenches=[[Surface Module/fr|Surface]]|
|Workbenches=[[Surface Module/fr|Surface]]|
}}
}}
</div>


==Description==
==Description==

{{Button|[[File:Surface_Filling.svg|16px]] [[Surface_Filling|Surface Filling]]}} creates a surface from a series of connected boundary edges.

The surface can be modified by adding constraint edges and vertices which the surface must pass through.


[[Image:Surface_Filling_example.png|600px]]
[[Image:Surface_Filling_example.png|600px]]
Line 26: Line 32:
==Utilisation==
==Utilisation==


<div class="mw-translate-fuzzy">
# Appuyez sur le bouton {{Button|[[File:Filling.svg|24px]] '''Surface filling...'''}}.
# Appuyez sur le bouton {{Button|[[File:Filling.svg|24px]] '''Surface filling...'''}}.
# Étapes détaillées selon besoin.
# Étapes détaillées selon besoin.
# Définissez les options et appuyez sur {{Button|OK}}.
# Définissez les options et appuyez sur {{Button|OK}}.
</div>

The base edges that form the closed contour, as well as the auxiliary vertices and edges, can belong to 2D curves from [[File:Workbench_Draft.svg|24px]] [[Draft_Module|Draft]] or the [[File:Workbench_Sketcher.svg|24px]] [[Sketcher_Workbench|Sketcher]], but can also belong to 3D solid objects such as those created with the [[File:Workbench_Part.svg|24px]] [[Part_Module|Part]] or [[File:Workbench_PartDesign.svg|24px]] [[PartDesign_Workbench|PartDesign Workbenches]].


==Options==
==Options==


* Inside the {{MenuCommand|Filling}} section.
** {{Button|Add edge}}: press once to start picking edges in the [[3D_view|3D view]]. Individual lines such as {{Button|[[File:Draft_BSpline.svg|16px]] [[Draft_BSpline|Draft BSplines]]}} and {{Button|[[File:Sketcher_CreateBSpline.svg|16px]] [[Sketcher_CreateBSpline|Sketcher BSplines]]}} can be chosen, as well as any edge from solid objects, like those of {{Button|[[File:PartDesign_Body.svg|16px]] [[PartDesign_Body|PartDesign Bodies]]}} and {{Button|[[File:Part_Primitives.svg|16px]] [[Part_Primitives|Part Primitives]]}}.
** {{Button|Remove edge}}: press once to start picking edges in the [[3D_view|3D view]]; these must be edges that were previously picked with {{Button|Add edge}}.
* {{KEY|Right mouse button}}: open the context menu and select {{Button|Remove}}, or press {{KEY|Del}} in the keyboard, to remove the currently selected edge in the list.


* Inside the {{MenuCommand|Unbound Edges}} section similar {{Button|Add edge}} and {{Button|Remove edge}} buttons are available to pick supporting edges to control the curvature of the original surface.
* Inside the {{MenuCommand|Filling}} section similar {{Button|Add vertex}} and {{Button|Remove vertex}} buttons are available, in this case to pick supporting vertices.
* Press {{Button|Cancel}} or {{KEY|Esc}} to abort the current operation.


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


A [[Surface_Filling|Surface Filling]] ({{incode|Surface::Filling}} class) is derived from the basic [[Part_Feature|Part Feature]] ({{incode|Part::Feature}} class, through the {{incode|Part::Spline}} subclass), therefore it shares all the latter's properties.

In addition to the properties described in [[Part_Feature|Part Feature]], the Surface Filling has the following properties in the [[property_editor|property editor]].

=== Data ===

{{TitleProperty|Filling}}

<div class="mw-translate-fuzzy">
* {{PropertyData/fr|Property}}: description de la propriété
* {{PropertyData/fr|Property}}: description de la propriété
* {{PropertyView/fr|Property}}: description de la propriété
* {{PropertyView/fr|Property}}: description de la propriété
</div>


=== View ===


{{TitleProperty|Base}}

* {{PropertyView|Control Points|Bool}}: it defaults to {{FALSE}}; if set to {{TRUE}}, it will show an overlay with the control points of the surface.

== Scripting ==

{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

The Surface Filling tool can be used in [[macros|macros]] and from the [[Python|Python]] console by adding the {{incode|Surface::Filling}} object.
* The edges to be used to define the surface must be assigned as a [[LinkSubList|LinkSubList]] to the {{incode|BoundaryEdges}} property of the object.
* Auxiliary edges and vertices must be assigned as a [[LinkSubList|LinkSubLists]] to the {{incode|UnboundEdges}} and {{incode|Points}} properties of the object.
* All objects with edges need to be computed before they can be used as input for the properties of the Filling object.

{{Code|code=
import FreeCAD as App
import Draft

doc = App.newDocument()

a = App.Vector(-20, -20, 0)
b = App.Vector(-18, 25, 0)
c = App.Vector(60, 26, 0)
d = App.Vector(33, -20, 0)

points1 = [a, App.Vector(-20, -8, 0), App.Vector(-17, 7, 0), b]
obj1 = Draft.make_bspline(points1)

points2 = [b, App.Vector(0, 25, 0), c]
obj2 = Draft.make_bspline(points2)

points3 = [c, App.Vector(37, 4, 0), d]
obj3 = Draft.make_bspline(points3)

points4 = [d, App.Vector(-2, -18, 0), a]
obj4 = Draft.make_bspline(points4)
doc.recompute()

surf = doc.addObject("Surface::Filling", "Surface")
surf.BoundaryEdges = [(obj1, "Edge1"),
(obj2, "Edge1"),
(obj3, "Edge1"),
(obj4, "Edge1")]
doc.recompute()

# ---------------------------------------------------------
points_spl = [App.Vector(-10, 0, 2),
App.Vector(4, 0, 7),
App.Vector(18, 0, -5),
App.Vector(25, 0, 0),
App.Vector(30, 0, 0)]
aux_edge = Draft.make_bspline(points_spl)
doc.recompute()

surf.UnboundEdges = [(aux_edge, "Edge1")]
doc.recompute()

# ---------------------------------------------------------
aux_v1 = Draft.make_line(App.Vector(-13, -12, 5),
App.Vector(-13, -12, -5))
aux_v2 = Draft.make_line(App.Vector(-3, 18, 5),
App.Vector(-3, 18, -5))
doc.recompute()

surf.Points = [(aux_v1, "Vertex2"),
(aux_v2, "Vertex1")]
doc.recompute()
}}


{{Docnav/fr
{{Docnav/fr

Revision as of 17:16, 1 October 2020

Other languages:

Cette documentation n'est pas terminée. Merci de nous aider et de contribuer à la documentation.

Modèle GuiCommand explique comment les commandes doivent être documentées. Parcourez Category:UnfinishedDocu pour voir d'autres pages incomplètes comme celle-ci. Voir Category:Command_Reference pour toutes les commandes.

Voir Écrire une page Wiki pour apprendre à éditer les pages du wiki, et aller à Contribuer à FreeCAD pour apprendre d'autres façons de contribuer.

Surface Remplissage

Emplacement du menu
Surface → Filling...
Ateliers
Surface
Raccourci par défaut
Aucun
Introduit dans la version
-
Voir aussi
Aucun

Description

Surface Filling creates a surface from a series of connected boundary edges.

The surface can be modified by adding constraint edges and vertices which the surface must pass through.

Exemple de surface remplie, délimitée par quatre arêtes situées dans le plan XY; (à gauche) uniquement les quatre arêtes et (à droite) une courbe supplémentaire dans l'espace définissant la courbure de la surface

Utilisation

  1. Appuyez sur le bouton Surface filling....
  2. Étapes détaillées selon besoin.
  3. Définissez les options et appuyez sur OK.

The base edges that form the closed contour, as well as the auxiliary vertices and edges, can belong to 2D curves from Draft or the Sketcher, but can also belong to 3D solid objects such as those created with the Part or PartDesign Workbenches.

Options

  • Inside the Filling section.
  • Right mouse button: open the context menu and select Remove, or press Del in the keyboard, to remove the currently selected edge in the list.


  • Inside the Unbound Edges section similar Add edge and Remove edge buttons are available to pick supporting edges to control the curvature of the original surface.
  • Inside the Filling section similar Add vertex and Remove vertex buttons are available, in this case to pick supporting vertices.
  • Press Cancel or Esc to abort the current operation.

Propriétés

A Surface Filling (Surface::Filling class) is derived from the basic Part Feature (Part::Feature class, through the Part::Spline subclass), therefore it shares all the latter's properties.

In addition to the properties described in Part Feature, the Surface Filling has the following properties in the property editor.

Data

Filling

  • DonnéesProperty: description de la propriété
  • VueProperty: description de la propriété

View

Base

  • VueControl Points (Bool): it defaults to false; if set to true, it will show an overlay with the control points of the surface.

Scripting

See also: FreeCAD Scripting Basics.

The Surface Filling tool can be used in macros and from the Python console by adding the Surface::Filling object.

  • The edges to be used to define the surface must be assigned as a LinkSubList to the BoundaryEdges property of the object.
  • Auxiliary edges and vertices must be assigned as a LinkSubLists to the UnboundEdges and Points properties of the object.
  • All objects with edges need to be computed before they can be used as input for the properties of the Filling object.
import FreeCAD as App
import Draft

doc = App.newDocument()

a = App.Vector(-20, -20, 0)
b = App.Vector(-18, 25, 0)
c = App.Vector(60, 26, 0)
d = App.Vector(33, -20, 0)

points1 = [a, App.Vector(-20, -8, 0), App.Vector(-17, 7, 0), b]
obj1 = Draft.make_bspline(points1)

points2 = [b, App.Vector(0, 25, 0), c]
obj2 = Draft.make_bspline(points2)

points3 = [c, App.Vector(37, 4, 0), d]
obj3 = Draft.make_bspline(points3)

points4 = [d, App.Vector(-2, -18, 0), a]
obj4 = Draft.make_bspline(points4)
doc.recompute()

surf = doc.addObject("Surface::Filling", "Surface")
surf.BoundaryEdges = [(obj1, "Edge1"),
                      (obj2, "Edge1"),
                      (obj3, "Edge1"),
                      (obj4, "Edge1")]
doc.recompute()

# ---------------------------------------------------------
points_spl = [App.Vector(-10, 0, 2),
              App.Vector(4, 0, 7),
              App.Vector(18, 0, -5),
              App.Vector(25, 0, 0),
              App.Vector(30, 0, 0)]
aux_edge = Draft.make_bspline(points_spl)
doc.recompute()

surf.UnboundEdges = [(aux_edge, "Edge1")]
doc.recompute()

# ---------------------------------------------------------
aux_v1 = Draft.make_line(App.Vector(-13, -12, 5),
                         App.Vector(-13, -12, -5))
aux_v2 = Draft.make_line(App.Vector(-3, 18, 5),
                         App.Vector(-3, 18, -5))
doc.recompute()

surf.Points = [(aux_v1, "Vertex2"),
               (aux_v2, "Vertex1")]
doc.recompute()