Clothoid 2 point curve script

 From:  Michael Gibson
5878.3 In reply to 5878.2 
Hi Brian, your screenshot above looks really cool, like some kind of elegant art deco plant!

re:
> but picking the two points in different views does not work properly.

Do you need the 2 points to be all on one single plane? Do you want it to behave like the Circle command where you can pick in 2 different views but the first pick establishes a kind of 'base point" and then the second pick will go on a plane parallel to the view that it's picked in but with the plane passing through the first pick?


If you want something like that check out GetCircle.js, it sets up that "make this point on a parallel plane to the view but going through the fist picked point" type of pick in the GetCircleRadius function, like this:

code:
	pointpicker.restrictToPlaneThroughPt( pointpicker.pt, false );
	pointpicker.stickToSurfacesMode = 'max';
	pointpicker.disableVerticalStraightSnap = true;


The "stick to surfaces" mode the first pick on a surface to use a plane aligned with the surface normal - that's why you can draw a circle onto the side of a box in the 3D view for example, or onto a sphere with the first pick defining the plane as being tangent to the sphere at that point.

The disable vertical straight snap part is to avoid getting a vertical tracking snap line coming off the sphere normal when doing the "on surface" type circle drawing.

- Michael