Surface Filling: Difference between revisions
(Information on the function of the task panel.) |
(All properties of the object) |
||
Line 49: | Line 49: | ||
==Properties== <!--T:6--> |
==Properties== <!--T:6--> |
||
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}} |
|||
<!--T:7--> |
<!--T:7--> |
||
* {{PropertyData|Boundary Edges|LinkSubList}}: boundary edges; C0 is required for edges without a corresponding face. |
|||
* {{PropertyData|Property}}: description of the property |
|||
* {{PropertyData|Boundary Faces|StringList}}: |
|||
* {{PropertyView|Property}}: description of the property |
|||
* {{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}}. |
|||
=== 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 == |
== Scripting == |
Revision as of 05:17, 30 September 2020
This documentation is not finished. Please help and contribute documentation.
GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.
See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.
Surface Filling |
Menu location |
---|
Surface → Filling... |
Workbenches |
Surface |
Default shortcut |
None |
Introduced in version |
- |
See also |
None |
Description
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
Usage
- Make sure you have at lease three edges or curves in space forming a closed contour. For example, these can be created with tools of the Draft Workbench or the Sketcher. Using three edges would create a triangular surface; four edges a quadrilateral surface.
- Optionally, curves can be drawn inside the closed contour, not necessarily touching the edges. These curves can be used to control the curvature of the resulting surface.
- Likewise, a number of vertices can be used with the same purpose to indicate where the surface must go through.
- Press the Surface filling button.
- Inside the Filling section, press Add edge.
- Use the pointer to pick the desired edges in the 3D view; a preview of the final shape will be shown after selecting valid edges that form a closed contour.
- Press OK to complete the operation.
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.
- Add edge: press once to start picking edges in the 3D view. Individual lines such as Draft BSplines and Sketcher BSplines can be chosen, as well as any edge from solid objects, like those of PartDesign Bodies and Part Primitives.
- Remove edge: press once to start picking edges in the 3D view; these must be edges that were previously selected to create the surface.
- 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.
Properties
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
- DataBoundary Edges (
LinkSubList
): boundary edges; C0 is required for edges without a corresponding face. - DataBoundary Faces (
StringList
): - DataBoundary Order (
IntegerList
): order of constraint on boundary faces;0
,1
, and2
are possible. - DataUnbound Edges (
LinkSubList
): unbound constraint edges; C0 is required for edges without a corresponding face. - DataUnbound Faces (
StringList
): - DataUnbound Order (
IntegerList
): order of constraint on unbound faces;0
,1
, and2
are possible. - DataFree Faces (
LinkSubList
): free constraint on a face. - DataFree Order (
IntegerList
): order of constraint on free faces. - DataPoints (
LinkSubList
): constraint points on surface. - DataInitial Face (
LinkSub
): initial surface to use. - DataDegree (
Integer
): starting degree, it defaults to3
. - DataPoints On Curve (
Integer
): number of points on an edge for constraint. - DataIterations (
Integer
): number of iterations, it defaults to2
. - DataAnisotropy (
Bool
): it defaults tofalse
. - DataTolerance2d (
Float
): 2D tolerance, it defaults to0.0
. - DataTolerance3d (
Float
): 3D tolerance, it defaults to0.0
. - DataTol Angular (
Float
): G1 tolerance, it defaults to0.01
. - DataTol Curvature (
Float
): G2 tolerance, it defaults to0.10
. - DataMaximum Degree (
Integer
): maximum curve degree, it defaults to8
. - DataMaximum Segments (
Integer
): maximum number of segments, it defaults to9
.
View
Base
- ViewControl 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.
import FreeCAD as App
import Draft
doc = App.newDocument()
a = App.Vector(-20, -20, 0)
b = App.Vector(-18, 25, 0)
c = App.Vector(40, 26, 0)
d = App.Vector(33, -20, 0)
points1 = [a, App.Vector(-25, 0, 0), b]
obj1 = Draft.make_bspline(points1)
points2 = [b, App.Vector(0, 25, 0), c]
obj2 = Draft.make_bspline(points2)
points3 = [c, App.Vector(24, 1, 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()
# ---------------------------------------------------------
aux_edge = Draft.make_bspline([App.Vector(17, -12, 8),
App.Vector(17, 0, 4),
App.Vector(15, 11, -2)])
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, Arch, Assembly, 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