algorithmic modeling for Rhino
Hello
I am learning VB, and I have a small problem In the "primer" manual page 111 :
new_line.rotate(angle, OnUtil.On_zaxis,Line_From)
the rotate function is called, but I have an error that this function does not exist
And I have an error also for "OnUtil.On_zaxis" :
'rotate' is not a member of 'rhino.geometry.line'
'Onutil is not declared'
Do you know where the problem comes from?
Tags:
No problem,
one thing useful is to put the RhinoCommon on the PC so no need to have internet. I put the rhinocommon.chm on my desktop/bureau of Windows. => upload next file
http://developer.rhino3d.com/api/RhinoCommonWin/RhinoCommon.chm
https://discourse.mcneel.com/t/rhino-common-pdf-documentation/36940
Thank you, it will help me !!
And do you know if there is the same thing for the general functions (except rhino) like list functions etc.
Hello,
How can I declare a global variable in the "runscript" that I can have in the functions without having to set them in parameter?
public double startX(Curve c, int tol)
{return Math.Round(c.PointAtStart.X, tol);
}
and I would like :
public double startX(Curve c)
{return Math.Round(c.PointAtStart.X, tol);
}
You can do that
private void RunScript(double x, object y, ref object A)
{
A = function(x);
}
// <Custom additional code>
double tol= 0.2;
public double function(double x)
{
return tol* x;
}
// </Custom additional code>
}
It works because it is inside a class, here Script_Instance : GH_ScriptInstance
For the tolerance you can use
double tol = RhinoDoc.ActiveDoc.ModelAbsoluteTolerance
RhinoDoc.ActiveDoc.ModelAngleToleranceRadians ...
thank you
I managed otherwise by writing: (in Custom additional code).
I could not find the syntax
private int tolerance;
private List <Curve> ATemp;
Do you know how to explode a curve or a polyline (for the c#)? (As the component explode of grasshopper )
I have been searching and I can't find
Use the seach in the chm file, or use CTRL+F in methods of Curve class and seek for explode
It must work for a type of curve,
PolyCurve. Explode Method |
Rhino 5 for Windows
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.30000.17 (5.13.60913.21340)
Curve. DuplicateSegments Method |
Thank you !!
I had seen this function but how to convert curves into polycurve? I did not get there
You don't really convert, you have to test the type of the curve
see that :
http://www.grasshopper3d.com/forum/topics/explode-closed-planar-cur...
It works !!
I now understand better !
Thank you !!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by