|
|
| Menu location |
|---|
| Surface → Sections |
| Workbenches |
| Surface |
| Default shortcut |
| None |
| Introduced in version |
| 0.19 |
| See also |
| None |
The Surface Sections tool creates a surface from a series of sectional edges.
Left: control edges (transversal sections). Right: surface produced from these edges.
A Surface Sections object (Surface::Sections 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 Sections object has the following properties in the Property View.
Sections
LinkSubList): a list of edges that will be used to build the surface.Base
Bool): it defaults to false; if set to true, it will show an overlay with the control points of the surface.The shape of the surface depends on the direction of the chosen edges; if edges are selected and the result is a surface that "twists" on itself, one of the edges may need its list of vertices in the reverse order. See the information in Surface GeomFillSurface for a more complete explanation.
See also: FreeCAD Scripting Basics.
The Surface Sections tool can be used in macros and from the Python Console by adding the Surface::Sections object.
NSections property of the object.import FreeCAD as App
import Draft
doc = App.newDocument()
pl1 = App.Placement()
obj1 = Draft.make_circle(50, placement=pl1, face=False, startangle=0, endangle=180)
pl2 = App.Placement(App.Vector(0, 0, 25), App.Rotation())
obj2 = Draft.make_circle(30, placement=pl2, face=False, startangle=0, endangle=180)
points3 = [App.Vector(18, -10, 50),
App.Vector(12, 10, 50),
App.Vector(-12, 10, 50),
App.Vector(-18, -10, 50)]
obj3 = Draft.make_bspline(points3)
points4 = [App.Vector(15, -20, 100),
App.Vector(0, 6, 100),
App.Vector(-15, -20, 100)]
obj4 = Draft.make_bspline(points4)
doc.recompute()
surf = doc.addObject("Surface::Sections", "Surface")
surf.NSections = [(obj1, "Edge1"),
(obj2, "Edge1"),
(obj3, "Edge1"),
(obj4, "Edge1")]
doc.recompute()