Jump to content

How to set an even or smooth gradient on a nurbs curve


Recommended Posts

Easiest to explain this by providing an example of what I'm trying to do.

 

I've got two bridges, and I want to draw the wall of a viaduct that runs on a curve between them.

 

I know the path of the wall in plan, so I draw the NURBS curve, all on the X-Y plane:

 

715306613_ScreenShot2019-10-04at13_05_11.thumb.jpg.9eb7329866ecd9c629cbdac7984b1942.jpg

 

Then I use this NURBS curve as the path for an Extrude-along-path, to create the wall:

 

424076585_ScreenShot2019-10-04at13_01_48.thumb.jpg.49d5c992d99d15a122c807059686fb4c.jpg

 

That's fine except that the bridge on the left is at a higher level than the bridge on the right, so the base of the wall where it meets the bridge on the left is too low:

 

1445163768_ScreenShot2019-10-04at13_07_03.thumb.jpg.a459eb5e53868cf614b978cce55c9edb.jpg

 

I can fix this by editing that NURBS curve, and raising the Z value of some of its vertices towards that end:

 

513449104_ScreenShot2019-10-04at13_09_17.thumb.jpg.685dcd32bd1bf57c8183bd06a5da5777.jpg

 

And that in principle gives me what I want.

 

However - ideally what I want is a smooth gradient from one end of the curved wall to the other. That's not what I've got, as can be seen looking at the wall in orthogonal elevation:

 

431499513_ScreenShot2019-10-04at13_10_26.thumb.jpg.f9f7c5faf312cb302d01f6fb84b784cc.jpg

 

Obviously I can improve that, just by fiddling manually with the Z-values of each of the vertices of the path, but that's rather tedious and I'll only get it as good as I can manage by eye.

 

Is there some way to draw that NURBS curve, such that I can make it follow a constant gradient from one end to the other?

 

Edited by line-weight
Link to comment

Two ideas come to mind:

 

You could create it as a loft with three profiles: start finish and middle. You can use align distribute to get the middle centered truly between the start and end profiles. 

 

