개정판 abb01e6c
Update
DTI_PID/SPPIDConverter/Main.vb | ||
---|---|---|
1541 | 1541 |
ConvertPointBystring(sStartpoint, d기준s_x, d기준s_y) |
1542 | 1542 |
ConvertPointBystring(sEndpoint, d기준e_x, d기준e_y) |
1543 | 1543 |
|
1544 |
|
|
1545 |
|
|
1544 | 1546 |
If (d기준s_x <= dsx And d기준e_x >= dex) And |
1545 | 1547 |
d기준s_y <= dsy And d기준e_y >= dey Then |
1546 | 1548 |
'겹쳐서 오버되는 길이가 오버되지 않는 길이의 10%미만일때 겹치는 y축좌표를 겹치는점까지 설정 |
... | ... | |
1560 | 1562 |
End If |
1561 | 1563 |
|
1562 | 1564 |
Else |
1563 |
Dim dResultCalc As Double = ((dsy - d기준s_y) / (d기준e_y - dey)) * 100 |
|
1565 |
' Dim dResultCalc As Double = ((dsy - d기준s_y) / (d기준e_y - dey)) * 100 |
|
1566 |
Dim dResultCalc As Double = ((d기준e_y - dey) / (dsy - d기준s_y)) * 100 |
|
1564 | 1567 |
If dResultCalc < 10 Then |
1565 | 1568 |
Dim dCalcX As Double = Math.Abs(d기준e_x - d기준s_x) |
1566 | 1569 |
Dim dCalcY As Double = Math.Abs(d기준e_y - d기준s_y) |
... | ... | |
1588 | 1591 |
Dim dCalcStartX As Double = Math.Abs(dsx - d기준s_x) |
1589 | 1592 |
Dim dCalcStartY As Double = (dCalcY * dCalcStartX) / dCalcX |
1590 | 1593 |
If dCalcStartY = 0 Then |
1591 |
dey = d기준e_y
|
|
1594 |
dsy = d기준e_y
|
|
1592 | 1595 |
Else |
1593 |
dey = dCalcStartY
|
|
1596 |
dsy = dCalcStartY
|
|
1594 | 1597 |
End If |
1595 | 1598 |
|
1596 | 1599 |
End If |
... | ... | |
1598 | 1601 |
'겹쳐서 오버되는 길이가 오버되지 않는 길이의 10%미만일때 겹치는 y축좌표를 겹치는점까지 설정 |
1599 | 1602 |
|
1600 | 1603 |
Else |
1601 |
Dim dResultCalc As Double = ((dsy - d기준s_y) / (d기준e_y - dey)) * 100 |
|
1604 |
' Dim dResultCalc As Double = (Math.Abs((dsy - d기준s_y)) / Math.Abs((d기준e_y - dey))) * 100 |
|
1605 |
Dim dResultCalc As Double = ((d기준e_y - dey) / (dsy - d기준s_y)) * 100 |
|
1602 | 1606 |
If dResultCalc < 10 Then |
1603 | 1607 |
Dim dCalcX As Double = Math.Abs(d기준e_x - d기준s_x) |
1604 | 1608 |
Dim dCalcY As Double = Math.Abs(d기준e_y - d기준s_y) |
1605 | 1609 |
Dim dCalcStartX As Double = Math.Abs(dsx - d기준s_x) |
1606 | 1610 |
Dim dCalcStartY As Double = (dCalcY * dCalcStartX) / dCalcX |
1607 | 1611 |
If dCalcStartY = 0 Then |
1608 |
dsy = d기준s_y
|
|
1612 |
dey = d기준e_y
|
|
1609 | 1613 |
Else |
1610 |
dsy = dCalcStartY
|
|
1614 |
dey = dCalcStartY
|
|
1611 | 1615 |
End If |
1612 | 1616 |
End If |
1613 | 1617 |
|
... | ... | |
1630 | 1634 |
End If |
1631 | 1635 |
End If |
1632 | 1636 |
Else |
1633 |
Dim dResultCalc As Double = ((dsy - d기준s_y) / (d기준e_y - dey)) * 100 |
|
1637 |
' Dim dResultCalc As Double = ((dsy - d기준s_y) / (d기준e_y - dey)) * 100 |
|
1638 |
Dim dResultCalc As Double = ((d기준e_x - dex) / (dsx - d기준s_x)) * 100 |
|
1634 | 1639 |
If dResultCalc < 10 Then |
1635 | 1640 |
Dim dCalcX As Double = Math.Abs(d기준e_x - d기준s_x) |
1636 | 1641 |
Dim dCalcY As Double = Math.Abs(d기준e_y - d기준s_y) |
... | ... | |
1657 | 1662 |
Dim dCalcStartY As Double = Math.Abs(dsy - d기준s_y) |
1658 | 1663 |
Dim dCalcStartX As Double = (dCalcX * dCalcStartY) / dCalcY |
1659 | 1664 |
If dCalcStartX = 0 Then |
1660 |
dex = d기준e_x
|
|
1665 |
dsx = d기준e_x
|
|
1661 | 1666 |
Else |
1662 |
dex = dCalcStartX
|
|
1667 |
dsx = dCalcStartX
|
|
1663 | 1668 |
End If |
1664 | 1669 |
End If |
1665 | 1670 |
Else |
1666 |
Dim dResultCalc As Double = ((dsy - d기준s_y) / (d기준e_y - dey)) * 100 |
|
1671 |
' Dim dResultCalc As Double = ((dsy - d기준s_y) / (d기준e_y - dey)) * 100 |
|
1672 |
Dim dResultCalc As Double = ((d기준e_x - dex) / (dsx - d기준s_x)) * 100 |
|
1667 | 1673 |
If dResultCalc < 10 Then |
1668 | 1674 |
Dim dCalcX As Double = Math.Abs(d기준e_x - d기준s_x) |
1669 | 1675 |
Dim dCalcY As Double = Math.Abs(d기준e_y - d기준s_y) |
1670 | 1676 |
Dim dCalcStartY As Double = Math.Abs(dsy - d기준s_y) |
1671 | 1677 |
Dim dCalcStartX As Double = (dCalcX * dCalcStartY) / dCalcY |
1672 | 1678 |
If dCalcStartX = 0 Then |
1673 |
dsx = d기준s_x
|
|
1679 |
dex = d기준s_x
|
|
1674 | 1680 |
Else |
1675 |
dsx = dCalcStartX
|
|
1681 |
dex = dCalcStartX
|
|
1676 | 1682 |
End If |
1677 | 1683 |
End If |
1678 | 1684 |
|
내보내기 Unified diff