FSUT Bezier Curves, Follow Me and Weld

UKworkshop.co.uk

Help Support UKworkshop.co.uk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

SketchUp Guru

Established Member
Joined
12 Apr 2005
Messages
3,152
Reaction score
1
Location
Rochester, MN USA
Alright. I took time off from the SU Project to do this episode of the Friday SketchUp Tips. I have to do this early because I'll be unavailable on Friday.

The first part of this has to do with drawing Bezier curves. This requires that you have a file called bezier.rb in your Plugins directory. If you don't see a Plugins menu when you have SU open, you also need to copy sketchup.rb from the Examples folder into the Plugins folder.

The tree view of your SketchUp directory should be something like this:

SketchUp
--Plugins
----Examples
------sketchup.rb

You want it to look like this:
SketchUp
--Plugins
----Examples
----bezier.rb
----sketchup.rb
----any other scripts you may have.rb

I hope that makes sense.

Click here: bezier.rb to get the script.

For the final part of this episode, you'll need weld.rb which is available via this link: weld.rb

Here's how to draw a Bezier curve. First, select the script from the Draw menu.

bezier0.jpg


Next, choose the "Degree". (Note the VCB) I don't understand the reason for that term but it indicates the number of "spaces" between editable points on the curve. You can also think of it as the number of points not including the first one. The default setting for this is 3. If you want more points simply type the desired number and press Enter.

I've set the Degree to 5, started the curve at the origin dragged off to make the opposite end which is the second point you'll locate. I haven't actually set that point yet.

bezier1.jpg


End points are set and I'm about to set point number three.
bezier3.jpg


More points set. The straight lines are shown between the points you've set. You'll note the points do not fall on the curve.

bezier4.jpg


After the last point is set the straight lines go away and you're left with the curve. Here I've turned on shadows. You can see that the curve is 3D and does not lie on a single plane. That's cool if it's what you want but if you are trying to draw the edge of a table top, this wouldn't be quite the thing.

bezier5.jpg


This time I start with a face to draw on. Make it large enough so that all the points will lie on it. You can always erase what you don't need later.

bezier8.jpg


Select the script from the menu. Set the Degree. Start clicking points.

bezier9.jpg


bezier10.jpg


bezier13.jpg


Push/Pull gives it some thickness.

bezier14.jpg


Next, I'm going to use Follw Me to add a profile to the curved edge. The first thing I do is use the Protractor tool to set a construction line that is 90° to the first segment in the curve. This is very important for Follow Me to work properly.

bezier15.jpg


Then I draw out a face and add the features for the profile. In this case a simple arc.

bezier17.jpg


Select the edge to be the path for Follow Me.

bezier19.jpg


Choose the Follow Me tool, click on the profile and...

bezier21.jpg


And from a different angle.

bezier22.jpg


Now, for fun I'm going to do an Offset on the bottom and pull down as if this was the top to a corner cabinet or something.

bezier23.jpg


Notice when I pull down the center area I have all these faces on the edge. This is because Follow Me breaks up curves into their individual line segments. The lines between them could be smoothed with Ctrl+Eraser tool but that could add a bunch of work.

bezier24.jpg


Instead we'll use the Weld script to join all those line segments. First we select the segments of the curve. I double clicked on the inside face which selected the face and its bounding edges. Then, while holding the Shift key I clicked on the face and the two straight line leaving only the curve selected.

bezier26.jpg


I select Weld from the Plugins menu.

bezier27.jpg


A message box comes up asking if I want the curve to be closed. In this case I say no. If I chose Yes it would draw a line from one end of the curve to the other.

bezier28.jpg


Another message box asks if you want it to find the face. I chose Yes. then I used Push/Pull again and you can see the result.

bezier30.jpg


And again from another angle.

bezier31.jpg
 
Dave,
I've been playing with bezier curves and weld without much success for a few days. Someone just turned the light on. I don't know what you do for a living but you should be a teacher. There's a lot of meat in this one, I'll be chewing for on it for quite a while getting it sussed. A great big "Thanks."
John McM
 
John, I'm glad this helped. I hope you don't end up finding a lot of gristle while you're chewing away.

I enjoy the teaching thing and do get to do some of that in my job although it has to do with anesthesia equipment and not SketchUp.
 
Hi Dave.

Excellent tutorials. I don't think you realise how much that you are helping people. Thank you very much. But.

I'm having probs with this bezier file. It doesn't want to play, it isn't in my "Plugins" drop down menu.

I got Weld all right.

Here's a pic of my SU file tree. Hope it's of some use.

SUfiletree.jpg
 
Gary, it is there. Twice. Problem is it is saved as bezier_rb.htm and bezier_rb.txt. Delete one of them and rename the other to bezier.rb and tell windows you mean to do that. Then open up SU again and look in the Draw menu.

Glad I'm of some use.
 
Dave

Another brilliant tutorial, :shock: keep them coming my brain is nearly in implode mode :wink: :wink:

Les
 
I havn't got this here bezier plug in? in fact the only plug ins i have are import export tools.
where would i get it from?

Mike
 
Good Surname or what ?":3tfi6uhh said:
Can you use Plugins and Ruby scripts with the free sketchup?

Yeah, sure. Take a look at the screenshot Gary posted. It shows what the tree view looks like and where the scripts go.

BTW, there are a very few scripts out there that won't work with Google SketchUp. Generally they are ones that have toolbars associated with them. Bezier and Weld do work fine however.
 
les chicken":1flz5c07 said:
Dave

Another brilliant tutorial, :shock: keep them coming my brain is nearly in implode mode :wink: :wink:

Les

Thank you. Please, though, go outside and get some fresh air. I'd hate to be responsible for your head imploding. think of all those hats that would fall down over your eyes! :shock:
 
Back
Top