Select multiple points and delete


#1

Hi, I’m automating tasks of a program created in NET to Rhino, in the program I have to select a curve and that curve a number of points to then delete them, I’ve been looking for information about it but I’m lost, Can you give me a helping hand ?

PS is not a plugin for rhino, but an external program made in c # NET

A greeting.


(Dale Fugier) #2

Hi David,

I am not quite I understand what you are asking to do. Tell if this sounds correct:

1.) You want to select a curve.
2.) You then want to turn on the curve’s control points (or edit points).
3.) You then want to select some of these points and delete them, thus modifying the curve.
4.) All this from outside of Rhino, via ActiveX automation.

Does this sound correct?

If you don’t mind me asking, why does this have to be done from outside of Rhino? What is it that you are really trying to accomplish?

Thanks!

  • Dale

#3

Hi Dale,

First, I want to apologize for my English, I’m Spanish and English never been my strong suit …

second, I’m putting together a program in visual studio for the automation of several tasks, among them is one that is:

  1. I import from Powershape to Rhino a number of curves that I have already made several tasks
  2. those curves soften …
  3. I select several points of these curves to delete …
  4. I do other tasks with the resulting curves …

by code I can access the curves and points, rescuing their values in “objects”, but can not find how to select points and delete blocks.

for example, I have a curve with 427 points and need clear, 60 points the last point up to 60 points the first point downward.

I am using visual studio, c #, and dll libraries Rhino4


#4
//Get Curve Points
object[] curvePoints = scriptRhino.CurvePoints(//The Select Object);
//Active Points
scriptRhino.Command("_PointsOn");

//Select The Points I Need

//Delete Points
scriptRhino.Command("_Delete");

scriptRhino.Command("_PointsOn");

that is the order that I need …