[Request] Plugin needed- origin of radius
-
(Please place this post in the appropriate forum)
Maybe this already exists:
I am working on a fairly complex model. After using a popular bend plugin, I find myself needing to locate the center of the arc, which is now just a series of segments with no arc identity. Now, I am no scripter, but I have seen enough of the ruby syntax to make me hope that someone could make a ruby script that would mark the origin of the radius. One would select the segments, activate the ruby, which would perform the equivalent of determining the perpendicular bisectors of two chords on the would be arc, finding that intersection and placing a construction point and maybe a temporary construction line from the origin to some point on the arc.If something like this is already available, let me know. Thanks, mitcorb
-
Try this plugin...
@unknownuser said:
Right-click an arc (or circle) to insert a Guide Point at the arc's center.
EDIT: Oh, I didn't see this:
@unknownuser said:which is now just a series of segments with no arc identity
-
Would the script work if you used weld on it, first? or does weld turn the edges in to a Curve rather than an ArcCurve?
-
A curve might not be an arc - if it isn't then it will NOT have a centre-point. However...
If e.typename=="ArcCurve" then e.center returns the arc's centre-point...Why not use Jim's tool to add a guide point at the arc's centre BEFORE bending things - then you'll still have it when the arc's curve is 'broken-up' on bending...
-
Tig, that wouldnt work for an arc that's produced by bending things.
-
You have an arc that you are using to define the bend. You can find the centre of that arc and use that later ?
You don't have an 'arc' after the bending... -
I think we're talking about different bend plugins...Im thinking of fred06's and im guessing your talking about chris'?
-
It's possible to create a plugin that converts a curve into an Arc... Of course, you have to control if each edge has same median intersection... I'll give a try...
-
Hi, Guys:
Thanks for responding.
I actually used Fredo's bend tool on a tubular frame to make a piece of furniture. Now, there is so much geometry in there that it is difficult and tedious to navigate and make temporary geometry to locate the point of origin.
The webbing on the furniture is a repetitive component. If I could define the point of origin, I could do a rotate/copy array and make short work of this. Also, the "arc" is off the global axis, so would be more difficult to do a lot of setup to do the origin location, but if I did, I would want a method to specify a point in space x,y,z to reposition the temporary setup. I don't see a way to do this in SU. -
Matt:
Are you saying that each segment needs to be same length? And that the midpoints are the determinants, rather than the endpoints? Or does the circle inscribe tangent to the midpoints rather than circumscribe to the endpoints? -
To find the centre of the edge pieces of an ex-arc manually use the protractor-tool and place it on the mid-point of any full-segment, then draw a cline at 90 degrees. Repeat this on another full-segment and where the two clines intersect is the arc's centre-point - this method is quicker than bisecting the angles between two segments twice etc
The ex-arc's radius is the distance from this intersection centre-point to any full-segment's end/start, since an arc's segments are drawn inside what would be the 'pure' arc's curve...Now you can automate this manual process with a scripted version probably using vectors etc rather than clines, to place the cpoint [if needed] and return the radius etc - but remember that this method only works if the segments could make an arc [or circle which is a special arc of 360degrees] - a curve isn't enough as a bezier type of curve has no single centre, and any number of edges can be drawn end to end and made into a 'curve' - even in 3D...
-
Thanks, TIG:
But wouldn't this be dependent on the model being positioned orthogonally relative to the global axes? Or did I miss something? -
I've written about 80% of this script already. I was hoping to finish it last night (about 12 hours ago) and get it posted, but I didn't. Let me toy around with it for a little bit again today and I'll if I can get it done.
Chris
-
You can get the plane formed by three of the two segments' ends and from that gets its normal. Then you can use that normal as the axis about which to rotate the line vector around the segments' mid-points & find the intersection of these two line vectors - they are now rotated staying in the plane of the original arc which is where the centre-point will be located at their intersection...
-
ok, I think I got a working version of it up and running. See here:
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18963
Chris
Advertisement