Wrapping Images Around Whole or Partial Cylinders

© 2001 Winston Mitchell

Document Contents

Discussion
Definition of terms
Finding the values for the Materials Editor
Preparing the image
Notes
Revisions
CylindricalWrapping.pdf (50k)

Discussion

The method for wrapping an image to the surface of a cylinder is not obvious. It is even less intuitive if the cylinder is not complete. The solution is not difficult once the function of the x, y, and z values of "Centre Point", "Axis Direction", and "Origin" in the Wrapping Tab (cylindrical option) of the Materials Editor is understood. For users that are very familiar with 3D construction and fully understand the definitions given below, the definitions may be sufficient to solve the problem.

Definition of terms

Below are some definitions of terms and descriptions of what the Material Editor's values represent.

Center of Extents
This is the center of a three dimensional box the just encloses an object. For the purposes of this article, the box is always oriented to the object's coordinate system.
Distance from the center of extents
These x, y, and z values are always expressed using the object's coordinate system.
Scaling Around Axis
This number is the ratio of the image wrap angle to 360º expressed in percent. Only whole numbers are allowed.
Scaling Along Axis
This number is the same as the length of the object along its axis.
Centre Point
This the distance from the target object's center of extents to where it would be if the object were a complete cylinder. If the object is a complete cylinder, the values are necessarily 0, 0, 0.
Axis Direction
This is the direction of the target object's axis expressed relative to the object's coordinate system. Strictly speaking, the values are 0, 0, 1. Values of 0, 0, 0 also work. Substituting a value of -1 for the z value will rotate the placed image 180º about its center.
Origin
This is the distance from the object's center of extents to the lower-left corner of the placed image.
Top of page

Finding the values for the Materials Editor

The following step-by-step is one method for finding the values needed by the Materials Editor. Open the sample TurboCAD file (v6 or later) and apply these steps to it. The file is dimensioned with the correct values for the Materials Editor so that you can compare them with your results in steps 7, 8, 10 and the angle you measure in step 9. The dimensions and sample constructions are on the "Dim" layer. The method is general and will work for any cylinder (whole or partial) regardless of its orientation in a drawing. Be sure to write down the values you get in steps 7, 8, 9, and 10 so you can transfer them to the Materials Editor.

Note: If the object is a complete cylinder, omit steps 4 and 7 and use 0,0,0 for the "Centre Point".

  1. Enable the 3D Selector and set the Extents and Coordinate System Properties to "User CS".
    We do this so that measurements will be the same regardless of how the object is oriented relative to the World Coordinate System (WCS).
  2. Using "WorkPlane by Entity" click on the object.
    This aligns the User Coordinate System (UCS) to the object's coordinate system.
  3. Snap the origin of the workplane to a point on the "-z" end of the object. Look at the User CS indicator to determine which end this is.
    This places the UCS to the end of the object where the bottom of the image will be.
  4. If the object is a partial cylinder, V-snap a "Triple Point Circle" to it. Be sure that all three points lie on the arc of the cylinder.
    The center of this circle is where the center of the object would be if it were a complete cylinder.
  5. On the same end of the object, snap a "Cross" to the point in the circle where you want the lower-left corner of the image to be.
  6. Select the object and then click "UCS by Selector" in the Local Menu.
    This places the UCS at the center of extents of the object so that we can obtain our measurements relative to it.
  7. Select the circle and read the x and y values for "Centre Point" on the Inspector Bar (use the "Pos X" and "Pos Y" values). For the z value use 0.
  8. Select the cross and read the x, y, and z values for "Origin" on the Inspector Bar (use the "Pos" X, Y, and Z values).
  9. For complete cylinders with the image appearing once around the cylinder use 100 for "Scaling Around Axis". For partial cylinders, using the "Angle Measurement" tool (not the angular dimension tool), V-snap the cross, C-snap the circle, and then V-snap the other image corner that lies on the circle. Divide the result by 360 and multiply by 100. If the answer is not a whole number, use the next higher whole number for "Scaling Around Axis". (See Note 1.)
    A look at the sample drawing will help locate these points. The arithmetic is necessary because "Scaling around Axis" is expressed as a percent of a whole circle. We round up because only whole numbers are allowed. If you round down you will end up with a small slice of the left edge of the image at the right edge.
  10. Select the object, read the value "Size Z" on the Inspector Bar, and use this for "Scaling Along Axis". If not a whole number, round up.
Top of page

Preparing the image

Notes

  1. The angle measurement tool only measures to 180º. If partial cylinder is more than half a cylinder, subtract the measurement in step 9 from 360º before proceeding.
  2. If the image is to repeat around a complete cylinder (or partial cylinder), in step 9, divide 100 (or the measurement) by the number of repetitions and round up.
  3. If the image is to repeat along the axis, divide the value in step 10 by the number of repetitions and round up.
  4. If the image is compressed along the axis, you can increase the value of "Scale Along Axis". If you do, the top if the image will be cut-off. If you would rather cut off the bottom, you can slide the image along the object's axis by adjusting the "Origin" z value. Alternatively, you can use the "+z" end of the object in step 3 and the Upper-left corner in step 5.
  5. If the image is stretched along the axis, you can increase the wrap angle at the expense of cutting off the right edge of the image. If necessary, it is permissible to use wrap settings greater than 100. For partial cylinders, you can slide the image around the cylinder by moving the lower-left corner in step 5 to a point counter-clockwise (looking from "-z" to "+z") to center the image or cut off the left edge instead.

Revisions:

5/28/01
Original post
5/31/01
Total re-write (the original was awful)
6/2/01
Edited based on user comments (thanks Pjay!)
6/3/01
Minor edits and new sample drawing for clarity.
9/10/04
Added link in table of contents to a PDF version of this document

Valid XHTML 1.0! Top of page