Curve entry by equation


#1

Is there a way to generate a path-curve by equation in SketchUp?


#2

You can try the U-V PolyGen plugin. While it’s intended to be used to create surfaces, you can use it to generate pretty much any curve from an equation. For example, if you wanted to plot a sine curve from -Pi to Pi, you would enter something like:

The result is a group of 100 edges:

The plugin can be downloaded from:

https://sites.google.com/site/spirixcode/code/uv_polygen.rb

The plugin iterates u and v values from the start and end given; the equations must be entered in Ruby math syntax as functions of u and v. The numbers work best if your model is in inches.


#3

Ideally, I would like to designate surface start and stop points and then have the curve drawn on that surface. I assume I would need to position the axis accordingly. Is the plugin you refer to capable of generating a surface curve with these constraints?


#4

Can you be a little more specific? I’m not really clear what you’re asking …


#5

I would like to be able to create a line-curve on a 3D SketchUp model to be used as path for the Follow-me tool. Then simply delete the path curve after execution of the Follow-me tool. The current curve tools can not draw the required curve, which can easily be created by equation.


#6

The plugin groups the edges that are created … if you explode the group, it should work with the follow-me tool. When you’re done, delete the curve.


#7

What is the curve? There are several plugins - like BezierSpline(join sketchucation to download - free), Draw Metal, and others. K tools will let you plot equations. There is also a basic bezier plugin in the Extension Warehouse.


#8

Here’s a typical curve y=abs(x^3)/400


#9

K tools should do it. Plugins > k tools > graphs. It should be a Cartesian graph, Too tire to play with it. Klaudius did update it for SU14. I haven’t tried it in SU15.


#10

I want to thank everyone for their input on this topic; I’ll investigate K-tools and PolyGen. It’s surprising that this is not an embedded function of SketchUp given its clear utility; perhaps they’ll add it in a future update.


#11

I doubt such a thing would be added. The developers will focus on the core function that benefits everyone. The purpose of having extensions is to tailor-fit the program to fit your need.


#12

Using U-V PolyGen:

The resultant curve was followed using a triangle:

SketchUp model (v8); curve.skp (63.2 KB)


#13

Thanks looks like U-V PolyGen will do the job.


#14

I’ve installed U-V PolyGen and K-Tools for experimentation. I want to again thank jimhami42 and catamountain for their time and informative responses.


#15

jinhami42,

There appears to be a problem with U-V PolyGen. When I load your model into SketchUp, although it displays, I get the following message:

This file is version:
8.0.16846

You will not be able to load this file in previous version of SketchUp if you save it in SketchUp 2015.

There appears to be a compatibility problem between U-V PolyGen and the version of SketchUp I’m using “SketchUp 2015”. What SketchUp version were you using?

Also if I input the equation (u**3).abs /400 with a space as shown between abs and / nothing is drawn; it only draws when I delete the space.


#16

jimhami42,
Disregarding the minor problems mentioned previously; your approach worked PERFECTLY!!!
I can’t thank you enough.


#17

I’ve been meaning to get around to upgrading to 2015 … this was a perfect opportunity to do so and see if the plugin would work as it should on the latest release. It seems to be happily copacetic. Glad to hear that it worked for you as well :smile:


#18

jimhami42,
I meant to mention one issue; positioning the curve-group. When I draw the curve on an empty grid, the curve is drawn at the axis’ origin. However, even though I’ve placed the axis-origin on a 3D object, where the curve is to be draw , the curve is generated at a seemingly arbitrary location on one of the planes of the object. How do I ensure the object is drawn at the axis-origin?


#19

Many tools ‘stubbornly’ neglect where you position your origin and axes (-orientation) and just keep using the systems origin and axes. Is this also the case with your tool/plugin?
See where the curve actually is drawn when you right click on one of your axes (in empty space) and select ‘Reset’ in the context menu. Does it happen to have used the ‘Reset’ axes and origin?

p.s. I don’t know your model, nor have I ever used the plugin mentioned here.


#20

As Wo3Dan pointed out, the plugin makes no attempt to use anything other than the “native” model axes definition. It also makes no attempt to determine what system of units you are using (it assumes inches). The companion plugin (Spirix) has the ability to use a separate axes group you create to arbitrarily locate and orient geometry, but this feature hasn’t yet made it into the U-V PolyGen code. Until that is added, you will need to construct your curves at the model origin and then move them to another location.