Surface Filling/hr: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{UnfinishedDocu}} |
|||
{{Docnav||[[Surface_GeomFillSurface|Fill boundary curves]]|[[Surface_Module|Surface]]|IconL=|IconC=Workbench_Surface.svg|IconR=BSplineSurf.svg}} |
|||
{{Docnav |
|||
{{GuiCommand|Icon=Filling.svg|Name=Surface Filling|MenuLocation=Surface → Filling...|Workbenches=[[Surface Module|Surface]]|}} |
|||
| |
|||
|[[Surface_GeomFillSurface|GeomFillSurface]] |
|||
|[[Surface_Workbench|Surface]] |
|||
|IconL= |
|||
|IconR=Surface_GeomFillSurface.svg |
|||
|IconC=Workbench_Surface.svg |
|||
}} |
|||
{{GuiCommand |
|||
|Name=Surface Filling |
|||
|MenuLocation=Surface → Filling |
|||
|Workbenches=[[Surface_Workbench|Surface]] |
|||
|Version=0.17 |
|||
}} |
|||
<span id="Description"></span> |
|||
==Opis== |
==Opis== |
||
{{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. |
|||
[[Image:Surface_Filling_example.png|600px]] |
|||
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]]. |
|||
{{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}} |
|||
[[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> |
|||
<div class="mw-translate-fuzzy"> |
|||
==Kako koristiti== |
==Kako koristiti== |
||
</div> |
|||
# Press the {{Button|[[File: |
# Press the {{Button|[[File:Surface_Filling.svg|16px]] [[Surface_Filling|Filling]]}} button. |
||
# The {{MenuCommand|Boundaries}} task panel opens. See [[#Options|Options]]. |
|||
# Detailed steps as needed. |
|||
# Select two or more edges in the [[3D_view|3D view]]: |
|||
# Set options and press {{Button|OK}}. |
|||
#* There is no need to press the {{Button|Add edge}} button in the {{MenuCommand|Boundaries}} section at this time. |
|||
#* The edges must be selected in consecutive order. |
|||
#* The edges must be connected, but the complete boundary need not be closed. |
|||
#* The complete boundary should not self-intersect. |
|||
#* For a 360° circular boundary two semicircular edges can be selected. |
|||
# A preview of the final shape will be shown once enough valid geometry has been selected. |
|||
# Optionally select a {{MenuCommand|Support surface}}. See [[#Example|Example]]. |
|||
# Optionally select one or more {{MenuCommand|Edge constraints}}. |
|||
# Optionally select one or more {{MenuCommand|Vertex constraints}}. |
|||
# Press {{Button|OK}} button. |
|||
<span id="Options"></span> |
|||
==Opcije== |
==Opcije== |
||
* 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. |
|||
*** Click the [[File:Edit-cleartext.svg|16px]] icon to remove the support surface. |
|||
** Press the {{Button|Add edge}} button once to start selecting boundary edges in the [[3D_view|3D view]]. |
|||
** 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°}}. |
|||
# 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. |
|||
# Select the two semi-circular edges and the two straight edges that connect them. |
|||
# 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> |
|||
==Svojstva== |
==Svojstva== |
||
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. |
|||
* {{PropertyData|Property}}: description of the property |
|||
* {{PropertyView|Property}}: description of the property |
|||
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}} |
|||
* {{PropertyData|Boundary Edges|LinkSubList}}: boundary edges; C0 is required for edges without a corresponding face. |
|||
* {{PropertyData|Boundary Faces|StringList}}: |
|||
* {{PropertyData|Boundary Order|IntegerList}}: order of constraint on boundary faces; {{Value|0}}, {{Value|1}}, and {{Value|2}} are possible. |
|||
* {{PropertyData|Unbound Edges|LinkSubList}}: unbound constraint edges; C0 is required for edges without a corresponding face. |
|||
* {{PropertyData|Unbound Faces|StringList}}: |
|||
* {{PropertyData|Unbound Order|IntegerList}}: order of constraint on unbound faces; {{Value|0}}, {{Value|1}}, and {{Value|2}} are possible. |
|||
* {{PropertyData|Free Faces|LinkSubList}}: free constraint on a face. |
|||
* {{PropertyData|Free Order|IntegerList}}: order of constraint on free faces. |
|||
* {{PropertyData|Points|LinkSubList}}: constraint points on surface. |
|||
* {{PropertyData|Initial Face|LinkSub}}: initial surface to use. |
|||
* {{PropertyData|Degree|Integer}}: starting degree, it defaults to {{Value|3}}. |
|||
* {{PropertyData|Points On Curve|Integer}}: number of points on an edge for constraint. |
|||
* {{PropertyData|Iterations|Integer}}: number of iterations, it defaults to {{Value|2}}. |
|||
* {{PropertyData|Anisotropy|Bool}}: it defaults to {{FALSE}}. |
|||
* {{PropertyData|Tolerance2d|Float}}: 2D tolerance, it defaults to {{Value|0.0}}. |
|||
* {{PropertyData|Tolerance3d|Float}}: 3D tolerance, it defaults to {{Value|0.0}}. |
|||
* {{PropertyData|Tol Angular|Float}}: G1 tolerance, it defaults to {{Value|0.01}}. |
|||
* {{PropertyData|Tol Curvature|Float}}: G2 tolerance, it defaults to {{Value|0.10}}. |
|||
* {{PropertyData|Maximum Degree|Integer}}: maximum curve degree, it defaults to {{Value|8}}. |
|||
* {{PropertyData|Maximum Segments|Integer}}: maximum number of segments, it defaults to {{Value|9}}. |
|||
<span id="View"></span> |
|||
=== Pogled === |
|||
{{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"), |
|||
{{Docnav||[[Surface_GeomFillSurface|Fill boundary curves]]|[[Surface_Module|Surface]]|IconL=|IconC=Workbench_Surface.svg|IconR=BSplineSurf.svg}} |
|||
(aux_v2, "Vertex1")] |
|||
doc.recompute() |
|||
}} |
|||
{{Surface Tools navi}} |
|||
{{Docnav |
|||
{{Userdocnavi}} |
|||
| |
|||
|[[Surface_GeomFillSurface|GeomFillSurface]] |
|||
|[[Surface_Workbench|Surface]] |
|||
|IconL= |
|||
|IconR=Surface_GeomFillSurface.svg |
|||
|IconC=Workbench_Surface.svg |
|||
}} |
|||
{{Surface Tools navi{{#translation:}}}} |
|||
{{clear}} |
|||
{{Userdocnavi{{#translation:}}}} |
Latest revision as of 15:16, 2 June 2023
Surface Filling |
Menu location |
---|
Surface → Filling |
Workbenches |
Surface |
Default shortcut |
None |
Introduced in version |
0.17 |
See also |
None |
Opis
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.
Kako koristiti
- Press the Filling button.
- The Boundaries task panel opens. See Options.
- Select two or more edges in the 3D view:
- There is no need to press the Add edge button in the Boundaries section at this time.
- The edges must be selected in consecutive order.
- The edges must be connected, but the complete boundary need not be closed.
- The complete boundary should not self-intersect.
- For a 360° circular boundary two semicircular edges can be selected.
- A preview of the final shape will be shown once enough valid geometry has been selected.
- Optionally select a Support surface. See Example.
- Optionally select one or more Edge constraints.
- Optionally select one or more Vertex constraints.
- Press OK button.
Opcije
- 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.
- 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:
- In the Part Workbench create a cylinder and set its PodaciAngle to
180°
. - Switch to the Surface Workbench and press the Filling button.
- Select the two semi-circular edges and the two straight edges that connect them.
- 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 Support surface select the cylindrical face.
- The modified shape matches the cylindrical face much more closely.
Svojstva
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
- PodaciBoundary Edges (
LinkSubList
): boundary edges; C0 is required for edges without a corresponding face. - PodaciBoundary Faces (
StringList
): - PodaciBoundary Order (
IntegerList
): order of constraint on boundary faces;0
,1
, and2
are possible. - PodaciUnbound Edges (
LinkSubList
): unbound constraint edges; C0 is required for edges without a corresponding face. - PodaciUnbound Faces (
StringList
): - PodaciUnbound Order (
IntegerList
): order of constraint on unbound faces;0
,1
, and2
are possible. - PodaciFree Faces (
LinkSubList
): free constraint on a face. - PodaciFree Order (
IntegerList
): order of constraint on free faces. - PodaciPoints (
LinkSubList
): constraint points on surface. - PodaciInitial Face (
LinkSub
): initial surface to use. - PodaciDegree (
Integer
): starting degree, it defaults to3
. - PodaciPoints On Curve (
Integer
): number of points on an edge for constraint. - PodaciIterations (
Integer
): number of iterations, it defaults to2
. - PodaciAnisotropy (
Bool
): it defaults tofalse
. - PodaciTolerance2d (
Float
): 2D tolerance, it defaults to0.0
. - PodaciTolerance3d (
Float
): 3D tolerance, it defaults to0.0
. - PodaciTol Angular (
Float
): G1 tolerance, it defaults to0.01
. - PodaciTol Curvature (
Float
): G2 tolerance, it defaults to0.10
. - PodaciMaximum Degree (
Integer
): maximum curve degree, it defaults to8
. - PodaciMaximum Segments (
Integer
): maximum number of segments, it defaults to9
.
Pogled
Base
- PregledControl Points (
Bool
): it defaults tofalse
; if set totrue
, 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
andPoints
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()
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub