static void Main(string[] args) { var geoRhino = GeoRhino.Load("example.georhino.txt"); Console.ReadLine(); }
public static GeoRhino Load(string path) { var geoRhino = new GeoRhino(); var reader = CaratReader.FromFile(path); while (!reader.EOF) { if (geoRhino.TryReadNdCoor(reader)) { continue; } if (geoRhino.TryReadCtrlPtsParDef(reader)) { continue; } if (geoRhino.TryReadNurbsPatch(reader)) { continue; } if (geoRhino.TryReadCtrlPtsNodes(reader)) { continue; } if (geoRhino.TryReadBrep(reader)) { continue; } if (geoRhino.TryReadNurbsPatchPar(reader)) { continue; } if (geoRhino.TryReadCtrlPtsPar(reader)) { continue; } if (geoRhino.TryReadGpPointGeo(reader)) { continue; } if (geoRhino.TryReadEvalPoint(reader)) { continue; } if (geoRhino.TryReadCoupPointGeo(reader)) { continue; } if (geoRhino.TryReadDeEleProp(reader)) { continue; } if (reader.Match("end")) { continue; } throw reader.NewUnexpectedTokenException(); } return(geoRhino); }