Surface ExtendFace

From FreeCAD Documentation
Revision as of 06:24, 30 September 2020 by Vocx (talk | contribs) (Surface Extend extrapolates an existing face or surface at its boundaries with its local U and V parameters.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:

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 Extend

Menu location
Surface → Extend face
Workbenches
Surface
Default shortcut
None
Introduced in version
0.17
See also
None

Description

Surface Extend extrapolates an existing face or surface at its boundaries with its local U and V parameters.

File:Surface Extend example.png

Left: original surface. Right: extended surface.

Usage

  1. Make sure you have a face or surface.
  2. Select the existing surface, then Surface → Extend face.

Options

This command doesn't have any options. Either it works with the selection or not.

Properties

A Surface Extend (Surface::Extend 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

Base

  • 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, and 2 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, and 2 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 to 3.
  • DataPoints On Curve (Integer): number of points on an edge for constraint.
  • DataIterations (Integer): number of iterations, it defaults to 2.
  • DataAnisotropy (Bool): it defaults to false.
  • DataTolerance2d (Float): 2D tolerance, it defaults to 0.0.
  • DataTolerance3d (Float): 3D tolerance, it defaults to 0.0.
  • DataTol Angular (Float): G1 tolerance, it defaults to 0.01.
  • DataTol Curvature (Float): G2 tolerance, it defaults to 0.10.
  • DataMaximum Degree (Integer): maximum curve degree, it defaults to 8.
  • DataMaximum Segments (Integer): maximum number of segments, it defaults to 9.

View

Base

  • ViewControl 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 Extend tool can be used in macros and from the Python console by adding the Surface::Extend object.

  • The face to extend must be assigned as a LinkSub to the Face property 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(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()

# ---------------------------------------------------------