Hi Dimitry,

> - how it is possible to make normal loop(like in  vbscript) then I
> have

For int i = 0 To N
 'loop content
Next

For Each thing As SomeType in AllThings
 'loop content
Next

All the different types of loops are listed in the MSDN helpfiles.
VB.NET has many types of loop, just like VBScript.



> - if I have the two parameters to check(two lines are intersected by a
> cylinder), can I write so

Have you tried it?

You could string together as many items as you want in an If clause. I
typically don't put more than 1 'complex' operation inside a single
If, but that's a personal preference.
Since you are already checking the length of the intersection point
lists, there's no need to check the return code of the functions. You
might as well write:

RhUtil.RhinoCurveBrepIntersect(CVR1, cyl, 0.001, overlaps1, points1)
RhUtil.RhinoCurveBrepIntersect(CVR2, cyl, 0.001, overlaps2, points2)

If (points1 Is Nothing) And (points2 Is Nothing) Then Continue For
If (points1.Count() = 0) And (points2.Count() = 0) Then Continue For

However, if you're collecting these points into a big list of points,
I wouldn't have used a Continue For statement at all. Rather, I'd
include the points only if they existed:

If (points1 IsNot Nothing) Then
  For Each pt As On3dPoint In points
    BigPointList.Add(pt)
  Next
End If


--
David Rutten
[email protected]
Robert McNeel & Associates


>  If (Not  RhUtil.RhinoCurveBrepIntersect(CVR1,  cyl, 0.001,
> overlaps1, points1)) and (Not  RhUtil.RhinoCurveBrepIntersect(CVR2,
> cyl, 0.001,
> overlaps2, points2)) Then Continue For
>  If (points.Count() = 0) and (points2.Count() = 0) Then Continue For
>
> Thank you and best regards!
> Dimitry

Reply via email to