Orienting Instances by Paths or Surfaces in Parametric Sweep

Предыдущая страницаВ началоСледующая страница

Since it is not always possible to describe the rules of the profile instance's parameter modifications by expressions exactly, it is sometimes convenient to use 3D paths or surfaces from other bodies for defining the position and orientation of the current instance's coordinate system.

The origin of the current profile instance's coordinate system is snapped to a 3D path. The position of the origin on the paths can be controlled in two ways.

The X- and Y-axes can be oriented using other 3D paths or surfaces from other bodies.

Selection of a 3D path for snapping the coordinate system origin of the instances is done by the option:

LCSCurveStart

<1>

Select Curve defining position of coordinate system

Selection of elements for defining the orientation of the X and Y-axes is done by the following automenu options (the Z-axis is defined automatically):

LCSCurveStart

<1>

Select Curve defining position of coordinate system

LCSCurveX

<2>

Select Curve defining X direction of coordinate system

LCSCurveY

<3>

Select Curve defining Y direction of coordinate system

LCSPlaneX

<4>

Select Surface defining X direction of coordinate system

LCSPlaneY

<5>

Select Surface defining Y direction of coordinate system

When creating the operation using 3D paths, the operation dialog tabs Common and Parameters are somewhat different from the described above:

14ByParameters6

Accessible in this tab are various options for controlling the axes directions. Which group is accessible depends on how many paths were selected altogether: one (for defining the instance's coordinate system origin only) or two (for defining the instance's coordinate system origin and orientation of the X and/or Y-axes).

The Axis Direction drop-down list:

By curvature. The X-axis coincides with the direction of the path's curvature vector. If the 3D path is a straight line, then the axis is oriented along the X-axis of the global coordinate system.

By minimal twist. The X-axis is directed so to provide smooth rotation from the curvature vector direction at the path start to the curvature vector direction at the path end.

The Z-axis is always directed along the tangent to the path at the point of the coordinate system origin of the current instance. The Y-axis direction, if not defined, is determined automatically based on the X- and Z-axes.

By minimal distance (between the paths at the origin). A vector is constructed from the instance's coordinate system origin on the first path towards the nearest point on the second path.

clip6116

Orthogonal (to the path). A plane is constructed orthogonal to the first path tangent direction in the coordinate system origin. The axis direction is defined by the intersection point between the plane and the second path. If such point can't be constructed, an error message is output.

clip6117

By parameter/By offset. An expression entered in one of these boxes is evaluated to define the point on the second path that determines the axis direction. If a face is selected for defining the axis direction, then, in the general case, a point is identified on the face that this nearest to the coordinate system origin located on the path. The normal to the face's surface in this point determines the axis direction. The result will be best when the coordinate system origin lies in the surface. Therefore, use of a face for orienting the axes of the profile instance is recommended in the cases, when the first 3D Path lies on that face.

clip6118 clip6119

The thus constructed X- and Y-axes may not be orthogonal (if those are parallel, the system will output an error message). In this case, the Y-axis will be additionally reoriented to become orthogonal to the X-axis in the plane defined by the two axes. The Z-axis will be determined automatically.

If a path or face is specified for the X-axis and not for the Y-axis, then the Z-axis will be directed tangent to the path defining the position of the coordinates origin, while the Y-axis will be determined automatically. If the X and Z-axes are not orthogonal, then the X-axis is additionally reoriented in the way described above.

Let's consider the Parameters tab:

14ByParameters7

As shown in the diagram, the group of driven parameters now includes not only the parameter Number of Copy, but also the groups Position in Path, X axis direction, Y axis direction and Z axis direction. There are now additional parameters Parameter on Path and Offset by Path.

The group of driven parameters Position on Path allows reading the absolute coordinates of the current instance's coordinate system origin. The driven parameters from the groups X/Y/Z axis direction provide the coordinates of the instance's coordinate system axes. You can use the information about the position and orientation of the current profile instance in the space for defining relations with other model parameters.

The group of driving parameters includes Parameter on Path and Offset by Path. Parameter on Path and Offset by Path serve the same purpose – to define the point position on a path by various means. Therefore, you can't simultaneously define both the Parameter on Path, and Offset by Path. Parameter on Path varies in the range from 0 (at the start of the path) to 1 (at the end of the path); Offset by Path is measured in the model units and is equal to the length of the portion of the path from the start to the desired point.

Once you defined the Parameter on Path driving parameter, you can assign the driven parameter to the Offset by Path only, and vice versa.

Example 3

Let's review a parametric sweep creation using 3D paths on an example of the model of a drill bit's cutting tip.

14ByParameters4S

Create a new document using the template with workplanes. The next step is creation of the 3D profile. For this purpose, activate the workplane Top View and draw a contour as shown in the diagram.  For convenience, try to construct the profile in such a way, that its center is located at the global coordinate system origin. In this case, you do not have to construct the local coordinate system for tying instances of the profile to the 3D path during the operation creation.

clip6122

Next, we need to create two 3D paths for positioning the profile in the space when creating the parametric sweep. The path defining the profile position is a straight line coinciding with the axis of the bit. It can be created by two 3D nodes constructed on the axis of the bit. The length of this path defines the length of the cutting portion of the bit. The other path defines the profile orientation in space and is represented by a spiral line. The second path can be easily constructed using a cylindrical worksurface.

clip6123

In the valuable editor, create an independent variable for storing the value of the copy number. In this example, the created variable was named s.

After calling the operation creation command, select the 3D profile, the 3D path defining the profile position and the 3D path defining the direction of the X-axis. On the Common tab of the operation parameters dialog, define the number of copies equal to 101 (with the correction) and select the option By minimal distance for the two paths.

On the Parameters tab, select the variable s to assign the copy number. This is the only necessary driven parameter in this example.

Enter the expression in the driving parameter Parameter on Path input box, that will define the profile position along the path depending on the copy number. Remember that the Parameter on Path varies in the range from 0 to 1.

14ByParameters8