Stream(ArrayList data, AnalyticalModel aModel) { data.Add(new Snoop.Data.ClassSeparator(typeof(AnalyticalModel))); try { data.Add(new Snoop.Data.Object("GetCurve", aModel.GetCurve())); } catch (System.Exception ex) { data.Add(new Snoop.Data.Exception("GetCurve", ex)); } data.Add(new Snoop.Data.Enumerable("GetCurves", aModel.GetCurves(AnalyticalCurveType.ActiveCurves))); try { data.Add(new Snoop.Data.Xyz("GetPoint", aModel.GetPoint())); } catch (System.Exception ex) { data.Add(new Snoop.Data.Exception("GetPoint", ex)); } data.Add(new Snoop.Data.Enumerable("GetAnalyticalModelSupports", aModel.GetAnalyticalModelSupports())); }
private void Stream(ArrayList data, AnalyticalModel aModel) { data.Add(new Snoop.Data.ClassSeparator(typeof(AnalyticalModel))); try { data.Add(new Snoop.Data.Object("GetCurve", aModel.GetCurve())); } catch (System.Exception ex){ data.Add(new Snoop.Data.Exception("GetCurve", ex)); } data.Add(new Snoop.Data.Enumerable("GetCurves", aModel.GetCurves(AnalyticalCurveType.ActiveCurves))); try { data.Add(new Snoop.Data.Xyz("GetPoint", aModel.GetPoint())); } catch (System.Exception ex){ data.Add(new Snoop.Data.Exception("GetPoint", ex)); } data.Add(new Snoop.Data.Enumerable("GetAnalyticalModelSupports", aModel.GetAnalyticalModelSupports())); data.Add(new Snoop.Data.Bool("CanApproximate", aModel.CanApproximate())); //data.Add(new Snoop.Data.Bool("CanDisable", aModel.CanDisable())); //data.Add(new Snoop.Data.Bool("CanDisableAutoDetect", aModel.CanDisableAutoDetect())); data.Add(new Snoop.Data.Bool("CanHaveRigidLinks", aModel.CanHaveRigidLinks())); //TF data.Add(new Snoop.Data.Bool("CanSetAnalyticalOffset", aModel.CanSetAnalyticalOffset())); data.Add(new Snoop.Data.Bool("CanUseHardPoints", aModel.CanUseHardPoints())); data.Add(new Snoop.Data.Enumerable("Analytical Model Supports", aModel.GetAnalyticalModelSupports())); data.Add(new Snoop.Data.Object("Analyze As", aModel.GetAnalyzeAs())); try { data.Add(new Snoop.Data.Xyz("Offset EndOrTop", aModel.GetOffset(AnalyticalElementSelector.EndOrTop))); } catch (System.Exception ex) { data.Add(new Snoop.Data.Exception("Offset EndOrTop", ex)); } try { data.Add(new Snoop.Data.Xyz("Offset StartOrBase", aModel.GetOffset(AnalyticalElementSelector.StartOrBase))); } catch (System.Exception ex) { data.Add(new Snoop.Data.Exception("Offset StartOrBase", ex)); } try { data.Add(new Snoop.Data.Xyz("Offset Whole", aModel.GetOffset(AnalyticalElementSelector.Whole))); } catch (System.Exception ex) { data.Add(new Snoop.Data.Exception("Offset Whole", ex)); } /* TF if (aModel.HasSweptProfile()) data.Add(new Snoop.Data.Object("Swept profile", aModel.GetSweptProfile())); else data.Add(new Snoop.Data.String("Swept profile", "No swept profile.")); */ if (aModel is AnalyticalModelSurface) Stream(data, (AnalyticalModelSurface)aModel); if (aModel is AnalyticalModelStick) Stream(data, (AnalyticalModelStick)aModel); }
Stream(ArrayList data, AnalyticalModel aModel) { data.Add(new Snoop.Data.ClassSeparator(typeof(AnalyticalModel))); try { data.Add(new Snoop.Data.Object("GetCurve", aModel.GetCurve())); } catch (System.Exception ex) { data.Add(new Snoop.Data.Exception("GetCurve", ex)); } data.Add(new Snoop.Data.Enumerable("GetCurves", aModel.GetCurves(AnalyticalCurveType.ActiveCurves))); try { data.Add(new Snoop.Data.Xyz("GetPoint", aModel.GetPoint())); } catch (System.Exception ex) { data.Add(new Snoop.Data.Exception("GetPoint", ex)); } data.Add(new Snoop.Data.Enumerable("GetAnalyticalModelSupports", aModel.GetAnalyticalModelSupports())); data.Add(new Snoop.Data.Bool("CanApproximate", aModel.CanApproximate())); //data.Add(new Snoop.Data.Bool("CanDisable", aModel.CanDisable())); //data.Add(new Snoop.Data.Bool("CanDisableAutoDetect", aModel.CanDisableAutoDetect())); data.Add(new Snoop.Data.Bool("CanHaveRigidLinks", aModel.CanHaveRigidLinks())); //TF data.Add(new Snoop.Data.Bool("CanSetAnalyticalOffset", aModel.CanSetAnalyticalOffset())); data.Add(new Snoop.Data.Bool("CanUseHardPoints", aModel.CanUseHardPoints())); data.Add(new Snoop.Data.Enumerable("Analytical Model Supports", aModel.GetAnalyticalModelSupports())); data.Add(new Snoop.Data.Object("Analyze As", aModel.GetAnalyzeAs())); try { data.Add(new Snoop.Data.Xyz("Offset EndOrTop", aModel.GetOffset(AnalyticalElementSelector.EndOrTop))); } catch (System.Exception ex) { data.Add(new Snoop.Data.Exception("Offset EndOrTop", ex)); } try { data.Add(new Snoop.Data.Xyz("Offset StartOrBase", aModel.GetOffset(AnalyticalElementSelector.StartOrBase))); } catch (System.Exception ex) { data.Add(new Snoop.Data.Exception("Offset StartOrBase", ex)); } try { data.Add(new Snoop.Data.Xyz("Offset Whole", aModel.GetOffset(AnalyticalElementSelector.Whole))); } catch (System.Exception ex) { data.Add(new Snoop.Data.Exception("Offset Whole", ex)); } /* TF * if (aModel.HasSweptProfile()) * data.Add(new Snoop.Data.Object("Swept profile", aModel.GetSweptProfile())); * else * data.Add(new Snoop.Data.String("Swept profile", "No swept profile.")); */ if (aModel is AnalyticalModelSurface) { Stream(data, (AnalyticalModelSurface)aModel); } if (aModel is AnalyticalModelStick) { Stream(data, (AnalyticalModelStick)aModel); } }
Stream(ArrayList data, AnalyticalModel aModel) { data.Add(new Snoop.Data.ClassSeparator(typeof(AnalyticalModel))); try { data.Add(new Snoop.Data.Object("GetCurve", aModel.GetCurve())); } catch (System.Exception ex){ data.Add(new Snoop.Data.Exception("GetCurve", ex)); } data.Add(new Snoop.Data.Enumerable("GetCurves", aModel.GetCurves(AnalyticalCurveType.ActiveCurves))); try { data.Add(new Snoop.Data.Xyz("GetPoint", aModel.GetPoint())); } catch (System.Exception ex){ data.Add(new Snoop.Data.Exception("GetPoint", ex)); } data.Add(new Snoop.Data.Enumerable("GetAnalyticalModelSupports", aModel.GetAnalyticalModelSupports())); }