Or you could use sweep (assuming a constant radius and adjust the pitch value to get the rise. 

 

e. 

Link to comment
12 minutes ago, EAlexander said:

Two ideas come to mind:

 

You could create it as a loft with three profiles: start finish and middle. You can use align distribute to get the middle centered truly between the start and end profiles. 

 

Or you could use sweep (assuming a constant radius and adjust the pitch value to get the rise. 

 

e. 

 

Unfortunately it's not following a constant radius ... it's following a path that I will trace off a survey plan. So I don't think a sweep would work.

 

I don't think a loft would work either, for the same reason - the true line of the curve can't be interpolated just from 3 points.

Link to comment
14 minutes ago, markdd said:

Yes, I think so.

 

If you create a working plane that spans the two levels, then draw or edit your nurbs curve vertices using the working plane as your Z=0 reference.

 

Working Plane and Nurbs curve.vwx

 

That might give a near-enough-right result ... but wouldn't be geometrically correct in terms of a constant gradient along the path, because of the curve in plan (the gradient would be steeper in the middle than at each end). I think.

Link to comment
15 minutes ago, markdd said:

 

Thanks - but that has the same issue - the gradient of the curve is not constant, measured along the curve. To make the extreme example - I've drawn the large arc on the same working plane as your S-curve, but the top bit of that arc is not going to be on a downward gradient (in fact it will go slightly uphill at the start).

 

1852664434_ScreenShot2019-10-04at14_49_33.thumb.jpg.7e9a950cd3ad410c9aec8db463f22dda.jpg

Link to comment
17 minutes ago, zoomer said:

http://app-help.vectorworks.net/2019/eng/index.htm#t=VW2019_Guide%2FShapes2%2FCreating_a_Loft_Surface.htm%23XREF_15316_Creating_a_Loft
 

Bi-Rail Sweep.

Where 2 Lines at both ends define Wall heights and the Nurbs Curve

is used as „Profile“. And finally thicken that Surface, to get a 3D Wall.

 

Do you mean like this

(the lines highlighted in orange are the two 'rails', the wavy line is the profile)

When I try and perform a birail sweep, it will let me select the two lines but not the profile.

143601415_ScreenShot2019-10-04at14_59_22.thumb.jpg.8312dc829522efb6a9c4f6c1f892ab47.jpg

Link to comment

I think the Lines (everything) need to be converted to NURBS first ?

 

Yes, works for me.

- Created 2 Vertical Lines

- Modify > convert to Nurbs

- Created a horizontal Nurbs Curve

 

- Loft Object

Select

1. Line 1

2. Line 2

3. Curve

4. (I activated Solid Mode)

5. Accept

 

- Shell Object

 

860239578_Anmerkung2019-10-04184223.thumb.png.ebae6698a3b5b88e0744c470a71f82fd.png

 

Edited by zoomer
Link to comment

Ok. Got it to work after some fiddling.

 

Being fussy though - when I look at in orthogonal elevation, I can tell the gradient isn't constant because it actually goes upwards very briefly around the middle. In both of the variants below. Maybe this is something that would disappear if the NURBS curve had more control points?

 

860931618_ScreenShot2019-10-04at19_24_50.thumb.jpg.6cf4732e10addf79ff0b7f4f9c091ce0.jpg1314850734_ScreenShot2019-10-04at19_24_30.thumb.jpg.aa441186df49b064073110b8517d56c7.jpg

 

 

1928210733_ScreenShot2019-10-04at19_20_48.thumb.jpg.edd2c4236a3b41ef2ab758dccf8bf541.jpg1914876064_ScreenShot2019-10-04at19_20_01.thumb.jpg.e78dd4744c34117fb6b555b6b474339c.jpg

Link to comment

Hrm.

 

Here is what happens with a more complex curve. It's pretty clear it's not giving me a constant gradient. The top image is an elevational view.

 

*Edit - ignore this post! I messed up by accidentally not drawing my curve on one plane. Hence the bottom is not flat.

 

 

 

1730373214_ScreenShot2019-10-04at19_29_39.thumb.jpg.52fb268519b404c56af0dfa58d359c11.jpg346244322_ScreenShot2019-10-04at19_29_58.thumb.jpg.5c61d200b7a6b65ff90f42aa8d0aba67.jpg

Edited by line-weight
Link to comment

I had indeed more control points when painting something

NURBSy onto my Roof 🙂

 

But I wasn't aware that your Bridge bases have a slope.

Thought they had just different heights.

I think in that case, with that Tool usage, you would need

to adapt your Path in Z.

So I would do it with as few control points as possible.

 

Or in case it does not matter when the Wall extends into the terrain,

just start at the lowest level and add it to the Walls end height.

 

I have already thrown the test file away but AFAIK the top slope

looked pretty linear for me.

Link to comment

However: here I think is proof that the loft tool unfortunately can't do what I want.

 

The extruded squares are a duplicate array, so the distance between them is equal.

 

The NURBS curve that will become the 'profile curve' is drawn with control points on each of the bottom corners of the extrudes, as shown. So the distances between control points are equal.

 

The extrudes step down in height by an equal amount. So if the 'top slope' of my loft object is to have a constant gradient then it should be passing exactly through the top corner of each of the extrudes.

1950789005_ScreenShot2019-10-07at11_08_49.thumb.jpg.1384e0f68cb689b51b917ca1451b3e0a.jpg

 

But this is what happens:

 

921487177_ScreenShot2019-10-07at11_09_30.thumb.jpg.9f277f7b64bb19b4d9077bf67ce36014.jpg

 

There are actually two problems:

 

1. The gradient is not constant

2. The top line is not directly above the base line...in other words, if it is a wall then it is leaning over.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...