Surface tangent to a cylinder

This is the closest thread i found:

Ill simplify this question to three curves:

Three curves created with minimal control points to generate smooth surfaces
The center curve is used to create a cylinder with HISTORY on so that adjusting the curve, adjusts the cylinder

2

WRONG

3

The two surfaces needed to intersect with the cylinder surface at a tangent.to the cylinder surface (ideally, with HISTORY such that changes to the cylinder location recalculate the surfaces resulting in tangency for each iteration (yeah right))

The location of the tangency on the cylinder is not uniform for either surface, along the length of the cylinder, and changes as all three curves are adjusted to achieve a pleasing shape after trimming is applied

hi there, its not fully clear what you are writing. you wish the surface hits the cylinder tangentially, but that can not work when you are seeking for it to connect with the center curve of the cylinder. or did you mean that the “2 surfaces” aside from the cylinder shall be tangential to each other but going through the center curve? if so that could be solved with history and a simple loft. otherwise i am not understanding the problem correct.

or do you want the resulting surface to wrap around the bottom of the pipe?

Apologies. Yes wrap around the surface of the cylinder. not the centerline.
Imagine a piece of cloth wrapping around the underside of the cylinder and pulled taught over the two outer curves. The cloth would leave the surface of the cylinder at a perfect tangent along the length of the cylinder.

Hello - Try making an approximate surface, very simple, then MatchSrf with CurveNearSurface=On and no curve selection, and History on. The surface edge will be pulled to the pipe and you can move the edge control points as you nee them to adjust the location - matching, with History, will update.
TangentToPipe.3dm (140.9 KB)

Linear in one direction
image
-Pascal

3 Likes

Hello Pascal. Thank you for your response. The second image is exactly what I am trying to achieve but I am not sure how you got there!

Couldyou perhaps break this down a little.

Make an approximate surface

With which tool? Loft, curve network, sweep two rails, using what intermediate curves? (your file has no curves)

then MatchSrf

(working on each surface one at a time I assume)

with CurveNearSurface=On and no curve selection

You lost me here )

Were is that option?
If I do not select an edge, the command fails…
can you go step by step pls.

you can move the edge control points as you nee them to adjust the location

Do you mean the surface edge control points, or the pipe conrol points, or the pipes underlying curve control points.
The goal is to move the pipe curve control points - this will adjust the pipe, which in turn would cause a recalculation of the two surfaces. That is a sttep requirement I know, but I ask in case it is possible.

Thank you for your participation here. I have read many of your responses in other threads. You significantly increase increase the value of Rhino.

Hello - the magic tool to make this work is not in V5 I’m afraid - that is the ‘CurveNearSurface=On/Off’ command line option. That is a V6 thing and it makes this sort of adjustable surface possible.

To answer your other question - make the surface any way that makes sense to you - lofting to an extracted isocurve in the pipe is a good way to start. Judging from your comments, I would make the surface linear “Straight Sections” in the lofting direction but of course that also depends on what needs to happen at the other edge of the surface. If you post an example, maybe we can sort out a workflow. But, you will need V6 for the process I outlined.

-Pascal

I accidentally linked to V5 docs apologies. I am not an experienced user, so please assume a level of detail equivalent to a bug report, where every step must be detailed line by line. In other words, if you could describe the process you used in more detail it would be easier to understand what you did. Here is what I get following your process from your initial surface:

Is this a problem of drawing or resolution or perhaps the units and tolerances settings. I dont know.

If I follow your suggestion and extract and isocurve then just join it with a straight curves to create an initial surface. When I apply MatchSrf I get this:


No matter what settings I use…
I tried using two curves to make an initial surface far from the pipe but that didnt help either.

Perhaps I should do a better job of asking questions:

  1. How does the intial surface influence the match tangency on the pipe? Do I have to use some splines to create the initial surface? How did you create your initial surface? loft?
  2. Could you please detail each step in your process, including what options you chose in this dialog to create your second image - that looks like it is correct. Which untrimmed edge to you select for the match? I assume the edge on the pipe
  3. Which viewport do you use for this operation? Does it matter
  4. “you can move the edge control points as you need them to adjust the location” what control points are you refering to?
    If you mean the newly created matchsrf surface control points, then how is accurate tangency achieved relative to the surface, not just locally to the pipe?
  5. please could you post the file for the second image with the final result

