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:
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)
arc = cmp.definition.entities.curve
ctr = arc.center.transform(cmp.transformation)
rad = arc.radius
edg = sel.grep(Sketchup::Edge)
pol = ctr.project_to_line(edg.line)
vec = pol.vector_to(ctr);#
vec.length = ctr.distance(pol)-rad
#move edg to arc
#move arc to edg
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.
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.
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 …
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)
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: