Surface Filling/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{UnfinishedDocu{{#translation:}}}}
{{Docnav
{{Docnav||[[Surface_GeomFillSurface|Fill boundary curves]]|[[Surface_Module|Surface]]|IconL=|IconC=Workbench_Surface.svg|IconR=BSplineSurf.svg}}
|
|[[Surface_GeomFillSurface|GeomFillSurface]]
|[[Surface_Workbench|Surface]]
|IconL=
|IconR=Surface_GeomFillSurface.svg
|IconC=Workbench_Surface.svg
}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
{{GuiCommand|Icon=Filling.svg|Name=Surface Filling|MenuLocation=Surface → Filling...|Workbenches=[[Surface Module|Surface]]|}}
{{GuiCommand|Icon=Filling.svg|Name=Surface Filling|MenuLocation=Surface → Filling...|Workbenches=[[Surface Workbench|Surface]]|}}
</div>
</div>


<span id="Description"></span>
==Descriere==
==Descriere==


{{Button|[[File:Surface_Filling.svg|16px]] [[Surface_Filling|Surface Filling]]}} creates a surface from a series of connected boundary edges.
{{Button|[[File:Surface_Filling.svg|16px]] [[Surface_Filling|Surface Filling]]}} creates a surface from a series of connected boundary edges. The curvature of the surface can be additionally controlled by non-boundary edges and vertices, and a support surface.


The base geometry can belong to curves created with the [[Draft_Workbench|Draft Workbench]] or the [[Sketcher_Workbench|Sketcher Workbench]], but can also belong to solid objects such as those created with the [[Part_Workbench|Part Workbench]] or the [[PartDesign_Workbench|PartDesign Workbench]].
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]]
{{Caption|Two filled surfaces delimited by four edges located on the XY plane. The surface on the right is additionally controlled by a non-boundary edge.}}


<span id="Usage"></span>
{{Caption|Example of a filled surface, delimited by four edges located in the XY plane; (left) only the four edges, and (right) one additional curve in space that defines the curvature of the surface}}

<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
== Cum se folosește ==
== Cum se folosește ==
Line 27: Line 35:
</div>
</div>


<span id="Options"></span>
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]].

== Opţiuni ==
== Opţiuni ==


* {{MenuCommand|Boundary}} section:
* In the {{MenuCommand|Boundaries}} section a support surface and boundary edges can specified:
** Press the {{Button|Support surface}} button and select a face in the [[3D_view|3D view]] to add a support surface.
** {{Button|Add edge}}: press once to start picking {{MenuCommand|Boundary edges}} in the [[3D_view|3D view]]. Straight edges such as {{Button|[[File:Draft_Wire.svg|16px]] [[Draft_Wire|Draft Wires]]}} and {{Button|[[File:Sketcher_CreatePolyline.svg|16px]] [[Sketcher_CreatePolyline|Sketcher Polylines]]}}, or curved edges 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]]}}.
*** Click the [[File:Edit-cleartext.svg|16px]] icon to remove the support surface.
** {{Button|Remove edge}}: press once to start picking edges in the [[3D_view|3D view]]; these edges must have been previously picked with {{Button|Add edge}}.
** Press the {{Button|Add edge}} button once to start selecting boundary edges in the [[3D_view|3D view]].
** {{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.
** There are several ways to deselect boundary edges:
*** Press the {{Button|Remove edge}} button once to start deselecting edges in the [[3D_view|3D view]].
*** Select an edge in the list and press {{KEY|Delete}}.
*** Right-click an edge in the list and select {{MenuCommand|Remove}} from the context menu.

* In the {{MenuCommand|Edge constraints}} section non-boundary edges can be specified:
** The selection options are similar to those for boundary edges.

* In the {{MenuCommand|Vertex constraints}} section non-boundary vertices can be specified:
** The selection options are similar to those for boundary edges.

* Press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the operation.

== Example ==

The {{MenuCommand|Support surface}} acts as an additional constraint for the surface. The following simple example will give you an idea how this works:


# In the [[File:Workbench_Part.svg|16px]] [[Part_Workbench|Part Workbench]] create a [[File:Part_Cylinder.svg|16px]][[Part_Cylinder|cylinder]] and set its {{PropertyData|Angle}} to {{Value|180°}}.
* {{MenuCommand|Curvature: non-boundary edges}} section; the {{Button|Add edge}} button is available to pick auxiliary edges (straight lines or B-Splines) to control the curvature of the surface. The surface will be forced to pass through these auxiliary edges. This works best when the auxiliary edges lie inside the region delimited by the {{MenuCommand|Boundary edges}}.
# Switch to the [[File:Workbench_Surface.svg|16px]] [[Surface_Workbench|Surface Workbench]] and press the {{Button|[[File:Surface_Filling.svg|16px]] [[Surface_Filling|Filling]]}} button.
* {{MenuCommand|Curvature: non-boundary vertices}} section; similar to the non-boundary edges, the user can pick auxiliary vertices to control the curvature. These vertices may be free standing {{Button|[[File:Draft_Point.svg|16px]] [[Draft_Point|Draft Points]]}} or {{Button|[[File:Part_Point.svg|16px]] [[Part_Point|Part Points]]}}, or may belong to any edge (straight lines or B-Splines), or be a corner vertex in a solid object. In this case, the surface will be constrained to pass through these auxiliary points.
# Select the two semi-circular edges and the two straight edges that connect them.
* Press {{Button|Cancel}} or {{KEY|Esc}} to abort the current operation.
# The result matches the four boundary edges, but the inner shape is quite different from the cylindrical face.
# Edit the Surface object and for the {{MenuCommand|Support surface}} select the cylindrical face.
# The modified shape matches the cylindrical face much more closely.


<span id="Properties"></span>
==Proprietăți==
==Proprietăți==


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.
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]].
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 ===
=== Data ===
Line 60: Line 87:


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

