Improved should flip decision.
This commit is contained in:
188
ExportDXF/Forms/MainForm.Designer.cs
generated
188
ExportDXF/Forms/MainForm.Designer.cs
generated
@@ -28,110 +28,95 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||||
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||||
this.button2 = new System.Windows.Forms.Button();
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
this.button1 = new System.Windows.Forms.Button();
|
this.SuspendLayout();
|
||||||
this.SuspendLayout();
|
//
|
||||||
//
|
// textBox1
|
||||||
// textBox1
|
//
|
||||||
//
|
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.textBox1.BackColor = System.Drawing.Color.White;
|
this.textBox1.BackColor = System.Drawing.Color.White;
|
||||||
this.textBox1.Location = new System.Drawing.Point(130, 17);
|
this.textBox1.Location = new System.Drawing.Point(130, 13);
|
||||||
this.textBox1.Name = "textBox1";
|
this.textBox1.Name = "textBox1";
|
||||||
this.textBox1.ReadOnly = true;
|
this.textBox1.ReadOnly = true;
|
||||||
this.textBox1.Size = new System.Drawing.Size(348, 25);
|
this.textBox1.Size = new System.Drawing.Size(400, 25);
|
||||||
this.textBox1.TabIndex = 2;
|
this.textBox1.TabIndex = 2;
|
||||||
//
|
//
|
||||||
// richTextBox1
|
// richTextBox1
|
||||||
//
|
//
|
||||||
this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.richTextBox1.BackColor = System.Drawing.Color.White;
|
this.richTextBox1.BackColor = System.Drawing.Color.White;
|
||||||
this.richTextBox1.Location = new System.Drawing.Point(12, 83);
|
this.richTextBox1.Location = new System.Drawing.Point(12, 76);
|
||||||
this.richTextBox1.Name = "richTextBox1";
|
this.richTextBox1.Name = "richTextBox1";
|
||||||
this.richTextBox1.ReadOnly = true;
|
this.richTextBox1.ReadOnly = true;
|
||||||
this.richTextBox1.Size = new System.Drawing.Size(570, 259);
|
this.richTextBox1.Size = new System.Drawing.Size(570, 266);
|
||||||
this.richTextBox1.TabIndex = 3;
|
this.richTextBox1.TabIndex = 3;
|
||||||
this.richTextBox1.Text = "";
|
this.richTextBox1.Text = "";
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.label1.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(12, 20);
|
this.label1.Location = new System.Drawing.Point(12, 16);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(112, 17);
|
this.label1.Size = new System.Drawing.Size(112, 17);
|
||||||
this.label1.TabIndex = 4;
|
this.label1.TabIndex = 4;
|
||||||
this.label1.Text = "Active Document :";
|
this.label1.Text = "Active Document :";
|
||||||
//
|
//
|
||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
this.label2.AutoSize = true;
|
this.label2.AutoSize = true;
|
||||||
this.label2.Location = new System.Drawing.Point(23, 51);
|
this.label2.Location = new System.Drawing.Point(23, 47);
|
||||||
this.label2.Name = "label2";
|
this.label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(101, 17);
|
this.label2.Size = new System.Drawing.Size(101, 17);
|
||||||
this.label2.TabIndex = 4;
|
this.label2.TabIndex = 4;
|
||||||
this.label2.Text = "Prefix files with :";
|
this.label2.Text = "Prefix files with :";
|
||||||
//
|
//
|
||||||
// textBox2
|
// textBox2
|
||||||
//
|
//
|
||||||
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.textBox2.Location = new System.Drawing.Point(130, 48);
|
this.textBox2.Location = new System.Drawing.Point(130, 44);
|
||||||
this.textBox2.Name = "textBox2";
|
this.textBox2.Name = "textBox2";
|
||||||
this.textBox2.Size = new System.Drawing.Size(348, 25);
|
this.textBox2.Size = new System.Drawing.Size(400, 25);
|
||||||
this.textBox2.TabIndex = 2;
|
this.textBox2.TabIndex = 2;
|
||||||
//
|
//
|
||||||
// button2
|
// button1
|
||||||
//
|
//
|
||||||
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.button2.Image = global::ExportDXF.Properties.Resources.edit_alt;
|
this.button1.Image = global::ExportDXF.Properties.Resources.play;
|
||||||
this.button2.Location = new System.Drawing.Point(536, 13);
|
this.button1.Location = new System.Drawing.Point(536, 13);
|
||||||
this.button2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
this.button1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.button2.Name = "button2";
|
this.button1.Name = "button1";
|
||||||
this.button2.Size = new System.Drawing.Size(46, 60);
|
this.button1.Size = new System.Drawing.Size(46, 56);
|
||||||
this.button2.TabIndex = 0;
|
this.button1.TabIndex = 0;
|
||||||
this.button2.UseVisualStyleBackColor = true;
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
this.button2.Visible = false;
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
//
|
||||||
//
|
// MainForm
|
||||||
// button1
|
//
|
||||||
//
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.button1.Image = global::ExportDXF.Properties.Resources.play;
|
this.ClientSize = new System.Drawing.Size(594, 354);
|
||||||
this.button1.Location = new System.Drawing.Point(484, 13);
|
this.Controls.Add(this.label2);
|
||||||
this.button1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
this.Controls.Add(this.label1);
|
||||||
this.button1.Name = "button1";
|
this.Controls.Add(this.richTextBox1);
|
||||||
this.button1.Size = new System.Drawing.Size(46, 60);
|
this.Controls.Add(this.textBox2);
|
||||||
this.button1.TabIndex = 0;
|
this.Controls.Add(this.textBox1);
|
||||||
this.button1.UseVisualStyleBackColor = true;
|
this.Controls.Add(this.button1);
|
||||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
this.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
//
|
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
// MainForm
|
this.MaximizeBox = false;
|
||||||
//
|
this.Name = "MainForm";
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
this.Text = "ExportDXF";
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.ResumeLayout(false);
|
||||||
this.ClientSize = new System.Drawing.Size(594, 354);
|
this.PerformLayout();
|
||||||
this.Controls.Add(this.label2);
|
|
||||||
this.Controls.Add(this.label1);
|
|
||||||
this.Controls.Add(this.richTextBox1);
|
|
||||||
this.Controls.Add(this.textBox2);
|
|
||||||
this.Controls.Add(this.textBox1);
|
|
||||||
this.Controls.Add(this.button2);
|
|
||||||
this.Controls.Add(this.button1);
|
|
||||||
this.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
||||||
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
|
||||||
this.MaximizeBox = false;
|
|
||||||
this.Name = "MainForm";
|
|
||||||
this.Text = "ExportDXF";
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +128,6 @@
|
|||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.Label label1;
|
||||||
private System.Windows.Forms.Label label2;
|
private System.Windows.Forms.Label label2;
|
||||||
private System.Windows.Forms.TextBox textBox2;
|
private System.Windows.Forms.TextBox textBox2;
|
||||||
private System.Windows.Forms.Button button2;
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using System.Drawing;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
@@ -319,7 +320,6 @@ namespace ExportDXF.Forms
|
|||||||
var modelName = Path.GetFileNameWithoutExtension(partModel.GetPathName());
|
var modelName = Path.GetFileNameWithoutExtension(partModel.GetPathName());
|
||||||
sheet.SetName(modelName);
|
sheet.SetName(modelName);
|
||||||
|
|
||||||
|
|
||||||
Print(partModel.GetTitle() + " - Creating flat pattern.");
|
Print(partModel.GetTitle() + " - Creating flat pattern.");
|
||||||
SolidWorks.Interop.sldworks.View view;
|
SolidWorks.Interop.sldworks.View view;
|
||||||
view = templateDrawing.CreateFlatPatternViewFromModelView3(partModel.GetPathName(), partConfiguration, 0, 0, 0, false, false);
|
view = templateDrawing.CreateFlatPatternViewFromModelView3(partModel.GetPathName(), partConfiguration, 0, 0, 0, false, false);
|
||||||
@@ -660,30 +660,147 @@ namespace ExportDXF.Forms
|
|||||||
public bool ShouldFlip(SolidWorks.Interop.sldworks.View view)
|
public bool ShouldFlip(SolidWorks.Interop.sldworks.View view)
|
||||||
{
|
{
|
||||||
var orientation = GetOrientation(view);
|
var orientation = GetOrientation(view);
|
||||||
|
var bounds = GetBounds(view);
|
||||||
|
var bends = GetBends(view);
|
||||||
|
|
||||||
Note note;
|
var up = bends.Where(b => b.Direction == BendDirection.Up).ToList();
|
||||||
|
var down = bends.Where(b => b.Direction == BendDirection.Down).ToList();
|
||||||
|
|
||||||
switch (orientation)
|
if (down.Count == 0)
|
||||||
{
|
return false;
|
||||||
case BendOrientation.Horizontal:
|
|
||||||
note = GetBottomMostNote(view);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BendOrientation.Vertical:
|
if (up.Count == 0)
|
||||||
note = GetLeftMostNote(view);
|
return true;
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
if (down.Count == up.Count)
|
||||||
return false;
|
{
|
||||||
}
|
var hBends = bends.Where(b => GetAngleOrientation(b.ParallelBendAngle) == BendOrientation.Horizontal).ToList();
|
||||||
|
var vBends = bends.Where(b => GetAngleOrientation(b.ParallelBendAngle) == BendOrientation.Vertical).ToList();
|
||||||
|
|
||||||
var bendDir = GetBendDirection(note);
|
if (hBends.Count == vBends.Count)
|
||||||
var shouldFlip = bendDir == BendDirection.Down;
|
{
|
||||||
|
var r1 = bounds.Width / hBends.Count;
|
||||||
|
var r2 = bounds.Height / vBends.Count;
|
||||||
|
|
||||||
return shouldFlip;
|
return r2 > r1;
|
||||||
|
}
|
||||||
|
else if (hBends.Count > vBends.Count)
|
||||||
|
{
|
||||||
|
var x = SmallestYCoordinate(hBends);
|
||||||
|
return x.Direction == BendDirection.Down;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var x = SmallestXCoordinate(vBends);
|
||||||
|
return x.Direction == BendDirection.Down;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return down.Count > up.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BendDirection GetBendDirection(Note note)
|
private static Bounds GetBounds(SolidWorks.Interop.sldworks.View view)
|
||||||
|
{
|
||||||
|
var outline = view.GetOutline() as double[];
|
||||||
|
|
||||||
|
var minX = outline[0] / 0.0254;
|
||||||
|
var minY = outline[1] / 0.0254;
|
||||||
|
var maxX = outline[2] / 0.0254;
|
||||||
|
var maxY = outline[3] / 0.0254;
|
||||||
|
|
||||||
|
var width = Math.Abs(minX) + Math.Abs(maxX);
|
||||||
|
var height = Math.Abs(minY) + Math.Abs(maxY);
|
||||||
|
|
||||||
|
return new Bounds
|
||||||
|
{
|
||||||
|
X = minX,
|
||||||
|
Y = minY,
|
||||||
|
Width = width,
|
||||||
|
Height = height
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Bend ClosestToBounds(Bounds bounds, IList<Bend> bends)
|
||||||
|
{
|
||||||
|
var hBends = bends.Where(b => GetAngleOrientation(b.ParallelBendAngle) == BendOrientation.Horizontal).ToList();
|
||||||
|
var vBends = bends.Where(b => GetAngleOrientation(b.ParallelBendAngle) == BendOrientation.Vertical).ToList();
|
||||||
|
|
||||||
|
Bend minHBend = null;
|
||||||
|
double minHBendDist = double.MaxValue;
|
||||||
|
|
||||||
|
foreach (var bend in hBends)
|
||||||
|
{
|
||||||
|
double distFromLft = Math.Abs(bend.X - bounds.Left);
|
||||||
|
double distFromRgt = Math.Abs(bounds.Right - bend.X);
|
||||||
|
|
||||||
|
double minDist = Math.Min(distFromLft, distFromRgt);
|
||||||
|
|
||||||
|
if (minDist < minHBendDist)
|
||||||
|
{
|
||||||
|
minHBendDist = minDist;
|
||||||
|
minHBend = bend;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Bend minVBend = null;
|
||||||
|
double minVBendDist = double.MaxValue;
|
||||||
|
|
||||||
|
foreach (var bend in hBends)
|
||||||
|
{
|
||||||
|
double distFromBtm = Math.Abs(bend.Y - bounds.Bottom);
|
||||||
|
double distFromTop = Math.Abs(bounds.Top - bend.Y);
|
||||||
|
|
||||||
|
double minDist = Math.Min(distFromBtm, distFromTop);
|
||||||
|
|
||||||
|
if (minDist < minHBendDist)
|
||||||
|
{
|
||||||
|
minVBendDist = minDist;
|
||||||
|
minVBend = bend;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return minVBendDist < minHBendDist ? minVBend : minHBend;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Bend SmallestYCoordinate(IList<Bend> bends)
|
||||||
|
{
|
||||||
|
double dist = double.MaxValue;
|
||||||
|
int index = -1;
|
||||||
|
|
||||||
|
for (int i = 0; i < bends.Count; i++)
|
||||||
|
{
|
||||||
|
var bend = bends[i];
|
||||||
|
|
||||||
|
if (bend.Y < dist)
|
||||||
|
{
|
||||||
|
dist = bend.Y;
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return index == -1 ? null : bends[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Bend SmallestXCoordinate(IList<Bend> bends)
|
||||||
|
{
|
||||||
|
double dist = double.MaxValue;
|
||||||
|
int index = -1;
|
||||||
|
|
||||||
|
for (int i = 0; i < bends.Count; i++)
|
||||||
|
{
|
||||||
|
var bend = bends[i];
|
||||||
|
|
||||||
|
if (bend.X < dist)
|
||||||
|
{
|
||||||
|
dist = bend.Y;
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return index == -1 ? null : bends[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
private static BendDirection GetBendDirection(Note note)
|
||||||
{
|
{
|
||||||
var txt = note.GetText();
|
var txt = note.GetText();
|
||||||
|
|
||||||
@@ -744,7 +861,7 @@ namespace ExportDXF.Forms
|
|||||||
var angles = new List<double>();
|
var angles = new List<double>();
|
||||||
var notes = GetBendNotes(view);
|
var notes = GetBendNotes(view);
|
||||||
|
|
||||||
foreach (var note in notes)
|
foreach (var note in notes)
|
||||||
{
|
{
|
||||||
var angle = RadiansToDegrees(note.Angle);
|
var angle = RadiansToDegrees(note.Angle);
|
||||||
angles.Add(angle);
|
angles.Add(angle);
|
||||||
@@ -753,10 +870,50 @@ namespace ExportDXF.Forms
|
|||||||
return angles;
|
return angles;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BendOrientation GetOrientation(SolidWorks.Interop.sldworks.View view)
|
private static List<Bend> GetBends(SolidWorks.Interop.sldworks.View view)
|
||||||
|
{
|
||||||
|
var bends = new List<Bend>();
|
||||||
|
var notes = GetBendNotes(view);
|
||||||
|
|
||||||
|
const string pattern = @"(?<DIRECTION>(UP|DOWN))\s*(?<ANGLE>(\d+))°";
|
||||||
|
|
||||||
|
foreach (var note in notes)
|
||||||
|
{
|
||||||
|
var pos = note.GetTextPoint2() as double[];
|
||||||
|
|
||||||
|
var x = pos[0] / 0.0254;
|
||||||
|
var y = pos[1] / 0.0254;
|
||||||
|
|
||||||
|
var text = note.GetText();
|
||||||
|
var match = Regex.Match(text, pattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (!match.Success)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var angle = double.Parse(match.Groups["ANGLE"].Value);
|
||||||
|
var direection = match.Groups["DIRECTION"].Value;
|
||||||
|
|
||||||
|
var bend = new Bend
|
||||||
|
{
|
||||||
|
ParallelBendAngle = RadiansToDegrees(note.Angle),
|
||||||
|
Angle = angle,
|
||||||
|
Direction = direection == "UP" ? BendDirection.Up : BendDirection.Down,
|
||||||
|
X = x,
|
||||||
|
Y = y
|
||||||
|
};
|
||||||
|
|
||||||
|
bends.Add(bend);
|
||||||
|
}
|
||||||
|
|
||||||
|
return bends;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static BendOrientation GetOrientation(SolidWorks.Interop.sldworks.View view)
|
||||||
{
|
{
|
||||||
var angles = GetBendAngles(view);
|
var angles = GetBendAngles(view);
|
||||||
|
|
||||||
|
var bends = GetBends(view);
|
||||||
|
|
||||||
var vertical = 0;
|
var vertical = 0;
|
||||||
var horizontal = 0;
|
var horizontal = 0;
|
||||||
|
|
||||||
@@ -801,10 +958,22 @@ namespace ExportDXF.Forms
|
|||||||
|
|
||||||
private static double RadiansToDegrees(double angleInRadians)
|
private static double RadiansToDegrees(double angleInRadians)
|
||||||
{
|
{
|
||||||
return angleInRadians * 180.0 / Math.PI;
|
return Math.Round(angleInRadians * 180.0 / Math.PI, 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Bend
|
||||||
|
{
|
||||||
|
public BendDirection Direction { get; set; }
|
||||||
|
|
||||||
|
public double ParallelBendAngle { get; set; }
|
||||||
|
|
||||||
|
public double Angle { get; set; }
|
||||||
|
|
||||||
|
public double X { get; set; }
|
||||||
|
public double Y { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
enum BendDirection
|
enum BendDirection
|
||||||
{
|
{
|
||||||
Up,
|
Up,
|
||||||
@@ -817,4 +986,38 @@ namespace ExportDXF.Forms
|
|||||||
Horizontal,
|
Horizontal,
|
||||||
Unknown
|
Unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Size
|
||||||
|
{
|
||||||
|
public double Width { get; set; }
|
||||||
|
public double Height { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
class Bounds
|
||||||
|
{
|
||||||
|
public double X { get; set; }
|
||||||
|
public double Y { get; set; }
|
||||||
|
public double Width { get; set; }
|
||||||
|
public double Height { get; set; }
|
||||||
|
|
||||||
|
public double Left
|
||||||
|
{
|
||||||
|
get { return X; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Right
|
||||||
|
{
|
||||||
|
get { return X + Width; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Bottom
|
||||||
|
{
|
||||||
|
get { return Y; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public double Top
|
||||||
|
{
|
||||||
|
get { return Y + Height; }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
TestDocs/4701 A10 confined space standoff curtain lid.SLDPRT
Normal file
BIN
TestDocs/4701 A10 confined space standoff curtain lid.SLDPRT
Normal file
Binary file not shown.
BIN
TestDocs/4701 A11 hood side.SLDPRT
Normal file
BIN
TestDocs/4701 A11 hood side.SLDPRT
Normal file
Binary file not shown.
BIN
TestDocs/Assem1.SLDASM
Normal file
BIN
TestDocs/Assem1.SLDASM
Normal file
Binary file not shown.
BIN
TestDocs/Part1.SLDPRT
Normal file
BIN
TestDocs/Part1.SLDPRT
Normal file
Binary file not shown.
BIN
TestDocs/Part2.SLDPRT
Normal file
BIN
TestDocs/Part2.SLDPRT
Normal file
Binary file not shown.
Reference in New Issue
Block a user