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.
The Silk Workbench is an external workbench that creates NURBS surfaces in FreeCAD. Silk is the new name of the NURBSlib_EVM project, and provides NURBS surface modeling tools focused on low degree and seam continuity.
A NURBS is a smooth curve or surface whose form is controlled by a relatively small number of control points, which float close to the curve or surface without lying on it. As their name indicates, control points are what the user manipulates to control the curve or surface. The "refinement" of a NURBS is controlled by its degree, and the "distance of effect" of a control point is controlled by the knot vector of the NURBS.

A complex surface model built entirely with Silk Workbench's NURBS tools
Low degree: Silk NURBS curves and surfaces use the minimum degree suitable for the intended goal, and knot vectors are kept to a small, consistent set. With most NURBS modeling problems, the apparent solution is to increase the degree and number of knots — while perfectly valid, this raises both the computational difficulty and the organizational challenge of managing control points. Silk aims to provide tools of the lowest mathematical complexity for each problem it solves.
Seam continuity: Silk's goal is to allow complex models to be built from individual NURBS sections — either by creating new surfaces that are continuous with existing ones, or by providing tools to create smooth transitions where surfaces were initially created with discontinuities.
FreeCAD does the heavy lifting:
Silk Workbench merely provides methods for combining these simple sketches into control point grids, which FreeCAD then converts into NURBS surfaces.

A single continuous surface folded like a handkerchief, demonstrating seam continuity across a fold