I am wondering if you did something like this:

7

and then moved each of the surface points by hand? (causing a rematch with tangency for each move)
If the pipe is rebuilt with 5 control points in U, then each recalculation of MatchSrf results in severe moves of the control point.

If there were some way to move all the control points proportionally that might work, but if you just move the control points at the intersection with the pipe. the rest of the surface will not be correct. Those other control points are still pointing toward the intersection made when the surface was created. Thats no good.

In that scenario, each time a surface edge control point is moved, the entire surface would need to be regenerated AND the MatchSrf tangency recalculated.

If I posed this as a question about achieving tangency as the result of two surfaces intersecting without the pipe inbetween, you would direct me to FilletSrf right? That algorithm correctly calculates tangency along both surfaces to arrive at a fillet that properly connects the two surfaces maintaining tangency. Should I frame this question like that, but with the pipe and a surface?

I tried creating lines tangent to the pipe surface that intersect with the curve we are trying to connect with the surface using the LINE: TANGENT FROM CURVE, but due to the curvature of hte pipe, there was no vieport that this could be accomplished from. I assume I would need to create a cplane for each location along the pipe. And then redo the entire process multiple times to iterate on the desired result.

Thank you again for giving this some thought )

OK, here goes - ready?

  • Loft two extracted isocurves that are in about the right places. For these curves, I used Rebuild at 6 points to simplify the surface that would be messy due to lofting incompatible curves.

  • A ‘normal’ style loft with two curves will get four rows of control points in the loft direction:

image

  • Tangency to the pipe will require two rows, so that is fine - two rows for each end. But to avoid the surface balooning out when made tangent to the small diameter pipe, we need to move the tangent row points closer to the edge:

The easiest way to do this in a controlled manner is to first make sure the control polygon is made pickable (not default, I believe) in Options:

then set DragMode to ‘ControlPolygon’. A double-click on the long-direction control polygon will select the row of points and with that drag mode active you can slide them up closer to the edge points at each end.

  • Turn on History and MatchSrf making sure to set CurveNearSuface=On:

    At this prompt to select a target curve or edge in this cse you want to skip it with an Enter and then select the pipe as the target surface.

MatchSrf settings like so:

Make sure History recording is on before you finish the MatchSrf You’ll see the points adjust themselves to pull the surface into tangency.

From here on you can select the edge row and slide it out a little and you’ll see them be sucked back to the surface a little way around the pipe and tangent row update accordingly:

You can move the points by row or pairs or individually to get the effect you want. Repeat at the other end. If you want to introduce a slight sag or curvature, when you are all done at each end, ChangeDegree to on the loft surface to 4 (currenty 3) and move that new middle row of points - MoveUVN is really handy to nudge points in the surface normal direction.

TangentToPipe2.3dm (484.8 KB)

-Pascal

2 Likes

Thank you for that. I am still digesting this technique to determine if the criteria I outlined are being met. I do not have sufficient experience to be able to be able to answer this.
I note that you changed the example problem from a curve with a different shape in all planes, to a duplicate pipe that is offset. I am not sure if this is to favor the tangent match such that it is consistent along the length of the pipe, or to illustrate the technique you used.

The pupose of connecting a dissimilar curve to a pipe is to challenge the tangent match to be calculated as a constant gradient along the length of the pipe, creating a secondary curve at the intersection that is also 3rd degree but NOT uniform.

Also, the resulting surface should not have convex/concave features. It is a “flat plate” of material, plywood for example, that would lie upon the curve and the pipe due to the force of gravity, as a developable surface ideally.

I got distracted in my quest to understand your example. As you hinted, this technique requires a sohpisticated understanding of the undelying pincipals of modeling in 3D. Your excellent response just triggered a landslide of questions I am still trying to answer.

I wonder if there is a “property” that can be assigned to a surface such that a “gravity” might make it behave in a way that more readily models the real world. This would be a subset of projection perhaps.

1 Like