Part Loft Technical Details: Difference between revisions

From FreeCAD Documentation
No edit summary
Line 10: Line 10:


===Step 1. Making numbers of segment in profiles match===
===Step 1. Making numbers of segment in profiles match===
[[File:Loft-vertex-insertion.png|thumb|300px|The process of slicing profile2 (white crescent-like shape) to create joints corresponding to vertices of profile1 (purple pentagon). The inserted joints are marked by yellow arrows.]]
The Loft needs the number of segments to match in order to create surfaces between corresponding segments. If the numbers of segments match in all profiles, this step is skipped.
The Loft needs the number of segments to match in order to create surfaces between corresponding segments. If the numbers of segments match in all profiles, this step is skipped.
If at least one of the profiles as different number of segments, the following procedure is applied.
If at least one of the profiles as different number of segments, the following procedure is applied.
Line 20: Line 19:


The operation is extended to all profiles, to yield the equal number of segments. The total number of segments in each profile would be equal to the sum of all numbers of segments of all profiles (provided none of the vertices happen to be at the same polar angle).
The operation is extended to all profiles, to yield the equal number of segments. The total number of segments in each profile would be equal to the sum of all numbers of segments of all profiles (provided none of the vertices happen to be at the same polar angle).
[[File:Loft-vertex-insertion.png|thumb|none|300px|The process of slicing profile2 (white crescent-like shape) to create joints corresponding to vertices of profile1 (purple pentagon). The inserted joints are marked by yellow arrows.]]


===Establishing correspondence between segments===
===Establishing correspondence between segments===
[[File:Loft Number of verts match.png|thumb|300px]]
In case slicing was done in Step 1, the correspondence is trivial.
In case slicing was done in Step 1, the correspondence is trivial.
In case numbers of segments in all profiles were equal, existing segments are used (see the picture).
In case numbers of segments in all profiles were equal, existing segments are used (see the picture).

Revision as of 22:56, 21 November 2014

[under construction]

Overview

This page explains the details of how the Loft surface is created. This also applies to Part:Sweep done along a straight path.

Stages of the Loft creation

To explain the process of loft, it is convenient to divide it into stages:

  1. make number of segments in the profiles equal
  2. establish correspondence between segments
  3. make the loft surface

Step 1. Making numbers of segment in profiles match

The Loft needs the number of segments to match in order to create surfaces between corresponding segments. If the numbers of segments match in all profiles, this step is skipped. If at least one of the profiles as different number of segments, the following procedure is applied. The procedure is explained here for the case of only two profiles for simplicity.

  1. the profiles are temporarily aligned so that they are coplanar and their centers of masses* match.
  2. (see the picture) for every vertex in one profile, the second profile is sliced at the same polar angle (the polar center is the center of mass). If there is more than one slice possible or no slice possible at all (it can happen on very convex profiles), the Loft typically fails.
  3. the same is done in the opposite direction.

The operation is extended to all profiles, to yield the equal number of segments. The total number of segments in each profile would be equal to the sum of all numbers of segments of all profiles (provided none of the vertices happen to be at the same polar angle).

The process of slicing profile2 (white crescent-like shape) to create joints corresponding to vertices of profile1 (purple pentagon). The inserted joints are marked by yellow arrows.

Establishing correspondence between segments

In case slicing was done in Step 1, the correspondence is trivial. In case numbers of segments in all profiles were equal, existing segments are used (see the picture).

The exact algorithm to find corresponding segments is complex, but generally it tends to minimize the twisting of the resulting Loft. This means that if one is doing a loft between two squares, the maximum twist possible is <45°. Further rotation of one of the squares will cause the Loft to jump to other vertices.

The correspondence between neighboring profiles is made independently. This means that additional twisting can be obtained by adding more profiles.

Another thing to note is that when numbers of segments in profiles are equal, the resulting Loft is substantially more robust with respect to complex profiles, especially for non-convex ones.