# Issue with creating a cylinder

Hey all, it was suggested that I x-post over here with this issue.

"Ok, so first post, forgive me if this is a little botched and in the wrong area.

So, I am attempting to create a cylinder in SU from measurements recorded in an excel spreadsheet.

My issue is that the datapoints that I have are measured from the center of the cylinder to the outside wall. When I try to plot these by using my measurements as the x axis, manually entering the z axis for height, and entering the radian from which it was taken as the y, they come out as individual lines on the grid, instead of arranged in a circle, and you know, cylinder-y

I know there’s probably a very easy way to do this, but for the life of me, I’m stuck.

Thank you!"

Thanks all!

There are two cylinder examples. Both by the SketchUp Team.
A simple one in “Examples” and a parametric one in “3D Shapes”.
Install from the Extension Warehouse, or just download the RBZ archives somewhere, rename to ZIP and open with your favorite archive utility.

A cylinder is normally defined by a center point, two concentric circles (radii), erasing the center face, then pushpulling the ring face a certain length (which might be negative.) So only 4 objects. An array of 3 floats, and 3 length floats. (Call it 6 numerics if you will.)

It sounds as if the datapoints from your spreadsheet are the same as the radius of the cylinder. If that’s so, then you can draw the cylinder directly, using SetchUp’s Circle and Push/Pull tools. Center the Circle tool on the origin, where the three axis lines meet; this is mainly for convenience. Set the radius of the circle according to your datapoints; you can do this by clicking the tool’s cursor once on the origin, then beginning to drag the cursor along the red or green axis line. Type the length of the radius and press Enter. SketchUp will snap the radius to that dimension. Use the Push/Pull tool to extend the circle to the proper height. Again, click once with the tool anywhere inside the circle and begin dragging the cursor up along the blue axis line. Type the value you want and press Enter. There’s your cylinder. It will take you less time to follow these directions than it took me to type them.
Hope this helps.
dh

Well, hm, maybe i should be a little more specific.

The measurements of the cylinder were taken with extremely sensitive micrometers. There are 80,000 individual measurements.

SketchUp has an internal tolerance of 0.001". Anything closer than that will be merged into Coincident points.

post 10 lines of what you have and what they mean…

john

I hate to sound like a Luddite, but shouldn’t two measurements–diameter and height–suffice? Can’t multiple measurements of the diameter be averaged? What am I missing?

Think 3 dimensionally. As @DanRathbun mentioned, what about center face position? Also, what about orientation? Take the image below:

They are all the same diameter and height. Which one is yours?

80000 data points? I take it this is an organic shape similar to a cylinder? I think folks are confused because an ideal cylinder has relitivly few measurements. This sounds more like very subtle surface mapping, what exactly is this “cylinder”?

Which one is mine? The one centered on the origin. I’d create that one, make it a component, then copy, and move the others into their positions. Or, you could say all the cylinders are mine.

Subtle surface mapping is EXACTLY what this is.

Unfortunately, i cannot say precisely what I am mapping. Let’s call it flower pots for now as a placeholder.

Its nothing sketchy, just something that has never been attempted in my industry.

Hope you understand.

Do you have some minimal example of data and what you are currently doing? Sounds like you are looking for a very specific solution - in which it’s hard to give a specific answer.

[quote=“MostlyHarmless, post:1, topic:49121”]…the datapoints that I have are measured from the center of the cylinder to the outside wall. When I try to plot these by using my measurements as the x axis, manually entering the z axis for height, and entering the radian from which it was taken as the y, they come out as individual lines on the grid, instead of arranged in a circle, and you know, cylinder-y…
[/quote] So, you have a set of values for each Z value which approximate to a circle.
Each value has a ‘radius’ dimension [that is NOT a X value] and an ‘angle’ in radians [that is NOT a Y value]
All of the radius/angle pairs relate to a common ‘center’ - let’s assume it’s [0,0,z]
To find the X and Y values corresponding to a pair you need to do some calculating - think of a ‘vector’.
I’d use something to make a vector along the X axis and then rotate the vector by the angle and then clone the center along the vector…
Iterating each radius/angle pair and their Z value…

``````vector = center.offset(X_AXIS, radius)
tran = Geom::Transformation.rotation(center, Z_AXIS, angle)
vector.transform!(tran)
point = center.clone.offset(vector)
``````

The ‘point’ is now set correctly at [x,y,z] for that radius/angle pair and its Z.
You then need to do something with that collection of points - perhaps saved as an array of points per Z.
e.g. add a cpoint at each one, or if the angles are consistently made at each Z you can form a triangular face using
points[0][0], points[0][1], points[1][0]
for the up tri, and for the matching down tri
points[1][0], points[1][1], points[0][1]
It just needs some careful collecting and iterations

The OP mentioned “outer wall” which made me think it was a pipe-like object, which would need 2 radii (2 floats), a center position, since they said nothing of creating a component (an array of 3 floats), and the object’s height (1 float.)

However, it seems as though the OP is importing point cloud data as a mesh, rather than attempting to create a SketchUp geometric object.

Extension Warehouse: Point Cloud Importers

The OP also mentioned “extremely sensitive micrometers”, which may indicate that SketchUp might not even be the appropriate application for dealing with such precise data.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.