-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathLine3D.cs
35 lines (33 loc) · 1.06 KB
/
Line3D.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
namespace DXFLibrary
{
/// <summary>
/// The representation of LINE entity.
/// </summary>
public class Line3D : DXFLibrary.Entity
{
public Line3D(string layer, double xi, double yi, double zi, double xf, double yf, double zf)
: base("LINE", layer)
{
this.dataAcceptanceList.AddRange(new int[10] { 39, 10, 20, 30, 11, 21, 31, 210, 220, 230 });
this.AddReplace(10, xi);
this.AddReplace(20, yi);
this.AddReplace(30, zi);
this.AddReplace(11, xf);
this.AddReplace(21, yf);
this.AddReplace(31, zf);
}
public void setInitialPoint(double x, double y, double z)
{
this.AddReplace(10, x);
this.AddReplace(20, x);
this.AddReplace(30, z);
}
public void setFinalPoint(double x, double y, double z)
{
this.AddReplace(11, x);
this.AddReplace(21, x);
this.AddReplace(31, z);
}
}
}