Profile Based Shapes

Introduction
Apart from a few primitives, modern CAD applications offer two principal ways of creating shapes:
 * Surface based design: to design thin walled objects like deep-drawn sheet metal parts where you usually only model the stamp side. The thickness is added in the end when all face elements are in place and connected to create a single surface.
 * Profile based design: to design thin walled and solid objects having an invariable cross-section, or thin walled and solid transition objects connecting two or more different profiles.

This page focuses on profile based design and tries to name and describe several types of shapes, and link to the tools that can be used to create them.

On this page the term profile without a suffix is used for an open or closed 2D contour (line, arc, circle, or polyline).

Profile based design
Profiles are usually made of 2D geometry and require additional elements to create 3D shapes.
 * 1) Another profile (cross-section). The resulting shape will connect the related elements of both profiles. In most cases a copy of the base profile is used and the result has an invariable cross-section.
 * Some tools accept additional profiles to scale the cross-section or to create a transition between a base profile and different additional profiles.
 * At some places within FreeCAD (GUI and wiki) section or cross-section is used to distinguish the additional profiles from the base profile.
 * See Loft shapes for shapes made of a profile and several cross-sections only.
 * 1) A control element to position the copy of the base profile in a certain relation to the profile such as:
 * 2) * A vector derived from a 3D line element (axis, edge.) in combination with a length. Part Extrude and PartDesign Pad create such vector controlled shapes. See Prismatic shapes.
 * These shapes allow to add a draft to the lateral faces, either through an internal tool option, or an external tool.
 * 1) * An axis to turn the profile around in connection with an angle. Part Revolve and PartDesign Revolution create such rotation controlled shapes. See Rotated shapes.
 * 2) * A backbone kurve (spine) to sweep the profile along Part Sweep and PartDesign Additive Pipe create such spine controlled shapes. See Sweep shapes.

Filled base profile and end cross-section give a closed shell, sometimes called a volume. Part tools will not create volumes, but will automatically create solid shapes instead.

Open profiles usually result in surface shapes and so they currently cannot be used to create PartDesign features.

Prismatic shapes
Prismatic shapes have invariable cross-sections. The profile is distributed along a straight line/vector and we have to decide if we need a surface shape or a solid shape

Prismatic surface shapes
Prismatic surface shapes can be created with Part Extrude. The elements of the profile have an influence on the resulting shape:
 * A single straight line results in a planar face.
 * A circle or an arc results in a closed or open cylindric face.
 * A polyline results in a shell, a shape made of connected faces



Prismatic solid shapes
Prismatic solid shapes can be created with Part Extrude, too if the option  is checked, or with  PartDesign Pad.



See PartDesign Examples for more prismatic solids.

Another tool to to create prismatic solid shapes is provided by the external SheetMetal workbench:  Make Base Wall uses creates planar objects (blanks) from closed contours and unfoldable bent objects from open contours.

/

Rotated shapes
Rotated shapes have invariable cross-sections. The profile is distributed around an axis (which is the same as along a circular line) and we have again to decide if we need a surface shape or a solid shape.

Rotatated surface shapes
Rotatated surface shapes can be created with Part Revolve. The elements of the profile have an influence on the resulting shape:
 * A single straight results in a cylindric, a conical, or a planar face.
 * A circle or an arc results in a closed or open section of a torus surface.
 * A polyline results in a rotation shell, a shape made of connected faces of the above types.



Rotatated solid shapes
Rotatated solid shapes can be created with Part Revolve, too if the option  is checked, or with  PartDesign Revolution.



See PartDesign Examples for rotated solids. (They show profiles distributed along a circular spine, but the resulting shapes are the same as if the profiles were rotated)

Sweep shapes
Sweep shapes have invariable cross-sections. The profile is distributed along a spine (a 2D or 3D backbone kurve that controlls the location and normal direction of cross-sections) and we have in this case as well to decide if we need a surface shape or a solid shape.

Sweep surface shapes
Sweep surface shapes can be created with Part Sweep.



Sweep solid shapes
Sweep solid shapes can be created with Part Sweep, too if the option  is checked, or with  PartDesign AdditivePipe.



Notes on Profiles

 * Part tools accept several outline objects to be extruded in one operation, but each object is restricted to contain only one contour.
 * PartDesign tools accept outline objects containing several nested contours as long as the result is a single solid.

Extrusion objects
Real world extrusion objects are produced by extrusion i.e. pushing material through a die. The manufacturing condition of such objects is usually modeled using prismatic shapes while sweep shapes are used for their assembled condition. This applies to rolled objects as well.

In relation with CAD to extrude usually means to distribute a profile along a straight line or vector. Even open profiles with no thickness can be extruded, which is impossible in the real world.



Prismatic and rotated shapes can be created with the sweep tools as well if lines and arcs or circles are used as spines. See PartDesign Examples.

Distributing profiles
What does a CAD application in the background? As stated above, we supply the profile and some kind of spine and the extrusion tools do the uncomfortable work:
 * Creating working planes normal to the spline in each start/end point of spine segments.
 * Copying profiles, i.e. redrawing the profile on a working plane
 * Connecting the related points of profile and cross-section(s) with curves that run parallel to the spine.
 * Filling the faces between a profile segment, a cross-section segment, and two connection lines/curves.
 * Filling faces inside the profile and the last cross-section to close volumes and create solids.

To visualize the steps we use a profile similar to the "Hamburger Zipfel" that has taught generations of automotive students how to distribute sealing profiles manually.



FreeCAD's sweep tools allow to use profiles that do not lie on planes that are normal to the spine, but they are still controlled by the virtual working planes.This should be avoided as this leads to kinks in the object surfaces:



Notes on spines

 * Spines alone are not able to control the X direction of the (virtual) working planes and as a consequence the alignment of the cross-sections. Some more conditions apply:
 * The origin of a (virtual) working plane is on the spine and its normal/Z axis is collinear to the tangent of the spine in this point.
 * Straight segments keep the direction of X axes parallel (and all normals/Z axes are collinear).
 * Circular segments keep a constant angle between X axes and the lines connecting origin and arc center.
 * Arbitrary curve segments work like circular segments in principle but they do not refer to the same (virtual) center point between their limits. Varying center points along the spine may result in unwanted twists of the shape.
 * To control the X direction of the (virtual) working planes independently from internal conditions another curve can be used. [[Image:PartDesign_AdditivePipe.svg|16px]] PartDesign AdditivePipe has an option that uses a guide curve (secondary path) to control the X direction. (Activating the Auxiliary mode opens a "Profile" box to add the guide curve)



Why could extrusions fail?
A too small radius: If the radius of the spine is too small the cross-sections will intersect resulting in non-manifold geometry, but to a certain degree the sweep tools are able to render a shape anyway: