I added only two components to what @Eef_Weenink had in his image but before @Tom_P or I could respond constructively, we BOTH had to independently reconstruct that code
Not cool at all to be so inconsiderate. How many others went through the same process as they considered a reply? Now multiply that by ten threads per day⊠It quickly adds up.
Thanks for your answers. Learned from @Tom_P and @Joseph_Oster that I could have better uploaded the *.gh file instead of image. Sorry for the inconvenience.
I have to study more the commands: Merge, Region Union and Ruled Surface, to understand what they do (âunder the hoodâ).
I will check âsunglassesâ, am using âbifocalsâ now. Guess simular function?
As I understand all your approaches, the (simplified) process is to:
first transform the circles + lines into a surface (and there are several ways for that).
then only keep the outer (poly)line
Correct?
I can work with this. But⊠(there is a last question):
Could I have avoided this process, by starting with two arcs + tangent lines; and make directly a polyline from that? I have no idea how I could find the connecting points
The Tangent Lines (Ex-ternal) has the geometry-math inside to find those 4 points.(start / endpoint of the lines).
Of course you can re-implement the math. mathworld.wolfram or wikipedia might offer starting points - but of course this effort is not necessary. And you still struggle the issue, how to find the right portion / side of the arc.
Region Union is similar to rhinos curveBoolean command and is curved based. Not surface based. The output surface from ruled srf is âcastedâ to a curve - by just duplicating its boarder. This implicit (âinvisibleâ) casting from one type to another is done in grasshopper all the time - this might decrease complexity / number of components, but in my opinion might not increase readability.
merge will allow you to define the precise order of data - instead of plugging multiple wires to one parameter.
Today I have been working on this last question: âCould I have solved this, by starting with two arcs + tangent lines; and make directly a polyline from that?â
And yes, I think I succeeded quite well, but can probably be better.
This is what I made:
I discoverd that external tangent lines along two arches are placed exactly as if it where circles. So they are placed when there is an arc with length=0 (so the arcs are not visible. but the tangent lines are where they should be.
I used the connecting points to create two new arcs with 3 points.
I used two of the tangent connecting points + the curve middle of the arc. (for this the arc must have a length > 0. (or it will give an error).
And merged all to a polyine .
rest a couple of minor questions:
is there a way to create the new arcs, other then the 3 points arc (so the length of the first arcs can be â0â. then these would be only virtual âplaceholdersâ.
I was not able to move the starting planes of the first arcs around, so if the arcs are on other orientations there might be errors
I could not find a way to force the arc to always go to the âouterâ line. Now when the arcs switch in from smaller to greater then the other, the new arc flips the wrong way.
Would be nice to get some suggestions on those issues. Regards, Eef
Arcs with zero angle are invisible. (And give an error, I should have set the second arc (left bottom) to angle>0 too)
That is why I create new arcs.
If only I was able to let the first arcs stop exactly at the connections points of the tangent lines, that would be best (functions like a constraint).
Please explain your reaction âWhy border?â.
I do border, because I need this polyline to create a parametric thing to be 3D-printed. And as long I, being a newbie, here, do not know better solutions, I do border (or ?)
I sure would like too (just for the learning. Probably have to go into the mathematics then, no idea). Untill then I will use you solution (what works very well)
PS: English is not my native language, so bother, border (sounds almost the same, and would be hard for me to explain the difference).
just for pure academic / intellectual fascinationâŠat the border of being bothered but staying on board (?? - not a native speaker, too)
2d at origin
ok let s reduce the problem:
2d / World XY-Plane
center of first Circle at 0,0
center of 2nd Circal at x0,0
to get a general solution without this limitations, transform the problem from a plane defined by the first circle with a x-Axis-rotation defined by the second centerâŠ
math
here are the equations for the external tangent points
import Rhino.Geometry as rg
crv = rg.Curve.CreateBooleanRegions(curves, plane, _bool, tolerance)
region = []
for i in range(crv.RegionCount):
for seg in crv.RegionCurves(i):
region.append(seg.DuplicateCurve())
I see two circles in the code that have the same radius? Which is not what I see on the inset image (green curve)? Then both circles and the two tangent lines are merged before entering the Python âblack boxâ⊠Set type hints on the inputs and âList Accessâ on the âCurvesâ inputâŠ
Would have been nice if you had posted code.
I guess this is doing a form of Region Union without the Ruled Surface, eh?
Would be nice if it derived âplaneâ from the circles.