== Limitations ==

The surface code from the internal [[OpenCASCADE|OpenCASCADE]] modelling kernel is fragile, and cannot handle wrong input properly. The following situations may cause problems, and may crash the program, so they should be avoided:
* Adding {{PropertyData|Boundary Edges}} to that would result in several closed faces. In this case, those edges should be added as {{PropertyData|Unbound Edges}} to control the curvature only.
* Using parametric {{PropertyData|Boundary Edges}} (for example, {{Button|[[File:Draft_BSpline.svg|16px]] [[Draft_BSpline|Draft_BSplines]]}}) that when recomputed fail to produce a closed boundary. That is, the edges to be used as {{PropertyData|Boundary Edges}} must always form a closed shape, even if their internal properties change.


== Scripting ==
== Scripting ==
Line 71: Line 92:
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
{{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 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.
* 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.
* Auxiliary edges and vertices must be assigned as a [[LinkSubList|LinkSubLists]] to the {{incode|UnboundEdges}} and {{incode|Points}} properties of the object.
Line 131: Line 152:
}}
}}



{{Docnav||[[Surface_GeomFillSurface|Fill boundary curves]]|[[Surface_Module|Surface]]|IconL=|IconC=Workbench_Surface.svg|IconR=BSplineSurf.svg}}
{{Docnav
|
|[[Surface_GeomFillSurface|GeomFillSurface]]
|[[Surface_Workbench|Surface]]
|IconL=
|IconR=Surface_GeomFillSurface.svg
|IconC=Workbench_Surface.svg
}}


{{Surface Tools navi{{#translation:}}}}
{{Surface Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 15:16, 2 June 2023

Other languages:

Surface Filling

Menu location
Surface → Filling...
Workbenches
Surface
Default shortcut
None
Introduced in version
-
See also
None

Descriere

Surface Filling creates a surface from a series of connected boundary edges. The curvature of the surface can be additionally controlled by non-boundary edges and vertices, and a support surface.

The base geometry can belong to curves created with the Draft Workbench or the Sketcher Workbench, but can also belong to solid objects such as those created with the Part Workbench or the PartDesign Workbench.

Two filled surfaces delimited by four edges located on the XY plane. The surface on the right is additionally controlled by a non-boundary edge.

Cum se folosește

  1. apăsați butonul Surface filling... button.
  2. Detalierea pașilor este necesară.
  3. Definiți opțiunile și apăsați OK.

Opţiuni

  • In the Boundaries section a support surface and boundary edges can specified:
    • Press the Support surface button and select a face in the 3D view to add a support surface.
      • Click the icon to remove the support surface.
    • Press the Add edge button once to start selecting boundary edges in the 3D view.
    • There are several ways to deselect boundary edges:
      • Press the Remove edge button once to start deselecting edges in the 3D view.
      • Select an edge in the list and press Delete.
      • Right-click an edge in the list and select Remove from the context menu.
  • In the Edge constraints section non-boundary edges can be specified:
    • The selection options are similar to those for boundary edges.
  • In the Vertex constraints section non-boundary vertices can be specified:
    • The selection options are similar to those for boundary edges.
  • Press Esc or the Cancel button to abort the operation.

Example

The Support surface acts as an additional constraint for the surface. The following simple example will give you an idea how this works:

  1. In the Part Workbench create a cylinder and set its DateAngle to 180°.
  2. Switch to the Surface Workbench and press the Filling button.
  3. Select the two semi-circular edges and the two straight edges that connect them.
  4. The result matches the four boundary edges, but the inner shape is quite different from the cylindrical face.
  5. Edit the Surface object and for the Support surface select the cylindrical face.
  6. The modified shape matches the cylindrical face much more closely.

Proprietăți

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

  • DateProperty: descrierea proprietăților
  • VizualizareProperty: descrierea proprietăților

View

Base

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