Surface ExtendFace: Difference between revisions

From FreeCAD Documentation
(Removed UnfinishedDocu template because the information has more or less been updated.)
No edit summary
Line 8: Line 8:
|[[Surface_Module|Surface]]
|[[Surface_Module|Surface]]
|IconL=Surface_Sections.svg
|IconL=Surface_Sections.svg
|IconC=Workbench_Surface.svg
|IconR=Surface_CurveOnMesh.svg
|IconR=Surface_CurveOnMesh.svg
|IconC=Workbench_Surface.svg
}}
}}


Line 16: Line 16:
|Name=Surface ExtendFace
|Name=Surface ExtendFace
|MenuLocation=Surface → Extend face
|MenuLocation=Surface → Extend face
|Workbenches=[[Surface Module|Surface]]
|Workbenches=[[Surface_Module|Surface]]
|Version=0.17
|Version=0.17
}}
}}
Line 23: Line 23:


<!--T:4-->
<!--T:4-->
{{Button|[[File:Surface_ExtendFace.svg|16px]] [[Surface ExtendFace|Surface ExtendFace]]}} extrapolates an existing face or surface at its boundaries with its local U and V parameters.
{{Button|[[File:Surface_ExtendFace.svg|16px]] [[Surface_ExtendFace|Surface ExtendFace]]}} extrapolates an existing face or surface at its boundaries with its local U and V parameters.


</translate>
</translate>
Line 50: Line 50:


<!--T:12-->
<!--T:12-->
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 === <!--T:13-->
=== Data === <!--T:13-->
Line 89: Line 89:


<!--T:24-->
<!--T:24-->
The Surface Extend tool can be used in [[macros|macros]] and from the [[Python|Python]] console by adding the {{incode|Surface::Extend}} object.
The Surface Extend tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by adding the {{incode|Surface::Extend}} object.
* The face to extend must be assigned as a [[LinkSub|LinkSub]] to the {{incode|Face}} property of the object. It must contain only a single face.
* The face to extend must be assigned as a [[LinkSub|LinkSub]] to the {{incode|Face}} property of the object. It must contain only a single face.


Line 142: Line 142:
|[[Surface_Module|Surface]]
|[[Surface_Module|Surface]]
|IconL=Surface_Sections.svg
|IconL=Surface_Sections.svg
|IconC=Workbench_Surface.svg
|IconR=Surface_CurveOnMesh.svg
|IconR=Surface_CurveOnMesh.svg
|IconC=Workbench_Surface.svg
}}
}}

</translate>
</translate>
{{Surface Tools navi{{#translation:}}}}
{{Surface Tools navi{{#translation:}}}}

Revision as of 21:15, 2 December 2020

Other languages:

Surface ExtendFace

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

Description

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

Left: original face. Right: extended face.

Usage

  1. Make sure you have an object that has faces. The object could be created with the Surface Workbench but it could also be any other object, for example, created with Part or PartDesign.
  2. Select the face to extend by clicking on it on the 3D view.
  3. Press Extend face.

Options

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

Properties

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

  • DataFace (LinkSub): the subelement from an object that will be extended; it must be a face.
  • DataTolerance (FloatConstraint): it defaults to 0.1.
  • DataExtend UNeg (FloatConstraint): it defaults to 0.05. The ratio of the local U parameter that will be extended in the negative direction.
  • DataExtend UPos (FloatConstraint): it defaults to 0.05. The ratio of the local U parameter that will be extended in the positive direction.
  • DataExtend USymetric (Bool): it defaults to true, in which case DataExtend UNeg and DataExtend UPos will have the same value.
  • DataExtend VNeg (FloatConstraint): it defaults to 0.05. The ratio of the local V that will be extended in the negative direction.
  • DataExtend VPos (FloatConstraint): it defaults to 0.05. The ratio of the local V direction that will be extended in the positive direction.
  • DataExtend VSymetric (Bool): it defaults to true, in which case DataExtend VNeg and DataExtend VPos will have the same value.
  • DataSampleU (IntegerConstraint): it defaults to 32.
  • DataSampleV (IntegerConstraint): it defaults to 32.

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. It must contain only a single face.
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)

points = [a, App.Vector(-20, -8, 0), b, c,
          App.Vector(37, 4, 0), d,
          App.Vector(-2, -18, 0), a]
obj = Draft.make_bspline(points)
doc.recompute()

if App.GuiUp:
    obj.ViewObject.Visibility = False

surf = doc.addObject("Surface::Filling", "Surface")
surf.BoundaryEdges = [(obj, "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()

# ---------------------------------------------------------
surf_extended = doc.addObject("Surface::Extend", "Surface")
surf_extended.Face = [surf, "Face1"]
doc.recompute()