/// <summary> /// Fills this.result by union of g1 and g2. Rethrows exceptions if any. /// Signature fits ProgressBarExecutor.Exec requirements for visual callback. /// </summary> public void UniteGridsOperation(Hybmesh.DCallback cb) { try{ if (g1 == null || g2 == null) { throw new Exception( "Source grids have not been built yet"); } hm.AssignCallback(cb); result = Grid.Build(hm.UniteGrids1(g1.hm, g2.hm, props_unite.Buffer, false, props_unite.FixBoundary)); } finally { hm.ResetCallback(); } }
//constructor/destructor public Worker() { connection = require_connection(hybmesh_exec_path); callback = (string s1, string s2, double p1, double p2) => 0; }