Surface from Line Edge Feature

  • SurfFromLines()

Properties
  • Name: Allows the feature to be named; for example, "Hood"

Note that for this feature, you must first use AddSelect(agc.TypeEdge3d, edge) to add the Line Edges you want to use to the selection set prior to invoking the SurfFromLines() function. The required sequence is to preselect the lines, define the feature, and then do a Regen(). Naming it is optional.

Example
//Points
var PF1 = agb.FPoint(agc.FPointConstruction, agc.FPointCoordinateFile);
PF1.CoordinateFile = "E:\\Onyx81\\box8pt.txt";
agb.Regen(); //To insure model validity

//Bottom
var LF1 = agb.LinePt();
LF1.AddSegment(PF1.GetPoint(1, 1), PF1.GetPoint(1, 2));
LF1.AddSegment(PF1.GetPoint(1, 2), PF1.GetPoint(1, 3));
LF1.AddSegment(PF1.GetPoint(1, 3), PF1.GetPoint(1, 4), 1); //Note setting ID=1
LF1.AddSegment(PF1.GetPoint(1, 4), PF1.GetPoint(1, 1));
agb.Regen();

var LF2 = agb.LinePt();
//Note these also set IDs
LF2.AddSegment(PF1.GetPoint(1, 3), PF1.GetPoint(2, 1), 2);
LF2.AddSegment(PF1.GetPoint(2, 1), PF1.GetPoint(2, 2), 3);
LF2.AddSegment(PF1.GetPoint(2, 2), PF1.GetPoint(1, 4), 4);

var i;
var edge;
var numb1 = LF1.GetNumEdges();
if(numb1 == 4)
{
  agb.ClearSelections();
  for(i=1; i<5; i++)
  {
    edge = LF1.GetEdge(i);
    agb.AddSelect(agc.TypeEdge3d, edge);
  }
  var surf1 = agb.SurfFromLines();
  agb.regen();
}
//Now select using IDs
agb.ClearSelections();
agb.AddSelectEdgeID(1);
agb.AddSelectEdgeID(2);
agb.AddSelectEdgeID(3);
agb.AddSelectEdgeID(4);
var surf2 = agb.SurfFromLines();
agb.Regen();