private void AddView(string Name, TSD.Drawing MyDrawing, ArrayList Parts, TSG.CoordinateSystem coordinateSystem) { TSD.View MyView = new TSD.View(MyDrawing.GetSheet(), coordinateSystem, coordinateSystem, Parts); MyView.Name = Name; MyView.Insert(); }
private void AddRotatedView(string Name, TSD.Drawing MyDraiwng, ArrayList Parts, TSG.CoordinateSystem coordinateSystem) { TSG.CoordinateSystem displayCoordinateSystem = new TSG.CoordinateSystem(); TSG.Matrix RotationAroundX = TSG.MatrixFactory.Rotate(20.0 * Math.PI * 2.0 / 360.0, coordinateSystem.AxisX); TSG.Matrix RotationAroundZ = TSG.MatrixFactory.Rotate(30.0 * Math.PI * 2.0 / 360.0, coordinateSystem.AxisY); TSG.Matrix Rotation = RotationAroundX * RotationAroundZ; displayCoordinateSystem.AxisX = new TSG.Vector(Rotation.Transform(new TSG.Point(coordinateSystem.AxisX))); displayCoordinateSystem.AxisY = new TSG.Vector(Rotation.Transform(new TSG.Point(coordinateSystem.AxisY))); TSD.View FrontView = new TSD.View(MyDraiwng.GetSheet(), coordinateSystem, displayCoordinateSystem, Parts); FrontView.Name = Name; FrontView.Insert(); }
public static double getHighestScale(TSD.Drawing currentDrawing) { double highestScale = 0; TSD.DrawingObjectEnumerator ViewEnum = currentDrawing.GetSheet().GetViews(); while (ViewEnum.MoveNext()) { if (ViewEnum.Current is TSD.View) { TSD.View currentView = ViewEnum.Current as TSD.View; if (isView2D(currentView)) { double currentScale = currentView.Attributes.Scale; highestScale = Math.Max(currentScale, highestScale); } } } MainWindow._form.consoleOutput("EXPORT - Scale: " + highestScale.ToString(), "L2"); return(highestScale); }