Four base surfaces blended across a shared corner using Silk Workbench's N-star blending tools
Although Silk Workbench is intended to provide efficient and user-friendly tools in the long term, at this time it behaves more like a low-level library with GUI access to its functions. Individual functions create individual document objects, and in the future, relevant functions might be chained together automatically to create complex nested objects. The current objects are very likely to persist, both as individual document objects and as sub-objects in the future.
Modeling can be done in the current state, and the resulting data structures are efficient, but the process can be laborious. The best path forward for user-friendliness will depend heavily on the outcome of several debates within the FreeCAD community on how parts, solid bodies, assemblies, and object linking are organized.
In the meantime, Silk does offer a few tools not otherwise available in FreeCAD (e.g. 3D splines), and can in general be seen as a sandbox for surface design, control strategies, data structures, and algorithms.
Sketches are the fundamental control elements of Silk curves and eventually Silk surfaces, see Sketcher workbench for information about sketch tools and their general usage. Keep in mind to use the
New Sketch command of the Sketcher workbench to create sketches, not its PartDesign counterpart.
The Silk tools are all located in the Silk menu and the Silk Commands toolbar that appear when you load the Silk Workbench.
The individual tool of the Silk workbench on their own are quite easy to use and only require a brief description. The hard part is to organize the model tree in a way to be able to handle the huge amount of simple objects instead of losing control. See the author's video tutorials published on the forum (find the link in the References)
Primary surfaces are 4x4 surfaces that create the raw shape before blending.
Sketches → Control polygons for curved edges → Control polygon for straight edges added → 4x4 control Grids → Flow variant control grids → Primary 4x4 surfaces
Primary curves are cubic curves representing the edge curves of the primary surfaces. They are created from the same control polygons as the control grids of the surface.
Control polygons → Primary curves → Primary curves and surfaces
3 curve segments, determined by 4 points, are placed on the primary curves. Since splitting curves is not (yet) implemented, new segment polygons and curve segments that match exactly with their underlying primary curve are created between each pair of points. The middle segment controls the area of the primary surface along the curve that will not change. (For clarity, a different color is applied on the outer corner segments)
Primary curves and surfaces → Points on curves added → Segment polygons replaced primary curves → Curve segments replaced segment polygons → Primary surfaces and curve segments
As curves, surfaces cannot be split, instead matching 4x4 grids and 4x4 sub-surfaces are added on a support surface.
In this case the center grid (grid to restore) and the center surface (restored surface), representing the area to be kept, are obtained from a primary surface in connection with 2 middle segments on two adjacent edges of the surface.
1 primary surface and 2 middle segments selected → Center grid on its support surface → Center surface on its support surface → One center surface on each support surface
Related edge grids are obtained from the same surface in connection with 1 inner and 1 outer corner curve segment on two adjacent edges of the surface.
1 primary surface, 1 middle segment, and 1 corner segment selected → Edge grid on its support surface → All 4 possible edge grids on each support surface
It is now also possible to create the center grid and all 4 edge grids in one operation using the same tool:
1 primary surface and 2x 3 curve segments selected → Edge grid on its support surface → 1 center grid and 4 edge grids on each support surface → 1 center surface and all 4 surrounding edge grids on each support surface
Two adjacent 4x4 edge grids can be combined into a 6x4 blended edge grid which is used to create a 6x4 blended edge surface:
Center surfaces and surrounding edge grids → Center surfaces and a pair of adjacent edge grids → 1 blended edge grid replaced both edge grids → Center surfaces with all 12 possible blended edge grids → Center surfaces with blended edge surfaces from the blended edge grids, and the remaining edge grids
The workflow to create a corner blend surface depends on the number of blended edge surfaces surrounding the corner gap; 4 in this example.
Two 6x4 blended edge grids meeting at a single point are used to create a 3x3 corner sub-grid, and 4 corner sub-grids are combined into one 6x6 blended corner grid that is used to create a 6x6 blended corner surface:
Center surfaces and blended edge grids → Center surfaces and 2 blended edge grids → 1 corner sub-grid added → 4 corner sub-grids belonging to the same gap → 1 blended corner grid replaced the 4 corner sub-grids
Center surfaces with blended edge grids, and all 4 yet possible blended corner grids → Blended corner surfaces replaced the blended corner grids → Center surfaces with blended edge and corner surfaces, and the remaining edge grids
Two 6x4 blended edge grids sharing a point are used to create a 6x3 corner sub-grid, and 3, (4), 5, or 6 corner sub-grids are combined into one N6 blended corner grid that is used to create a 6x6 blended corner surface:
Center surfaces with blended edge surfaces → 1 corner sub-grid added → All 6 corner sub-grids added → 1 N6 blended corner grid added → Center surfaces with blended edge surfaces and 1 N6 blended corner surface that replaced the grids
In contrast to other applications Silk surfaces seem to be derived from polygons instead of curves, but their edge curves are calculated in the background. To make them visible as separate objects Silk provides 2 tools:
Each primary surface supports nine surface segments and curve segments control the layout. To extend a patchwork of primary surfaces it is recommended to use prepared groups of control sketch, primary polygon, primary curve, points on curve, segment polygons, and segment curves.
3L Sketch in edit mode → 3L Sketch in normal mode → Control polygon → Control polygon and primary curve added
Primary curve → 4 points on curve added → Color coded points with u parameters adjusted → Segment polygons replaced the primary curve → The resulting curve set with color coded curve segments from the segment polygons
For clarity, the outer curve segments as well as start and end point are colored differently, and only curve segments and points of the curve set are kept visible. (The colors are according to those used in the author's video series)
The sketch of a curve set can be attached to a layout sketch with zero offset, project the relevant geometry segment as external geometry, and constrain start and end point of the polyline to its vertices. This way several control sketches can be concatenated on the plane of this layout sketch. Several copies of a main Layout sketch can be attache to it with certain offsets to supply a set of longitudinal cross-sections for e.g. a boat hull. These sections can be connected by some more curve sets and thus creating a frame of primary curves for a patchwork of primary surfaces.
ObjectXY.Layout sketch → 4 curve sets placed along the layout sketch
A blend curve creates a smooth transition from one middle curve segment of one curve set to the other middle curve segment of another curve set, based on the adjacent corner curve segments. The one genuinely valuable use case, in the context of the official workflow, is studying a set of Bézier elements and their blends in 2D before building the surfaces in 3D.
2 curve sets → 2 adjacent curve segments → Blend polygon → Blend curve
The Silk workbench relies on sketches and provides tools to create 4 types of objects:
And also tools for helper objects:
Silk uses 4 special types of sketches to create control polygons:
Any other sketch is accepted but only the first detected arc will be taken into account, or the first straight line if there is no arc in the sketch.
Silk uses two types of polygons to control NURBS curves and surfaces.
4 point polygons, the ControlPoly4 objects, are created with the ControlPoly4 tool and come in several sub-types depending on the selected input element.
Another 4 point polygon is created with the ControlPoly4_segment tool. The ControlPoly4_segment object, is used to extract a segment of a NURBS curve.
6 point polygons, the ControlPoly6 objects, are created with the ControlPoly6 tool and come in several sub-types depending on the selected input element.
Silk uses two types of NURBS curves:
Silk uses several types of grids to span a NURBS surface:
Silk creates several types of NURBS surfaces.
See ControlPoly4.
See Point_onCurve.
See ControlPoly4_segment.
See ControlPoly6.
See Silk_CubicCurve_4.
See Silk_CubicCurve_6.
See ControlGrid44.
In development — partial, useful result.
Create a ControlGrid44_flow from a ControlGrid44.
Prepare the following selection:
Apply the function.
The output grid will have more gradual internal changes, at the cost of less predictable tangency across edges. This can help untangle and "puff up" basic grids. Various parameters allow scaling of the effect, restoring specific tangencies, and maintaining G1 "mirrorability" in the plane of each edge (if the edge was planar and G1-mirrorable in the original grid).
Create a ControlGrid64 from two ControlPoly4 and two ControlPoly6 objects matching on opposite edges.
Select each edge in sequence (4, 6, 4, 6), counter-clockwise, looking from the outer side.
Apply the function.
Used to create mixed-degree contour surfaces.
A ControlGrid64 mixing 4-point and 6-point edges
Typically, grids of this type (64) are created automatically by other tools. Manually creating this type of grid (and its associated surface) directly from polys has limitations, because they cannot (yet) be segmented or blended. They remain compatible with all tools that take a ControlGrid64 as input, even though those tools assume the grids were generated automatically.
When segmentation becomes available, the grid/surface will be cut into three ControlGrid44 objects at preset locations — an exact conversion with no loss of precision. These three pieces will then be workable through all the tools available for ControlGrid44 and CubicSurface_44 objects.
Create a ControlGrid66 from four connected ControlPoly6 edges.
Select each ControlPoly6 sequentially, counter-clockwise, looking from the outer side.
Apply the function.
6-point edges cannot (yet) be blended with Silk tools, so this grid and its associated surface are a final product at this stage.
A ControlGrid66 built from four ControlPoly6 edges
Create a cubic surface from a ControlGrid44.
Prepare the following selection:
Apply the function.
This is a Bezier cubic surface, intended as the basic "building block" surface that complex models are based on. All editing is done by editing the ControlGrid44 (refer to the ControlGrid44 tooltip and its "More information" section for design rules).
Can be used for hard-edge surfacing, or manually aligned for tangency (G1). Can also be blended along hard edges with other CubicSurface_44 objects (by way of ControlGrid64 objects), for high continuity (G2).
A CubicSurface_44 built from a ControlGrid44
This does for the ControlGrid44 object what CubicCurve_4 does for the ControlPoly4. Refer to the extensive description given for CubicCurve_4 — those comments apply here to the surface rather than just a curve.
ControlGrid44 objects manually built from polys are almost always intended to be used by surfaces, but many automatically created ControlGrid44 objects are intended to be consumed by blend grids. Because of these different possible paths, grid creation is kept separate from surface creation, so a useful grid is not locked inside a surface and remains accessible to other operations. At some point in the future, it is planned to allow clicking a surface where a grid is expected, automatically finding the grid inside the surface, so tools can use either the grid or the surface as needed — this is straightforward but requires a fair amount of programming work. For now, the exact object type needed must be fed directly into each function.
Creates a CubicSurface_64 from a ControlGrid64 of any type.
Select one ControlGrid64 object.
Apply the function.
Used for mixing four-point and six-point polys/edges, or for blending edges of four-point contours. Can produce blends along the edges of CubicSurface_44 objects. The edges touching the blended objects are four-pointed; the edges reaching from one blended object to the other are six-pointed. This is still a cubic grid/surface in both directions, but one direction is now Bezier (4 points) while the other is not (6 points). The price of the extra control points is that this surface is only guaranteed G2 internally along the 6-point direction (it may be G3 under the right setup); it remains Bezier and G3 along the 4-point direction.
A CubicSurface_64 blend between two CubicSurface_44 objects
Create a CubicSurface_66 from a ControlGrid66.
Select one ControlGrid66.
Apply the function.
Mainly intended to be applied to automatically generated grids. Can also be used manually for hard-edge surfacing, manually aligned for tangency, or even manually aligned for G2 (very difficult and limited).
6-point edges cannot (yet) be blended with Silk tools.
A CubicSurface_66 surface
This is still a cubic surface (degree 3), but no longer Bezier, so additional control points are allowed. The price of these extra control points is that this surface is only guaranteed G2 internally (it may be G3 under the right setup).
When segmentation becomes available, the grid/surface will be cut into nine ControlGrid44 objects at preset locations — an exact conversion with no loss of precision. These nine pieces will then be workable through all the tools available for ControlGrid44 and CubicSurface_44 objects.
Create a ControlGrid44 from a CubicSurface_44 and one CubicCurve_4 segment.
Prepare the following selection:
Apply the function.
The resulting grid represents a strip of the input surface, cut in either u or v to match the CubicCurve_4 segment along the surface edge.
Used in pairs to create ControlGrid64_2Grid44, to blend edges of CubicSurface_44 objects and produce a continuous (G2) contour. Also used to re-create the portions of the original surface that are to be preserved and not blended.
A full-strip edge segment cut from a CubicSurface_44
How to prepare selection item 2, "a CubicCurve_4 that matches part of an edge of that surface"? If the previous tools have already been used, almost everything needed is already in place. (If you are reading ahead before trying, the explanation below may seem convoluted.)
The edge of a surface cannot yet be cut/segmented directly with points. Instead, a CubicCurve_4 matching the entire edge of the surface is cut. This separate CubicCurve_4 is obtained by using the same poly that went into the surface's grid — so if curves were applied to the polys along the way (recommended), this edge curve already exists in the model. Segment this curve by creating 2 Point_onCurve objects, a ControlPoly4_segment, and applying a CubicCurve_4 to that segment.
(This direct-cutting feature is planned, but since a practical workaround already exists, it is a low priority.)
Create a ControlGrid44 from a CubicSurface_44 and two CubicCurve_4 segments.
Prepare the following selection:
Apply the function.
The resulting grid represents a "rectangular" cut of the input surface, cut in both u and v to match the CubicCurve_4 segments along the surface edges.
Used in pairs to create ControlGrid64_2Grid44, to blend edges of CubicSurface_44 objects and produce a continuous (G2) contour. Also used to re-create the portions of the original surface that are to be preserved and not blended.
A rectangular corner segment cut from a CubicSurface_44
See the "More information" section of ControlGrid44_EdgeSegment for how to prepare the CubicCurve_4 segments used in selection items 2 and 3 — the same technique applies here.
Create a StarTrim_CubicNStar object from a CubicNStarSurface_NStar66 object.
Select one CubicNStarSurface_NStar66.
Apply the function.
Useful for eliminating pinching in poor corner geometry; can be patched with a standard Filling surface.
Create a ControlGrid64_2Grid44 from two ControlGrid44 objects that share a corner.
Select two grids that share an edge.
Apply the function.
A blend grid joining two ControlGrid44 edge segments
Select a ControlGrid44 by one of its corner points in the 3D view, and apply the function.
This results in a "triangle" grid that "flows" to eliminate the selected corner.
Typical use is to round a corner in a set of surfaces segmented from a larger surface. The two edges remaining from the original grid are of type poly4, and the new curved edge is of type poly6 (a fully collapsed poly6 edge is hidden where the two edges of the original grid met).
This grid is not intended to produce a final surface, but is instrumental as a stepping stone: a high-quality surface is built off the new curved edge, which eventually replaces this "triangle."
Select two ControlGrid64 objects meeting at a corner to generate a corner-blend partial grid (a first step towards filling a four-sided hole where four blend grids/surfaces meet).
Apply the function.
Intended for the case where the two ControlGrid64 objects are blend grids that have segments of one common surface as inputs. The two blends "extend" the common surface, and this partial grid effectively extends the common surface into the corner gap.
Two ControlGrid64 blend grids meeting at a corner, before the sub-grid
The resulting SubGrid33 partial grid extending into the corner gap
When blending surfaces across perpendicular edges, a gap/hole appears at the corner, because both blends must be "set back" so they don't overlap each other. This object is a partial grid that extends both input ControlGrid64 objects "into" the gap, beginning the process of filling that gap. After making four of these objects, one for each corner of the hole, use ControlGrid66_4Sub to create the complete grid. The surface made from this grid (using CubicSurface_66) will then bridge across all four blends, giving good continuity with the original surfaces.
Select 4 related SubGrid33_2Grid64 objects in a loop to form a ControlGrid66_4Sub object (read the SubGrid33_2Grid64 description first).
Apply the function.
Fills four-sided holes between blends (only four-sided holes). Produces a fairly high-quality final surface; other tools handle 3-, 5-, 6-, 7-sided (etc.) holes, but with lower-quality results.
Four SubGrid33 partial grids around a four-sided corner hole, before joining
The finished ControlGrid66_4Sub filling the corner hole
When blending surfaces across perpendicular edges, a gap/hole appears at the corner, because both blends must be "set back" so they don't overlap. This object joins the SubGrid33 partial grids that extend both input ControlGrid64 objects "into" the gap, creating a single grid. The surface made from this grid (using CubicSurface_66) then bridges across all four blends, giving good continuity with the original surfaces.
Proven use cases (with reasonably high-quality results):
Recommended install is via the Addon Manager found under the Tools → Addon Manager menu.