Hi I am currently switching from Python to C# and am getting a fairly simple error ‘Method must have a return type error’. I have added the ‘Curve’ return type after the access modifer, but is causing more issues. Apologies for the amateur question. Thanks.
Here is the code:
private void RunScript(Curve profile, Curve path, int num, ref object A)
OrientCurves oCrv = new OrientCurves();
A = oCrv;
// <Custom additional code>
Plane basePlane = new Plane(profile.GetBoundingBox(false).Center, Vector3d.ZAxis);
path.Domain = new Interval(0, 1);
List<Curve> orientedCrv = new List<Curve>();
List<Plane> perpFrames = new List<Plane>();
for (int i = 0; i < num; i++)
path.PerpendicularFrameAt((double) i / num, out plane);
Curve newCrv = profile.DuplicateCurve(); //why duplicate curve??
return orientedCrv; //this seems to be wrong
line 57 is so wrong. You initiate a class which you never created, you defining a method below so you need to call it like method. This is not so much different to Python actually, which indicates you may missing basic knowledge about coding. I would advice to actually walk through basics before actually trying to implement a concrete functionality.