Ring with python

Hello,

I am a beginner to python.

Can anybody explain to me what went wrong here?

I wanted to get a ring with 3-point arcs at every side of the profile.

scripting looks good for me, but not the surface of the ring. The outside surface is strange. The other 3 are good working.

why not the outside?

thx for help.

I found the mistake by try and error and it works fine now.

But now I would like to make a ring with several intersections which can be adjusted with a parametric profile which I have already build with python.

My question is: how do I get a plane- input for my python-module to put several of it on several positions on a circle?

you can do this for example with rs.CurvePerpFrame, I made a quick sample:

import rhinoscriptsyntax as rs
from Rhino.Geometry import *
import scriptcontext as sc

plane = Plane.WorldXY
radius = 30.0

curve = rs.AddCircle(plane, radius)
circle  = rs.coercecurve(curve)
domain = rs.CurveDomain(curve)
count = 12
params = Curve.DivideByCount(circle, count, True)
frames = [rs.CurvePerpFrame(curve, param) for param in params]

r = 1
curves = []
for frame in frames:
    circle = Circle(frame, r)
    curve = circle.ToNurbsCurve()
    curves.append(curve)
    r+=1
lofts = Brep.CreateFromLoft(curves, Point3d.Unset, Point3d.Unset, LoftType.Normal, False)

for loft in lofts:
    sc.doc.Objects.Add(loft)
    sc.doc.Views.Redraw()

many thx for your reply, but this is not really what I wanted.

I allready have curvesegments like this one:

But the “Plane”- input does not work. Iwould like to have this worked for that i can put several of these containers on several planes in grashopper.

The GS-file is like this;

you can get the curves with rs.GetObjets(), then if the curves have already the right center orientation, you can remap them with a Rhino.Geometry.Transform.PlaneToPlane() method from Plane.WorldXY to the curveframes

but will all curves be parametric after that, that every curve at every perp frame stays adjustable in every dimension?

Therefore I need the 5sliders for every 5 segments of the ring.

how do I get this input work?

as you can see at the picture,… it does not

Sorry, I missed that you were developing something inside grasshopper. So forget my rs.GetObjects remark

Sure. Just make your curves parametric and map those curves to the correct spot.
Ps: if you want me to see you’ve replied either use @ or reply to the message itself instead of to the complete thread.

How do I get my python-component work like the circle?

Solitaerschiene neu.gh (10.8 KB)

really nobody there who can help me with this?