개정판 27e624cd
dev issue #503 : fix drawing size
Change-Id: I35d2e3652fb1d5a588703e87cfac1cadfa72ca7f
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
1174 | 1174 |
/// <returns></returns> |
1175 | 1175 |
private bool DocumentCoordinateCorrection() |
1176 | 1176 |
{ |
1177 |
if (radApp.ActiveDocument.ActiveSheet.SmartFrames2d.Count > 0) |
|
1178 |
{ |
|
1179 |
double x = 0; |
|
1180 |
double y = 0; |
|
1181 |
foreach (Ingr.RAD2D.SmartFrame2d smartFrame in radApp.ActiveDocument.ActiveSheet.SmartFrames2d) |
|
1182 |
{ |
|
1183 |
x = Math.Max(smartFrame.CropRight, x); |
|
1184 |
y = Math.Max(smartFrame.CropTop, y); |
|
1185 |
} |
|
1186 |
document.SetSPPIDLocation(x, y); |
|
1177 |
//if (radApp.ActiveDocument.ActiveSheet.SmartFrames2d.Count > 0) |
|
1178 |
//{ |
|
1179 |
// double x = 0; |
|
1180 |
// double y = 0; |
|
1181 |
// foreach (Ingr.RAD2D.SmartFrame2d smartFrame in radApp.ActiveDocument.ActiveSheet.SmartFrames2d) |
|
1182 |
// { |
|
1183 |
// x = Math.Max(smartFrame.CropRight, x); |
|
1184 |
// y = Math.Max(smartFrame.CropTop, y); |
|
1185 |
// } |
|
1186 |
// document.SetSPPIDLocation(x, y); |
|
1187 |
// document.CoordinateCorrection(); |
|
1188 |
// return true; |
|
1189 |
//} |
|
1190 |
//else |
|
1191 |
//{ |
|
1192 |
// Log.Write("Need Border!"); |
|
1193 |
// return false; |
|
1194 |
//} |
|
1195 |
|
|
1196 |
if (Settings.Default.DrawingX != 0 && Settings.Default.DrawingY != 0) |
|
1197 |
{ |
|
1198 |
Log.Write("Setting Drawing X, Drawing Y"); |
|
1199 |
document.SetSPPIDLocation(Settings.Default.DrawingX, Settings.Default.DrawingY); |
|
1200 |
Log.Write("Start coordinate correction"); |
|
1187 | 1201 |
document.CoordinateCorrection(); |
1188 | 1202 |
return true; |
1189 | 1203 |
} |
1190 | 1204 |
else |
1191 | 1205 |
{ |
1192 |
Log.Write("Need Border!");
|
|
1206 |
Log.Write("Need Drawing X, Y");
|
|
1193 | 1207 |
return false; |
1194 | 1208 |
} |
1195 | 1209 |
} |
내보내기 Unified diff