A Time-Consuming Problem Feat. Aligning Components

Hi!
I’m not that new to SketchUp, but I’m new here, so… yeah.
Anyway I need a bit of your help because I don’t know how to make a component [which happens to be an arc] snap to a line that would act as if it was impenetrable. I know it’s hard to get it, but I would like A to snap to B just like in this glorious and very informative image:


It took me a lot of time to get this right. I suppose there has to be a better way to do it.
Thanks for all your support!

Since Sketchup Arcs are not true arcs but a series of segments, you will have to increase the number of segments to make it ‘appear’ that the Edge is snapped to the Arc. You can use this code to do that.

mod = Sketchup.active_model
ent = mod.active_entities
sel = mod.selection
cmp = sel.grep(Sketchup::ComponentInstance)[0]
arc = cmp.definition.entities[0].curve
ctr = arc.center.transform(cmp.transformation)
rad = arc.radius
edg = sel.grep(Sketchup::Edge)[0]
pol = ctr.project_to_line(edg.line)
vec = pol.vector_to(ctr);#
vec.length = ctr.distance(pol)-rad
#move edg to arc
#ent.transform_entities(Geom::Transformation.new(vec),edg)
#move arc to edg
cmp.transform! Geom::Transformation.new(vec.reverse)

A simple method I use is to draw an edge from the two adjacent vertices, and then use the tape measurement to create a guide:

2 Likes

Except that his line isn’t a line, it’s another arc.

Same method, few more steps:

It looks as if what you want is to have the tangent of the component arc snap to the tangent of the line arc. Is that right? That is quite tricky in SU because tangent snaps aren’t built in. You may find an extension like True Tangents would do it which is worth having if you’re likely to be doing this often. If not, you can do it natively, as has been demonstrated but it is quite long winded.

Well, for sure, True Tangents add a little more accuracy, but it is not less winded then the native methods. It could create more troubles down the road because off it’s accuracy (~radius, ~mm, etc)
SketchUp has tangent in its inference system, start an Arc at a line and it will give you that possibility. When you want to align two Arcs ‘Tangentally’ you wouldn’t even need the Tangent snap because of the segmented nature off the arcs…you can be more precise by choosing a higher number of segments in the entity info and ultimately be True, but is is dependant on the later use in the model, I guess.

Side note: all this could have been avoiden if we had true guide circles and true guide arcs. Just a good example why to have them in SketchUp. You can then build your geometry with accuracy “around” these guides and their intersections.

1 Like

We have them, built in in the Polygon(e) tool, sort of:

but we need them to stay a little longer

I should not show how this can be used to find tangents, I guess…

Not to be seen by SketchUp development

Well, irrespective of the number of segments for your polygon, the “guiding” polygon seems to be a 72 segmented polygon. In some cases it may help a bit, but isn’t any good for finding the “tangent to” location of an arc and a circle. Also it vanishes before you even know it. I want some guiding true circle that follows the mathematics of a circle (or arc) on the entire perimeter. One that doesn’t interfere with real geometry, except for intersections.

Alright. That’s a good idea. Where do I put the code, though?

Windows>Ruby Console.

Select the Edge and Arc. Copy and paste the code in the bottom panel of the Ruby Console and press Enter.

Thanks, Mitch.

As an old school draughtsman, I’m surprised that nobody has suggested how to go about constructing two circles which intersect at a known tangent point. I’m also a little puzzled that nobody has asked why you are trying to construct the geometry that you require, as the “why” may suggest a particular “how”.

Going back to your initial diagram, you have a circle, or arc (A), and assuming that you know where you want to create the second circle (B) such that they intersect at a known point, then simply do the following.

Create a guide from the centre of circle (A) to the desired intersection point (tangent point).

Next, offset circle (A) by the radius of the second circle (B) to create a new circle (C). Where circle (C) intersects with the guide is the centre point of circle (B).

If you want to get picky about it, you can re-draw the circles such that the “points” on the polygon (circle) meet at the intersection / tangent point.

One of these days, I’ll get round to learning how to create the nice little animations, but for now you’ll have to make do with an image … :grinning:

Untitled

You were both right and wrong. The content You provided me with is very valuable, but doesn’t solve the problem. I am not a professional 3D modeler, so it’s not that important for me, but if any of You would like to fiddle with it and show me the way, then here is the project. Either me, or SketchUp is stupid…skp (130.4 KB)

The OP talked about aligning two existing arcs, preasuming an intersection and then drawing tangent is somewhat different?

That’s right.

OP

You are making it difficult for yourself with the high segments count of the curves. Draw a circle with the correct radius near the curve, then move it along the axes(search for direction, then hold shift:


do half, then copy and flip it:

here is the file:

AlignStupidCircles.skp (442.6 KB)

1 Like

Thanks, Mike.

1 Like