Merge pull request #5 from andrasfuchs/eliminate-console-out

Merge eliminate-console-out into master
This commit is contained in:
Andras 2020-02-06 20:35:46 +01:00 committed by GitHub
commit d581dc5119
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
253 changed files with 1639 additions and 1512 deletions

View File

@ -30,9 +30,9 @@ import eu.mihosoft.freerouting.rules.ViaRule;
import eu.mihosoft.freerouting.board.RoutingBoard;
/**
* Structure for controlling the eu.mihosoft.freerouting.autoroute algorithm.
* Structure for controlling the autoroute algorithm.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class AutorouteControl
{
@ -176,18 +176,18 @@ public class AutorouteControl
public final ExpansionCostFactor[] trace_costs;
/** Defines for each layer, if it may used for routing. */
final boolean[] layer_active;
/** The currently used net number in the eu.mihosoft.freerouting.autoroute algorithm */
/** The currently used net number in the autoroute algorithm */
int net_no;
/** The currently used trace half widths in the eu.mihosoft.freerouting.autoroute algorithm on each layer */
/** The currently used trace half widths in the autoroute algorithm on each layer */
final int[] trace_half_width;
/**
* The currently used compensated trace half widths in the eu.mihosoft.freerouting.autoroute algorithm on each layer.
* The currently used compensated trace half widths in the autoroute algorithm on each layer.
* Equal to trace_half_width if no clearance compensation is used.
*/
final int[] compensated_trace_half_width;
/** The currently used clearance class for traces in the eu.mihosoft.freerouting.autoroute algorithm */
/** The currently used clearance class for traces in the autoroute algorithm */
public int trace_clearance_class_no;
/** The currently used clearance class for vias in the eu.mihosoft.freerouting.autoroute algorithm */
/** The currently used clearance class for vias in the autoroute algorithm */
int via_clearance_class;
/** The possible (partial) vias, which can be used by the autorouter */
ViaRule via_rule;
@ -223,14 +223,14 @@ public class AutorouteControl
public int ripup_costs;
public int ripup_pass_no;
public final boolean with_neckdown;
/** If true, the eu.mihosoft.freerouting.autoroute algorithm completes after the first drill */
/** If true, the autoroute algorithm completes after the first drill */
public boolean is_fanout;
/**
* Normally true, if the autorouter contains no fanout pass
*/
public boolean remove_unconnected_vias;
/** horizontal and vertical costs for traces on a eu.mihosoft.freerouting.board layer */
/** horizontal and vertical costs for traces on a board layer */
public static class ExpansionCostFactor
{
@ -239,9 +239,9 @@ public class AutorouteControl
horizontal = p_horizontal;
vertical = p_vertical;
}
/** The horizontal expansion cost factor on a layer of the eu.mihosoft.freerouting.board */
/** The horizontal expansion cost factor on a layer of the board */
public final double horizontal;
/** The verical expansion cost factor on a layer of the eu.mihosoft.freerouting.board */
/** The verical expansion cost factor on a layer of the board */
public final double vertical;
}

View File

@ -44,11 +44,12 @@ import eu.mihosoft.freerouting.board.ShapeSearchTree;
import eu.mihosoft.freerouting.board.ShapeSearchTree90Degree;
import eu.mihosoft.freerouting.board.ShapeSearchTree45Degree;
import eu.mihosoft.freerouting.board.TestLevel;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Temporary eu.mihosoft.freerouting.autoroute data stored on the RoutingBoard.
* Temporary autoroute data stored on the RoutingBoard.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class AutorouteEngine
{
@ -120,8 +121,7 @@ public class AutorouteEngine
maze_search_algo = MazeSearchAlgo.get_instance(p_start_set, p_dest_set, this, p_ctrl);
} catch (Exception e)
{
System.out.println("AutorouteEngine.autoroute_connection: Exception in MazeSearchAlgo.get_instance");
System.out.println(e);
FRLogger.error("AutorouteEngine.autoroute_connection: Exception in MazeSearchAlgo.get_instance", e);
maze_search_algo = null;
}
MazeSearchAlgo.Result search_result = null;
@ -132,7 +132,7 @@ public class AutorouteEngine
search_result = maze_search_algo.find_connection();
} catch (Exception e)
{
System.out.println("AutorouteEngine.autoroute_connection: Exception in maze_search_algo.find_connection");
FRLogger.error("AutorouteEngine.autoroute_connection: Exception in maze_search_algo.find_connection", e);
}
}
LocateFoundConnectionAlgo autoroute_result = null;
@ -145,7 +145,7 @@ public class AutorouteEngine
board.rules.get_trace_angle_restriction(), p_ripped_item_list, board.get_test_level());
} catch (Exception e)
{
System.out.println("AutorouteEngine.autoroute_connection: Exception in LocateFoundConnectionAlgo.get_instance");
FRLogger.error("AutorouteEngine.autoroute_connection: Exception in LocateFoundConnectionAlgo.get_instance", e);
}
}
if (!this.maintain_database)
@ -164,7 +164,7 @@ public class AutorouteEngine
{
if (this.board.get_test_level().ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("AutorouteEngine.autoroute_connection: result_items != null expected");
FRLogger.warn("AutorouteEngine.autoroute_connection: result_items != null expected");
}
return AutorouteResult.ALREADY_CONNECTED;
}
@ -189,7 +189,7 @@ public class AutorouteEngine
changed_nets.add(curr_ripped_item.get_net_no(i));
}
}
// let the observers know the changes in the eu.mihosoft.freerouting.board database.
// let the observers know the changes in the board database.
boolean observers_activated = !this.board.observers_active();
if (observers_activated)
{
@ -371,7 +371,7 @@ public class AutorouteEngine
}
else
{
System.out.println("AutorouteEngine.remove_complete_expansion_room: this.complete_expansion_rooms is null");
FRLogger.warn("AutorouteEngine.remove_complete_expansion_room: this.complete_expansion_rooms is null");
}
this.drill_page_array.invalidate(room_shape);
}
@ -444,8 +444,7 @@ public class AutorouteEngine
return result;
} catch (Exception e)
{
System.out.print("AutorouteEngine.complete_expansion_room: ");
System.out.println(e);
FRLogger.error("AutorouteEngine.complete_expansion_room: ", e);
return new LinkedList<CompleteFreeSpaceExpansionRoom>();
}
@ -643,7 +642,7 @@ public class AutorouteEngine
}
/**
* The current search tree used in autorouting.
* It depends on the trac clearance class used in the eu.mihosoft.freerouting.autoroute algorithm.
* It depends on the trac clearance class used in the autoroute algorithm.
*/
public final ShapeSearchTree autoroute_search_tree;
/** If maintain_database, the autorouter database is maintained after a connection is
@ -652,7 +651,7 @@ public class AutorouteEngine
public final boolean maintain_database;
static final int TRACE_WIDTH_TOLERANCE = 2;
/**
* The net number used for routing in this eu.mihosoft.freerouting.autoroute algorithm.
* The net number used for routing in this autoroute algorithm.
*/
private int net_no;
/**
@ -667,11 +666,11 @@ public class AutorouteEngine
* To stop the expansion algorithm after a time limit is exceeded.
*/
private TimeLimit time_limit;
/** The PCB-eu.mihosoft.freerouting.board of this eu.mihosoft.freerouting.autoroute algorithm. */
/** The PCB-board of this autoroute algorithm. */
final RoutingBoard board;
/** The list of incomplete expansion rooms on the routing eu.mihosoft.freerouting.board */
/** The list of incomplete expansion rooms on the routing board */
private List<IncompleteFreeSpaceExpansionRoom> incomplete_expansion_rooms = null;
/** The list of complete expansion rooms on the routing eu.mihosoft.freerouting.board */
/** The list of complete expansion rooms on the routing board */
private List<CompleteFreeSpaceExpansionRoom> complete_expansion_rooms = null;
/** The count of expansion rooms created so far */
private int expansion_room_instance_count = 0;

View File

@ -36,19 +36,19 @@ import eu.mihosoft.freerouting.interactive.InteractiveActionThread;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Handles the sequencing of the batch eu.mihosoft.freerouting.autoroute passes.
* Handles the sequencing of the batch autoroute passes.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class BatchAutorouter
{
private HashSet<String> already_checked_board_hashes = new HashSet<String>();
/**
* Autoroutes ripup passes until the eu.mihosoft.freerouting.board is completed or the autorouter is stopped by the user,
* Autoroutes ripup passes until the board is completed or the autorouter is stopped by the user,
* or if p_max_pass_count is exceeded. Is currently used in the optimize via batch pass.
* Returns the number of oasses to complete the eu.mihosoft.freerouting.board or p_max_pass_count + 1,
* if the eu.mihosoft.freerouting.board is not completed.
* Returns the number of oasses to complete the board or p_max_pass_count + 1,
* if the board is not completed.
*/
public static int autoroute_passes_for_optimizing_item(InteractiveActionThread p_thread,
int p_max_pass_count, int p_ripup_costs, boolean p_with_prefered_directions)
@ -109,8 +109,8 @@ public class BatchAutorouter
private LinkedList<Integer> diffBetweenBoards = new LinkedList<Integer>();
/**
* Autoroutes ripup passes until the eu.mihosoft.freerouting.board is completed or the autorouter is stopped by the user.
* Returns true if the eu.mihosoft.freerouting.board is completed.
* Autoroutes ripup passes until the board is completed or the autorouter is stopped by the user.
* Returns true if the board is completed.
*/
public boolean autoroute_passes()
{
@ -127,7 +127,7 @@ public class BatchAutorouter
var current_board_hash = this.routing_board.get_hash();
if (already_checked_board_hashes.contains(current_board_hash))
{
FRLogger.logger.warn("This board was already evaluated, so we stop autorouter to avoid the endless loop.");
FRLogger.warn("This board was already evaluated, so we stop autorouter to avoid the endless loop.");
thread.request_stop();
break;
}
@ -162,7 +162,7 @@ public class BatchAutorouter
if (average.getAsDouble() < 20.0)
{
FRLogger.logger.warn("There were only " + average.getAsDouble() + " changes in the last 20 passes, so it's very likely that autorouter can't improve the result much further. It is recommended to stop it and finish the board manually.");
FRLogger.warn("There were only " + average.getAsDouble() + " changes in the last 20 passes, so it's very likely that autorouter can't improve the result much further. It is recommended to stop it and finish the board manually.");
}
}
FRLogger.traceExit("BatchAutorouter.autoroute_pass #"+curr_pass_no+" on board '"+current_board_hash+"' making {} changes", newTraceDifferences);
@ -185,8 +185,8 @@ public class BatchAutorouter
}
/**
* Autoroutes one ripup pass of all items of the eu.mihosoft.freerouting.board.
* Returns false, if the eu.mihosoft.freerouting.board is already completely routed.
* Autoroutes one ripup pass of all items of the board.
* Returns false, if the board is already completely routed.
*/
private boolean autoroute_pass(int p_pass_no, boolean p_with_screen_message)
{

View File

@ -28,11 +28,12 @@ import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
import eu.mihosoft.freerouting.board.RoutingBoard;
import eu.mihosoft.freerouting.interactive.InteractiveActionThread;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Handles the sequencing of the fanout inside the batch autorouter.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class BatchFanout
{
@ -114,7 +115,7 @@ public class BatchFanout
}
if (this.routing_board.get_test_level() != eu.mihosoft.freerouting.board.TestLevel.RELEASE_VERSION)
{
System.out.println("fanout pass: " + (p_pass_no + 1) + ", routed: " + routed_count
FRLogger.warn("fanout pass: " + (p_pass_no + 1) + ", routed: " + routed_count
+ ", not routed: " + not_routed_count + ", errors: " + insert_error_count);
}
return routed_count;

View File

@ -34,17 +34,18 @@ import eu.mihosoft.freerouting.board.FixedState;
import eu.mihosoft.freerouting.board.TestLevel;
import eu.mihosoft.freerouting.interactive.InteractiveActionThread;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* To optimize the vias and traces after the batch autorouter has completed the eu.mihosoft.freerouting.board.
* To optimize the vias and traces after the batch autorouter has completed the board.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class BatchOptRoute
{
/**
* To optimize the route on the eu.mihosoft.freerouting.board after the eu.mihosoft.freerouting.autoroute task is finished.
* To optimize the route on the board after the autoroute task is finished.
*/
public BatchOptRoute(InteractiveActionThread p_thread)
{
@ -54,13 +55,13 @@ public class BatchOptRoute
}
/**
* Optimize the route on the eu.mihosoft.freerouting.board.
* Optimize the route on the board.
*/
public void optimize_board()
{
if (routing_board.get_test_level() != TestLevel.RELEASE_VERSION)
{
System.out.println("Before optimize: Via count: " + routing_board.get_vias().size() + ", trace length: " + Math.round(routing_board.cumulative_trace_length()));
FRLogger.warn("Before optimize: Via count: " + routing_board.get_vias().size() + ", trace length: " + Math.round(routing_board.cumulative_trace_length()));
}
boolean route_improved = true;
int curr_pass_no = 0;
@ -75,7 +76,7 @@ public class BatchOptRoute
}
/**
* Pass to reduce the number of vias an to shorten the trace lengthon a completely routed eu.mihosoft.freerouting.board.
* Pass to reduce the number of vias an to shorten the trace length a completely routed board.
* Returns true, if the route was improved.
*/
private boolean opt_route_pass(int p_pass_no, boolean p_with_prefered_directions)
@ -217,7 +218,7 @@ public class BatchOptRoute
/**
* Calculates the cumulative trace lengths multiplied by the trace radius of all traces
* on the eu.mihosoft.freerouting.board, which are not shove_fixed.
* on the board, which are not shove_fixed.
*/
private static double calc_weighted_trace_length(RoutingBoard p_board)
{
@ -270,9 +271,9 @@ public class BatchOptRoute
private static int ADDITIONAL_RIPUP_COST_FACTOR_AT_START = 10;
/**
* Reads the vias and traces on the eu.mihosoft.freerouting.board in ascending x order.
* Because the vias and traces on the eu.mihosoft.freerouting.board change while optimizing the item list
* of the eu.mihosoft.freerouting.board is read from scratch each time the next route item is returned.
* Reads the vias and traces on the board in ascending x order.
* Because the vias and traces on the board change while optimizing the item list
* of the board is read from scratch each time the next route item is returned.
*/
private class ReadSortedRouteItems
{

View File

@ -28,7 +28,7 @@ import java.util.Collection;
/**
*
* @author alfons
* @author Alfons Wirtz
*/
public interface CompleteExpansionRoom extends ExpansionRoom
{

View File

@ -35,13 +35,14 @@ import eu.mihosoft.freerouting.board.SearchTreeObject;
import eu.mihosoft.freerouting.board.ShapeSearchTree;
import eu.mihosoft.freerouting.board.Connectable;
import eu.mihosoft.freerouting.board.Item;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* An expansion room, whose shape is completely calculated,
* so that it can be stored in a shape tree.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class CompleteFreeSpaceExpansionRoom extends FreeSpaceExpansionRoom implements CompleteExpansionRoom, SearchTreeObject
{
@ -161,7 +162,7 @@ public class CompleteFreeSpaceExpansionRoom extends FreeSpaceExpansionRoom imple
}
/**
* Calculates the doors to the start and destination items of the eu.mihosoft.freerouting.autoroute algorithm.
* Calculates the doors to the start and destination items of the autoroute algorithm.
*/
public void calculate_target_doors(ShapeTree.TreeEntry p_own_net_object, int p_net_no, ShapeSearchTree p_autoroute_search_tree)
{
@ -230,7 +231,7 @@ public class CompleteFreeSpaceExpansionRoom extends FreeSpaceExpansionRoom imple
TileShape intersection = this.get_shape().intersection(curr_shape);
if (intersection.dimension() > 1)
{
System.out.println("ExpansionRoom overlap conflict");
FRLogger.warn("ExpansionRoom overlap conflict");
result = false;
}
}

View File

@ -33,7 +33,7 @@ import eu.mihosoft.freerouting.autoroute.AutorouteControl.ExpansionCostFactor;
* Calculation of a good lower bound for the distance between a new MazeExpansionElement
* and the destination set of the expansion.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class DestinationDistance
{

View File

@ -34,7 +34,7 @@ import eu.mihosoft.freerouting.board.RoutingBoard;
/**
* Describes the 2 dimensional array of pages of ExpansionDrill`s used in the maze search algorithm.
* The pages are rectangles of about equal width and height covering covering the bounding box of the eu.mihosoft.freerouting.board area.
* The pages are rectangles of about equal width and height covering covering the bounding box of the board area.
*
* @author Alfons Wirtz
*/

View File

@ -27,7 +27,7 @@ import eu.mihosoft.freerouting.geometry.planar.TileShape;
/**
* An object, which can be expanded by the maze expansion algorithm.
*
* @author alfons
* @author Alfons Wirtz
*/
public interface ExpandableObject
{

View File

@ -31,7 +31,7 @@ import java.util.Iterator;
/**
* Layer change expansion object in the maze search algorithm.
*
* @author alfons
* @author Alfons Wirtz
*/
public class ExpansionDrill implements ExpandableObject
{

View File

@ -30,7 +30,7 @@ import eu.mihosoft.freerouting.geometry.planar.TileShape;
/**
*
* @author alfons
* @author Alfons Wirtz
*/
public interface ExpansionRoom
{

View File

@ -37,7 +37,7 @@ import java.util.List;
/**
* Expansion Areas used by the maze search algorithm.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public abstract class FreeSpaceExpansionRoom implements ExpansionRoom
{

View File

@ -31,7 +31,7 @@ import eu.mihosoft.freerouting.geometry.planar.TileShape;
/**
* An expansion room, whose shape is not yet completely calculated.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class IncompleteFreeSpaceExpansionRoom extends FreeSpaceExpansionRoom
{

View File

@ -31,6 +31,7 @@ import java.util.Iterator;
import java.util.Set;
import eu.mihosoft.freerouting.library.Padstack;
import eu.mihosoft.freerouting.logger.FRLogger;
import eu.mihosoft.freerouting.rules.ViaInfo;
import eu.mihosoft.freerouting.board.ForcedViaAlgo;
@ -42,9 +43,9 @@ import eu.mihosoft.freerouting.board.ItemSelectionFilter;
import eu.mihosoft.freerouting.board.TestLevel;
/**
* Inserts the traces and vias of the connection found by the eu.mihosoft.freerouting.autoroute algorithm.
* Inserts the traces and vias of the connection found by the autoroute algorithm.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class InsertFoundConnectionAlgo
{
@ -75,8 +76,7 @@ public class InsertFoundConnectionAlgo
{
if (p_board.get_test_level().ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.print("InsertFoundConnectionAlgo: insert trace failed for net ");
System.out.println(p_ctrl.net_no);
FRLogger.warn("InsertFoundConnectionAlgo: insert trace failed for net #" + p_ctrl.net_no);
}
return null;
}
@ -194,7 +194,7 @@ public class InsertFoundConnectionAlgo
}
if (board.get_test_level().ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("InsertFoundConnectionAlgo: violation corrected");
FRLogger.warn("InsertFoundConnectionAlgo: violation corrected");
}
}
else
@ -387,8 +387,7 @@ public class InsertFoundConnectionAlgo
{
if (this.board.get_test_level().ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.print("InsertFoundConnectionAlgo: via mask not found for net ");
System.out.println(ctrl.net_no);
FRLogger.warn("InsertFoundConnectionAlgo: via mask not found for net #" + ctrl.net_no);
}
return false;
}
@ -399,8 +398,7 @@ public class InsertFoundConnectionAlgo
{
if (this.board.get_test_level().ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.print("InsertFoundConnectionAlgo: forced via failed for net ");
System.out.println(ctrl.net_no);
FRLogger.warn("InsertFoundConnectionAlgo: forced via failed for net #" + ctrl.net_no);
}
return false;
}

View File

@ -26,12 +26,13 @@ package eu.mihosoft.freerouting.autoroute;
import eu.mihosoft.freerouting.board.ShapeSearchTree;
import eu.mihosoft.freerouting.board.Item;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Temporary data stored in eu.mihosoft.freerouting.board Items used in the eu.mihosoft.freerouting.autoroute algorithm
* Temporary data stored in board Items used in the autoroute algorithm
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class ItemAutorouteInfo
@ -41,7 +42,7 @@ public class ItemAutorouteInfo
this.item = p_item;
}
/**
* Looks, if the corresponding item belongs to the start or destination set of the eu.mihosoft.freerouting.autoroute algorithm.
* Looks, if the corresponding item belongs to the start or destination set of the autoroute algorithm.
* Only used, if the item belongs to the net, which will be currently routed.
*/
public boolean is_start_info()
@ -50,7 +51,7 @@ public class ItemAutorouteInfo
}
/**
* Sets, if the corresponding item belongs to the start or destination set of the eu.mihosoft.freerouting.autoroute algorithm.
* Sets, if the corresponding item belongs to the start or destination set of the autoroute algorithm.
* Only used, if the item belongs to the net, which will be currently routed.
*/
public void set_start_info(boolean p_value)
@ -87,7 +88,7 @@ public class ItemAutorouteInfo
}
if (p_index < 0 || p_index >= expansion_room_arr.length)
{
System.out.println("ItemAutorouteInfo.get_expansion_room: p_index out of range");
FRLogger.warn("ItemAutorouteInfo.get_expansion_room: p_index out of range");
return null;
}
if (expansion_room_arr[p_index] == null)

View File

@ -37,6 +37,7 @@ import eu.mihosoft.freerouting.board.Item;
import eu.mihosoft.freerouting.board.AngleRestriction;
import eu.mihosoft.freerouting.board.ShapeSearchTree;
import eu.mihosoft.freerouting.board.TestLevel;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
@ -88,7 +89,7 @@ public abstract class LocateFoundConnectionAlgo
BacktrackElement start_info = this.backtrack_array[backtrack_array.length - 1];
if (!(start_info.door instanceof TargetItemExpansionDoor))
{
System.out.println("LocateFoundConnectionAlgo: ItemExpansionDoor expected for start_info.door");
FRLogger.warn("LocateFoundConnectionAlgo: ItemExpansionDoor expected for start_info.door");
this.start_item = null;
this.start_layer = 0;
this.target_item = null;
@ -120,7 +121,7 @@ public abstract class LocateFoundConnectionAlgo
}
else
{
System.out.println("LocateFoundConnectionAlgo: unexpected type of destination_door");
FRLogger.warn("LocateFoundConnectionAlgo: unexpected type of destination_door");
this.target_item = null;
this.target_layer = 0;
return;
@ -348,7 +349,7 @@ public abstract class LocateFoundConnectionAlgo
int curr_section_no = curr_maze_search_element.section_no_of_backtrack_door;
if (curr_section_no >= curr_backtrack_door.maze_search_element_count())
{
System.out.println("LocateFoundConnectionAlgo: curr_section_no to big");
FRLogger.warn("LocateFoundConnectionAlgo: curr_section_no to big");
curr_section_no = curr_backtrack_door.maze_search_element_count() - 1;
}
if (curr_backtrack_door instanceof ExpansionDrill)

View File

@ -40,6 +40,7 @@ import eu.mihosoft.freerouting.board.ShapeSearchTree;
import eu.mihosoft.freerouting.board.AngleRestriction;
import eu.mihosoft.freerouting.board.Item;
import eu.mihosoft.freerouting.board.TestLevel;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
@ -71,7 +72,7 @@ public class LocateFoundConnectionAlgo45Degree extends LocateFoundConnectionAlgo
if (curr_from_info.next_room == null)
{
System.out.println("LocateFoundConnectionAlgo45Degree.calculate_next_trace_corners: next_room is null");
FRLogger.warn("LocateFoundConnectionAlgo45Degree.calculate_next_trace_corners: next_room is null");
return result;
}
@ -126,7 +127,7 @@ public class LocateFoundConnectionAlgo45Degree extends LocateFoundConnectionAlgo
BacktrackElement curr_to_info = this.backtrack_array[this.current_to_door_index];
if (!(curr_to_info.door instanceof ExpansionDoor))
{
System.out.println("LocateFoundConnectionAlgo45Degree.calculate_next_trace_corners: ExpansionDoor expected");
FRLogger.warn("LocateFoundConnectionAlgo45Degree.calculate_next_trace_corners: ExpansionDoor expected");
return result;
}
ExpansionDoor curr_to_door = (ExpansionDoor) curr_to_info.door;
@ -147,7 +148,7 @@ public class LocateFoundConnectionAlgo45Degree extends LocateFoundConnectionAlgo
FloatLine[] line_sections = curr_to_door.get_section_segments(trace_halfwidth);
if (curr_to_info.section_no_of_door >= line_sections.length)
{
System.out.println("LocateFoundConnectionAlgo45Degree.calculate_next_trace_corners: line_sections inconsistent");
FRLogger.warn("LocateFoundConnectionAlgo45Degree.calculate_next_trace_corners: line_sections inconsistent");
return result;
}
FloatLine curr_line_section = line_sections[curr_to_info.section_no_of_door];

View File

@ -36,13 +36,14 @@ import eu.mihosoft.freerouting.board.ShapeSearchTree;
import eu.mihosoft.freerouting.board.AngleRestriction;
import eu.mihosoft.freerouting.board.Item;
import eu.mihosoft.freerouting.board.TestLevel;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Calculates from the backtrack list the location of the traces and vias,
* which realize a connection found by the maze search algorithm.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
@ -125,7 +126,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.calculate_next_trace_corner: left tangent point is null");
FRLogger.warn("LocateFoundConnectionAlgo.calculate_next_trace_corner: left tangent point is null");
}
left_tangent_point = door_left_corner;
}
@ -134,7 +135,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.calculate_next_trace_corner: right tangent point is null");
FRLogger.warn("LocateFoundConnectionAlgo.calculate_next_trace_corner: right tangent point is null");
}
right_tangent_point = door_right_corner;
}
@ -186,7 +187,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
// Should not happen because the previous door was not passed compledtely.
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.calculate_next_trace_corner: next door passed unexpected");
FRLogger.warn("LocateFoundConnectionAlgo.calculate_next_trace_corner: next door passed unexpected");
}
++this.current_to_door_index;
result.add(this.current_from_point);
@ -384,7 +385,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.right_turn_next_corner: left tangential point is null");
FRLogger.warn("LocateFoundConnectionAlgo.right_turn_next_corner: left tangential point is null");
}
return p_from_corner;
}
@ -394,7 +395,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.right_turn_next_corner: right tangential point is null");
FRLogger.warn("LocateFoundConnectionAlgo.right_turn_next_corner: right tangential point is null");
}
return p_from_corner;
}
@ -418,7 +419,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.left_turn_next_corner: right tangential point is null");
FRLogger.warn("LocateFoundConnectionAlgo.left_turn_next_corner: right tangential point is null");
}
return p_from_corner;
}
@ -428,7 +429,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo.left_turn_next_corner: left tangential point is null");
FRLogger.warn("LocateFoundConnectionAlgo.left_turn_next_corner: left tangential point is null");
}
return p_from_corner;
}
@ -450,7 +451,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo. right_left_tangential_point: right tangential point is null");
FRLogger.warn("LocateFoundConnectionAlgo. right_left_tangential_point: right tangential point is null");
}
return null;
}
@ -460,7 +461,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo. right_left_tangential_point: left tangential point is null");
FRLogger.warn("LocateFoundConnectionAlgo. right_left_tangential_point: left tangential point is null");
}
return null;
}
@ -481,7 +482,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo. left_right_tangential_point: left tangential point is null");
FRLogger.warn("LocateFoundConnectionAlgo. left_right_tangential_point: left tangential point is null");
}
return null;
}
@ -491,7 +492,7 @@ class LocateFoundConnectionAlgoAnyAngle extends LocateFoundConnectionAlgo
{
if (this.test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("LocateFoundConnectionAlgo. left_right_tangential_point: right tangential point is null");
FRLogger.warn("LocateFoundConnectionAlgo. left_right_tangential_point: right tangential point is null");
}
return null;
}

View File

@ -29,7 +29,7 @@ import eu.mihosoft.freerouting.geometry.planar.FloatLine;
* Information for the maze expand Algorithm contained in expansion doors and drills
* while the maze expanding algorithm is in progress.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class MazeListElement implements Comparable<MazeListElement>
{

View File

@ -47,11 +47,12 @@ import eu.mihosoft.freerouting.board.ShapeSearchTree;
import eu.mihosoft.freerouting.board.AngleRestriction;
import eu.mihosoft.freerouting.board.SearchTreeObject;
import eu.mihosoft.freerouting.board.ItemSelectionFilter;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Class for autorouting an incomplete connection via a maze search algorithm.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class MazeSearchAlgo
{
@ -271,7 +272,7 @@ public class MazeSearchAlgo
FloatPoint[] nearest_points = next_room_shape.nearest_border_points_approx(shape_entry_middle, 2);
if (nearest_points.length < 2)
{
System.out.println("MazeSearchAlgo.expand_to_room_doors: nearest_points.length == 2 expected");
FRLogger.warn("MazeSearchAlgo.expand_to_room_doors: nearest_points.length == 2 expected");
next_room_is_thick = false;
}
else
@ -550,7 +551,7 @@ public class MazeSearchAlgo
{
if (this.autoroute_engine.board.get_test_level().ordinal() >= eu.mihosoft.freerouting.board.TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("MazeSearchAlgo:check_door_width door_shape is empty");
FRLogger.warn("MazeSearchAlgo:check_door_width door_shape is empty");
}
return true;
}
@ -953,7 +954,7 @@ public class MazeSearchAlgo
if (this.autoroute_engine.maintain_database)
{
// add the completed start rooms carried over from the last eu.mihosoft.freerouting.autoroute to the start rooms.
// add the completed start rooms carried over from the last autoroute to the start rooms.
completed_start_rooms.addAll(this.autoroute_engine.get_rooms_with_target_items(p_start_items));
}
@ -1042,7 +1043,7 @@ public class MazeSearchAlgo
}
else
{
System.out.println("MazeSearchAlgo. room_shape_is_thick: unexpected obstacle item");
FRLogger.warn("MazeSearchAlgo. room_shape_is_thick: unexpected obstacle item");
obstacle_half_width = 0;
}
return obstacle_half_width >= this.ctrl.compensated_trace_half_width[layer];
@ -1442,7 +1443,7 @@ public class MazeSearchAlgo
return enter_through_small_door(p_list_element, curr_item);
}
/**
* The eu.mihosoft.freerouting.autoroute engine of this expansion algorithm.
* The autoroute engine of this expansion algorithm.
*/
public final AutorouteEngine autoroute_engine;
final AutorouteControl ctrl;

View File

@ -26,7 +26,7 @@ package eu.mihosoft.freerouting.autoroute;
/**
* Describes the structure of a section of an ExpandebleObject.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class MazeSearchElement
{

View File

@ -39,6 +39,7 @@ import eu.mihosoft.freerouting.geometry.planar.LineSegment;
import eu.mihosoft.freerouting.board.Item;
import eu.mihosoft.freerouting.board.RoutingBoard;
import eu.mihosoft.freerouting.board.ShoveTraceAlgo;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Auxiliary functions used in MazeSearchAlgo.
@ -85,7 +86,7 @@ public class MazeShoveTraceAlgo
if (trace_corner_no >= trace_polyline.arr.length - 1)
{
System.out.println("MazeShoveTraceAlgo.check_shove_trace_line: trace_corner_no to big");
FRLogger.warn("MazeShoveTraceAlgo.check_shove_trace_line: trace_corner_no to big");
return false;
}
Collection<ExpansionDoor> room_doors = p_obstacle_room.get_doors();
@ -296,7 +297,7 @@ public class MazeShoveTraceAlgo
{
if (p_board.get_test_level() == eu.mihosoft.freerouting.board.TestLevel.ALL_DEBUGGING_OUTPUT)
{
System.out.println("MazeShoveTraceAlgo.check_shove_trace_line: door shape is empty");
FRLogger.warn("MazeShoveTraceAlgo.check_shove_trace_line: door shape is empty");
}
continue;
}

View File

@ -36,7 +36,7 @@ import eu.mihosoft.freerouting.geometry.planar.TileShape;
import eu.mihosoft.freerouting.board.Item;
/**
* Expansion Room used for pushing and ripping obstacles in the eu.mihosoft.freerouting.autoroute algorithm.
* Expansion Room used for pushing and ripping obstacles in the autoroute algorithm.
*
* @author Alfons Wirtz
*/
@ -94,7 +94,7 @@ public class ObstacleExpansionRoom implements CompleteExpansionRoom
}
/**
* Creates a 2-dim door with the other obstacle room, if that is useful for the eu.mihosoft.freerouting.autoroute algorithm.
* Creates a 2-dim door with the other obstacle room, if that is useful for the autoroute algorithm.
* It is assumed that this room and p_other have a 2-dimensional overlap.
* Returns false, if no door was created.
*/

View File

@ -41,6 +41,7 @@ import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
import eu.mihosoft.freerouting.board.ShapeSearchTree;
import eu.mihosoft.freerouting.board.SearchTreeObject;
import eu.mihosoft.freerouting.board.Item;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
@ -105,7 +106,7 @@ public class Sorted45DegreeRoomNeighbours
}
else
{
System.out.println("Sorted45DegreeRoomNeighbours.calculate_neighbours: unexpected expansion room type");
FRLogger.warn("Sorted45DegreeRoomNeighbours.calculate_neighbours: unexpected expansion room type");
return null;
}
IntOctagon room_oct = room_shape.bounding_octagon();
@ -219,7 +220,7 @@ public class Sorted45DegreeRoomNeighbours
{
if (!(this.from_room instanceof ObstacleExpansionRoom))
{
System.out.println("Sorted45DegreeRoomNeighbours.calculate_side_incomplete_rooms_of_obstacle_expansion_room: ObstacleExpansionRoom expected for this.from_room");
FRLogger.warn("Sorted45DegreeRoomNeighbours.calculate_side_incomplete_rooms_of_obstacle_expansion_room: ObstacleExpansionRoom expected for this.from_room");
return;
}
IntOctagon board_bounding_oct = p_autoroute_engine.board.get_bounding_box().bounding_octagon();
@ -273,7 +274,7 @@ public class Sorted45DegreeRoomNeighbours
}
else
{
System.out.println("SortedOrthoganelRoomNeighbours.calculate_edge_incomplete_rooms_of_obstacle_expansion_room: curr_side_no illegal");
FRLogger.warn("SortedOrthoganelRoomNeighbours.calculate_edge_incomplete_rooms_of_obstacle_expansion_room: curr_side_no illegal");
return;
}
insert_incomplete_room(p_autoroute_engine, lx, ly, rx, uy, ulx, lrx, llx, urx);
@ -387,7 +388,7 @@ public class Sorted45DegreeRoomNeighbours
IncompleteFreeSpaceExpansionRoom curr_incomplete_room = (IncompleteFreeSpaceExpansionRoom) this.from_room;
if (!(curr_incomplete_room.get_shape() instanceof IntOctagon))
{
System.out.println("Sorted45DegreeRoomNeighbours.try_remove_edge_line: IntOctagon expected for room_shape type");
FRLogger.warn("Sorted45DegreeRoomNeighbours.try_remove_edge_line: IntOctagon expected for room_shape type");
return false;
}
IntOctagon room_oct = (IntOctagon) curr_incomplete_room.get_shape();
@ -862,7 +863,7 @@ public class Sorted45DegreeRoomNeighbours
}
else
{
System.out.println("Sorted45DegreeRoomNeighbour.calculate_new_incomplete: illegal touching side");
FRLogger.warn("Sorted45DegreeRoomNeighbour.calculate_new_incomplete: illegal touching side");
}
insert_incomplete_room(p_autoroute_engine, lx, ly, rx, uy, ulx, lrx, llx, urx);
}
@ -1065,7 +1066,7 @@ public class Sorted45DegreeRoomNeighbours
}
else
{
System.out.println("SortedRoomNeighbour.compareTo: first_touching_side out of range ");
FRLogger.warn("SortedRoomNeighbour.compareTo: first_touching_side out of range ");
return 0;
}

View File

@ -39,6 +39,7 @@ import eu.mihosoft.freerouting.geometry.planar.Limits;
import eu.mihosoft.freerouting.board.SearchTreeObject;
import eu.mihosoft.freerouting.board.ShapeSearchTree;
import eu.mihosoft.freerouting.board.Item;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
@ -89,7 +90,7 @@ public class SortedOrthogonalRoomNeighbours
TileShape room_shape = p_room.get_shape();
if (!(room_shape instanceof IntBox))
{
System.out.println("SortedOrthoganelRoomNeighbours.calculate_incomplete_rooms_with_empty_neighbours: IntBox expected for room_shape");
FRLogger.warn("SortedOrthoganelRoomNeighbours.calculate_incomplete_rooms_with_empty_neighbours: IntBox expected for room_shape");
return;
}
IntBox room_box = (IntBox) room_shape;
@ -115,7 +116,7 @@ public class SortedOrthogonalRoomNeighbours
}
else
{
System.out.println("SortedOrthoganelRoomNeighbours.calculate_incomplete_rooms_with_empty_neighbours: illegal index i");
FRLogger.warn("SortedOrthoganelRoomNeighbours.calculate_incomplete_rooms_with_empty_neighbours: illegal index i");
return;
}
IntBox new_contained_box = room_box.intersection(new_room_box);
@ -136,7 +137,7 @@ public class SortedOrthogonalRoomNeighbours
TileShape room_shape = p_room.get_shape();
if (!(room_shape instanceof IntBox))
{
System.out.println("SortedOrthogonalRoomNeighbours.calculate: IntBox expected for room_shape");
FRLogger.warn("SortedOrthogonalRoomNeighbours.calculate: IntBox expected for room_shape");
return null;
}
IntBox room_box = (IntBox) room_shape;
@ -151,7 +152,7 @@ public class SortedOrthogonalRoomNeighbours
}
else
{
System.out.println("SortedOrthogonalRoomNeighbours.calculate: unexpected expansion room type");
FRLogger.warn("SortedOrthogonalRoomNeighbours.calculate: unexpected expansion room type");
return null;
}
SortedOrthogonalRoomNeighbours result = new SortedOrthogonalRoomNeighbours(p_room, completed_room);
@ -176,7 +177,7 @@ public class SortedOrthogonalRoomNeighbours
curr_object.get_tree_shape(p_autoroute_search_tree, curr_entry.shape_index_in_object);
if (!(curr_shape instanceof IntBox))
{
System.out.println("OrthogonalAutorouteEngine:calculate_sorted_neighbours: IntBox expected for curr_shape");
FRLogger.warn("OrthogonalAutorouteEngine:calculate_sorted_neighbours: IntBox expected for curr_shape");
return null;
}
IntBox curr_box = (IntBox) curr_shape;
@ -201,8 +202,8 @@ public class SortedOrthogonalRoomNeighbours
}
if (dimension < 0)
{
System.out.println("AutorouteEngine.calculate_doors: dimension >= 0 expected");
FRLogger.warn("AutorouteEngine.calculate_doors: dimension >= 0 expected");
continue;
}
result.add_sorted_neighbour(curr_box, intersection);
@ -392,7 +393,7 @@ public class SortedOrthogonalRoomNeighbours
}
else
{
System.out.println("SortedOrthogonalRoomNeighbour.calculate_new_incomplete: illegal touching side");
FRLogger.warn("SortedOrthogonalRoomNeighbour.calculate_new_incomplete: illegal touching side");
}
}
prev_neighbour = next_neighbour;
@ -449,7 +450,7 @@ public class SortedOrthogonalRoomNeighbours
IncompleteFreeSpaceExpansionRoom curr_incomplete_room = (IncompleteFreeSpaceExpansionRoom) this.from_room;
if (!(curr_incomplete_room.get_shape() instanceof IntBox))
{
System.out.println("SortedOrthogonalRoomNeighbours.try_remove_edge: IntBox expected for room_shape type");
FRLogger.warn("SortedOrthogonalRoomNeighbours.try_remove_edge: IntBox expected for room_shape type");
return false;
}
IntBox room_box = (IntBox) curr_incomplete_room.get_shape();
@ -537,7 +538,7 @@ public class SortedOrthogonalRoomNeighbours
}
else
{
System.out.println("SortedOrthogonalRoomNeighbours.remove_border_line: illegal p_remove_edge_no");
FRLogger.warn("SortedOrthogonalRoomNeighbours.remove_border_line: illegal p_remove_edge_no");
result = null;
}
return result;
@ -608,7 +609,7 @@ public class SortedOrthogonalRoomNeighbours
}
else
{
System.out.println("SortedRoomNeighbour: case not expected");
FRLogger.warn("SortedRoomNeighbour: case not expected");
this.first_touching_side = -1;
}
@ -630,7 +631,7 @@ public class SortedOrthogonalRoomNeighbours
}
else
{
System.out.println("SortedRoomNeighbour: case not expected");
FRLogger.warn("SortedRoomNeighbour: case not expected");
this.last_touching_side = -1;
}
}
@ -673,7 +674,7 @@ public class SortedOrthogonalRoomNeighbours
}
else
{
System.out.println("SortedRoomNeighbour.compareTo: first_touching_side out of range ");
FRLogger.warn("SortedRoomNeighbour.compareTo: first_touching_side out of range ");
return 0;
}
if (cmp_value == 0)
@ -710,7 +711,7 @@ public class SortedOrthogonalRoomNeighbours
}
else
{
System.out.println("SortedRoomNeighbour.compareTo: first_touching_side out of range ");
FRLogger.warn("SortedRoomNeighbour.compareTo: first_touching_side out of range ");
return 0;
}
}

View File

@ -48,6 +48,7 @@ import eu.mihosoft.freerouting.board.Connectable;
import eu.mihosoft.freerouting.board.Item;
import eu.mihosoft.freerouting.board.PolylineTrace;
import eu.mihosoft.freerouting.board.TestLevel;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* To calculate the neigbour rooms of an expansion room.
@ -96,7 +97,7 @@ public class SortedRoomNeighbours
room_neighbours.calculate_new_incomplete_rooms(p_autoroute_engine);
if (test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal() && result.get_shape().dimension() < 2)
{
System.out.println("AutorouteEngine.calculate_new_incomplete_rooms_with_mmore_than_1_neighbour: unexpected dimension for smoothened_shape");
FRLogger.warn("AutorouteEngine.calculate_new_incomplete_rooms_with_mmore_than_1_neighbour: unexpected dimension for smoothened_shape");
}
}
@ -173,7 +174,7 @@ public class SortedRoomNeighbours
}
else
{
System.out.println("SortedRoomNeighbours.calculate: unexpected expansion room type");
FRLogger.warn("SortedRoomNeighbours.calculate: unexpected expansion room type");
return null;
}
SortedRoomNeighbours result = new SortedRoomNeighbours(p_room, completed_room);
@ -214,7 +215,7 @@ public class SortedRoomNeighbours
}
else if (p_test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("SortedRoomNeighbours.calculate: unexpected area overlap of free space expansion room");
FRLogger.warn("SortedRoomNeighbours.calculate: unexpected area overlap of free space expansion room");
}
continue;
}
@ -222,7 +223,7 @@ public class SortedRoomNeighbours
{
if (p_test_level.ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("SortedRoomNeighbours.calculate: dimension >= 0 expected");
FRLogger.warn("SortedRoomNeighbours.calculate: dimension >= 0 expected");
}
continue;
}
@ -233,7 +234,7 @@ public class SortedRoomNeighbours
{
if (p_test_level.ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("SortedRoomNeighbours.calculate: touching_sides length 2 expected");
FRLogger.warn("SortedRoomNeighbours.calculate: touching_sides length 2 expected");
}
continue;
}
@ -283,7 +284,7 @@ public class SortedRoomNeighbours
touching_side_no_of_room = room_shape.contains_on_border_line_no(touching_point);
if (touching_side_no_of_room < 0 && p_test_level.ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("SortedRoomNeighbours.calculate: touching_side_no_of_room >= 0 expected");
FRLogger.warn("SortedRoomNeighbours.calculate: touching_side_no_of_room >= 0 expected");
}
}
int neighbour_room_corner_no = curr_shape.equals_corner(touching_point);
@ -301,7 +302,7 @@ public class SortedRoomNeighbours
touching_side_no_of_neighbour_room = curr_shape.contains_on_border_line_no(touching_point);
if (touching_side_no_of_neighbour_room < 0 && p_test_level.ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("AutorouteEngine.SortedRoomNeighbours.calculate: touching_side_no_of_neighbour_room >= 0 expected");
FRLogger.warn("AutorouteEngine.SortedRoomNeighbours.calculate: touching_side_no_of_neighbour_room >= 0 expected");
}
}
result.add_sorted_neighbour(curr_shape, intersection,
@ -396,7 +397,7 @@ public class SortedRoomNeighbours
{
if (p_test_level.ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("AutorouteEngine.calculate_doors: 1 completed shape expected");
FRLogger.warn("AutorouteEngine.calculate_doors: 1 completed shape expected");
}
return false;
}
@ -664,7 +665,7 @@ public class SortedRoomNeighbours
{
if (p_door_line == null)
{
System.out.println("SortedRoomNeighbours.insert_door_ok: p_door_line is null");
FRLogger.warn("SortedRoomNeighbours.insert_door_ok: p_door_line is null");
return false;
}
Item curr_item = p_room.get_item();
@ -694,7 +695,7 @@ public class SortedRoomNeighbours
* Helper class to sort the doors of an expansion room counterclockwise
* arount the border of the room shape.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
private class SortedRoomNeighbour implements Comparable<SortedRoomNeighbour>

View File

@ -28,9 +28,9 @@ import eu.mihosoft.freerouting.board.Item;
import eu.mihosoft.freerouting.board.ShapeSearchTree;
/**
* An expansion door leading to a start or destination item of the eu.mihosoft.freerouting.autoroute algorithm.
* An expansion door leading to a start or destination item of the autoroute algorithm.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class TargetItemExpansionDoor implements ExpandableObject
{

View File

@ -49,10 +49,10 @@ import eu.mihosoft.freerouting.datastructures.UndoableObjects;
/**
*
* Provides basic functionality of a eu.mihosoft.freerouting.board with geometric items.
* Provides basic functionality of a board with geometric items.
* Contains functions such as inserting, deleting, modifying
* and picking items and elementary checking functions.
* A eu.mihosoft.freerouting.board may have 1 or several layers.
* A board may have 1 or several layers.
*
* @author Alfons Wirtz
*/
@ -60,11 +60,11 @@ public class BasicBoard implements java.io.Serializable
{
/**
* Creates a new instance of a routing Board with surrrounding box
* Creates a new instance of a routing Board with surrounding box
* p_bounding_box
* Rules contains the restrictions to obey when inserting items.
* Among other things it may contain a clearance matrix.
* p_observers is used for syncronisation, if the eu.mihosoft.freerouting.board is generated
* p_observers is used for synchronisation, if the board is generated
* by a host database. Otherwise it is null.
* If p_test_level != RELEASE_VERSION,, some features may be used, which are still in experimental state.
* Also warnings for debugging may be printed depending on the size of p_test_level.
@ -105,7 +105,7 @@ public class BasicBoard implements java.io.Serializable
return output_stream.toByteArray();
}
catch (Exception e) {
FRLogger.logger.error(e);
FRLogger.error("Couldn't serialize board", e);
}
return null;
@ -121,7 +121,7 @@ public class BasicBoard implements java.io.Serializable
return (BasicBoard)object_stream.readObject();
}
catch (Exception e) {
FRLogger.logger.error(e);
FRLogger.error("Couldn't deserialize board", e);
}
return null;
@ -143,7 +143,7 @@ public class BasicBoard implements java.io.Serializable
return convert_byte_array_to_hex_string(hashedBytes);
}
catch (Exception e) {
FRLogger.logger.error(e);
FRLogger.error("Couldn't calculate hash for board", e);
}
return null;
@ -181,8 +181,8 @@ public class BasicBoard implements java.io.Serializable
/**
* Inserts a trace into the eu.mihosoft.freerouting.board, whose geometry is described by
* a Polyline. p_clearance_class is the index in the clearance_matix,
* Inserts a trace into the board, whose geometry is described by
* a Polyline. p_clearance_class is the index in the clearance_matrix,
* which describes the required clearance restrictions to other items.
* Because no internal cleaning of items is done, the new inserted
* item can be returned.
@ -213,8 +213,8 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts a trace into the eu.mihosoft.freerouting.board, whose geometry is described by
* a Polyline. p_clearance_class is the index in the clearance_matix,
* Inserts a trace into the board, whose geometry is described by
* a Polyline. p_clearance_class is the index in the clearance_matrix,
* which describes the required clearance restrictions to other items.
*/
public void insert_trace(Polyline p_polyline, int p_layer,
@ -240,7 +240,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts a trace into the eu.mihosoft.freerouting.board, whose geometry is described by
* Inserts a trace into the board, whose geometry is described by
* an array of points, and cleans up the net.
*/
public void insert_trace(Point[] p_points, int p_layer,
@ -250,7 +250,7 @@ public class BasicBoard implements java.io.Serializable
{
if (!this.bounding_box.contains(p_points[i]))
{
System.out.println("LayeredBoard.insert_trace: input point out of range");
FRLogger.warn("LayeredBoard.insert_trace: input point out of range");
}
}
Polyline poly = new Polyline(p_points);
@ -258,7 +258,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts a via into the eu.mihosoft.freerouting.board. p_attach_allowed indicates, if the via may overlap with smd pins
* Inserts a via into the board. p_attach_allowed indicates, if the via may overlap with smd pins
* of the same net.
*/
public Via insert_via(Padstack p_padstack, Point p_center, int[] p_net_no_arr, int p_clearance_class,
@ -280,8 +280,8 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts a pin into the eu.mihosoft.freerouting.board.
* p_pin_no is the number of this pin in the eu.mihosoft.freerouting.library package of its component (starting with 0).
* Inserts a pin into the board.
* p_pin_no is the number of this pin in the library package of its component (starting with 0).
*/
public Pin insert_pin(int p_component_no, int p_pin_no, int[] p_net_no_arr, int p_clearance_class, FixedState p_fixed_state)
{
@ -291,15 +291,15 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts an obstacle into the eu.mihosoft.freerouting.board , whose geometry is described
* by a polygonyal shape, which may have holes.
* Inserts an obstacle into the board , whose geometry is described
* by a polygonal shape, which may have holes.
* If p_component_no != 0, the obstacle belongs to a component.
*/
public ObstacleArea insert_obstacle(Area p_area, int p_layer, int p_clearance_class, FixedState p_fixed_state)
{
if (p_area == null)
{
System.out.println("BasicBoard.insert_obstacle: p_area is null");
FRLogger.warn("BasicBoard.insert_obstacle: p_area is null");
return null;
}
ObstacleArea obs = new ObstacleArea(p_area, p_layer, Vector.ZERO, 0, false, p_clearance_class, 0, 0, null, p_fixed_state, this);
@ -308,15 +308,15 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts an obstacle belonging to a component into the eu.mihosoft.freerouting.board
* p_name is to identify the corresponding ObstacstacleArea in the component package.
* Inserts an obstacle belonging to a component into the board
* p_name is to identify the corresponding ObstacleArea in the component package.
*/
public ObstacleArea insert_obstacle(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree,
boolean p_side_changed, int p_clearance_class, int p_component_no, String p_name, FixedState p_fixed_state)
{
if (p_area == null)
{
System.out.println("BasicBoard.insert_obstacle: p_area is null");
FRLogger.warn("BasicBoard.insert_obstacle: p_area is null");
return null;
}
ObstacleArea obs = new ObstacleArea(p_area, p_layer, p_translation, p_rotation_in_degree, p_side_changed,
@ -326,15 +326,15 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts an via obstacle area into the eu.mihosoft.freerouting.board , whose geometry is described
* by a polygonyal shape, which may have holes.
* Inserts an via obstacle area into the board , whose geometry is described
* by a polygonal shape, which may have holes.
*/
public ViaObstacleArea insert_via_obstacle(Area p_area, int p_layer, int p_clearance_class,
FixedState p_fixed_state)
{
if (p_area == null)
{
System.out.println("BasicBoard.insert_via_obstacle: p_area is null");
FRLogger.warn("BasicBoard.insert_via_obstacle: p_area is null");
return null;
}
ViaObstacleArea obs = new ViaObstacleArea(p_area, p_layer, Vector.ZERO, 0, false,
@ -344,8 +344,8 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts an via obstacle belonging to a component into the eu.mihosoft.freerouting.board
* p_name is to identify the corresponding ObstacstacleArea in the component package.
* Inserts an via obstacle belonging to a component into the board
* p_name is to identify the corresponding ObstacleArea in the component package.
*/
public ViaObstacleArea insert_via_obstacle(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree,
boolean p_side_changed, int p_clearance_class, int p_component_no, String p_name,
@ -353,7 +353,7 @@ public class BasicBoard implements java.io.Serializable
{
if (p_area == null)
{
System.out.println("BasicBoard.insert_via_obstacle: p_area is null");
FRLogger.warn("BasicBoard.insert_via_obstacle: p_area is null");
return null;
}
ViaObstacleArea obs = new ViaObstacleArea(p_area, p_layer, p_translation, p_rotation_in_degree, p_side_changed,
@ -363,15 +363,15 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts a component obstacle area into the eu.mihosoft.freerouting.board , whose geometry is described
* by a polygonyal shape, which may have holes.
* Inserts a component obstacle area into the board , whose geometry is described
* by a polygonal shape, which may have holes.
*/
public ComponentObstacleArea insert_component_obstacle(Area p_area, int p_layer,
int p_clearance_class, FixedState p_fixed_state)
{
if (p_area == null)
{
System.out.println("BasicBoard.insert_component_obstacle: p_area is null");
FRLogger.warn("BasicBoard.insert_component_obstacle: p_area is null");
return null;
}
ComponentObstacleArea obs = new ComponentObstacleArea(p_area, p_layer, Vector.ZERO, 0, false,
@ -381,15 +381,15 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts a component obstacle belonging to a component into the eu.mihosoft.freerouting.board.
* p_name is to identify the corresponding ObstacstacleArea in the component package.
* Inserts a component obstacle belonging to a component into the board.
* p_name is to identify the corresponding ObstacleArea in the component package.
*/
public ComponentObstacleArea insert_component_obstacle(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree,
boolean p_side_changed, int p_clearance_class, int p_component_no, String p_name, FixedState p_fixed_state)
{
if (p_area == null)
{
System.out.println("BasicBoard.insert_component_obstacle: p_area is null");
FRLogger.warn("BasicBoard.insert_component_obstacle: p_area is null");
return null;
}
ComponentObstacleArea obs = new ComponentObstacleArea(p_area, p_layer, p_translation, p_rotation_in_degree, p_side_changed,
@ -399,19 +399,19 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts a component ouline into the eu.mihosoft.freerouting.board.
* Inserts a component outline into the board.
*/
public ComponentOutline insert_component_outline(Area p_area, boolean p_is_front, Vector p_translation, double p_rotation_in_degree,
int p_component_no, FixedState p_fixed_state)
{
if (p_area == null)
{
System.out.println("BasicBoard.insert_component_outline: p_area is null");
FRLogger.warn("BasicBoard.insert_component_outline: p_area is null");
return null;
}
if (!p_area.is_bounded())
{
System.out.println("BasicBoard.insert_component_outline: p_area is not bounded");
FRLogger.warn("BasicBoard.insert_component_outline: p_area is not bounded");
return null;
}
ComponentOutline outline = new ComponentOutline(p_area, p_is_front, p_translation, p_rotation_in_degree,
@ -421,8 +421,8 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts a condution area into the eu.mihosoft.freerouting.board , whose geometry is described
* by a polygonyal shape, which may have holes.
* Inserts a conduction area into the board , whose geometry is described
* by a polygonal shape, which may have holes.
* If p_is_obstacle is false, it is possible to route through the conduction area
* with traces and vias of foreign nets.
*/
@ -431,7 +431,7 @@ public class BasicBoard implements java.io.Serializable
{
if (p_area == null)
{
System.out.println("BasicBoard.insert_conduction_area: p_area is null");
FRLogger.warn("BasicBoard.insert_conduction_area: p_area is null");
return null;
}
ConductionArea c = new ConductionArea(p_area, p_layer, Vector.ZERO, 0, false, p_net_no_arr, p_clearance_class,
@ -441,7 +441,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts an Outline into the eu.mihosoft.freerouting.board.
* Inserts an Outline into the board.
*/
public BoardOutline insert_outline(PolylineShape[] p_outline_shapes, int p_clearance_class_no)
{
@ -451,7 +451,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns the outline of the eu.mihosoft.freerouting.board.
* Returns the outline of the board.
*/
public BoardOutline get_outline()
{
@ -472,7 +472,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Removes an item from the eu.mihosoft.freerouting.board
* Removes an item from the board
*/
public void remove_item(Item p_item)
{
@ -489,7 +489,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* looks, if an item with id_no p_id_no is on the eu.mihosoft.freerouting.board.
* looks, if an item with id_no p_id_no is on the board.
* Returns the found item or null, if no such item is found.
*/
public Item get_item(int p_id_no)
@ -511,7 +511,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns the list of all items on the eu.mihosoft.freerouting.board
* Returns the list of all items on the board
*/
public Collection<Item> get_items()
{
@ -530,7 +530,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns all connectable items on the eu.mihosoft.freerouting.board containing p_net_no
* Returns all connectable items on the board containing p_net_no
*/
public Collection<Item> get_connectable_items(int p_net_no)
{
@ -666,7 +666,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns the list of all conduction areas on the eu.mihosoft.freerouting.board
* Returns the list of all conduction areas on the board
*/
public Collection<ConductionArea> get_conduction_areas()
{
@ -688,7 +688,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns the list of all pins on the eu.mihosoft.freerouting.board
* Returns the list of all pins on the board
*/
public Collection<Pin> get_pins()
{
@ -710,7 +710,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns the list of all pins on the eu.mihosoft.freerouting.board with only 1 layer
* Returns the list of all pins on the board with only 1 layer
*/
public Collection<Pin> get_smd_pins()
{
@ -736,7 +736,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns the list of all vias on the eu.mihosoft.freerouting.board
* Returns the list of all vias on the board
*/
public Collection<Via> get_vias()
{
@ -758,7 +758,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns the list of all traces on the eu.mihosoft.freerouting.board
* Returns the list of all traces on the board
*/
public Collection<Trace> get_traces()
{
@ -780,7 +780,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns the cumulative length of all traces on the eu.mihosoft.freerouting.board
* Returns the cumulative length of all traces on the board
*/
public double cumulative_trace_length()
{
@ -1133,7 +1133,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns the layer count of this eu.mihosoft.freerouting.board.
* Returns the layer count of this board.
*/
public int get_layer_count()
{
@ -1141,7 +1141,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Draws all items of the eu.mihosoft.freerouting.board on their visible layers. Called in the overwritten
* Draws all items of the board on their visible layers. Called in the overwritten
* paintComponent method of a class derived from JPanel.
* The value of p_layer_visibility is expected between 0 and 1 for each layer.
*/
@ -1152,7 +1152,7 @@ public class BasicBoard implements java.io.Serializable
return;
}
// draw all items on the eu.mihosoft.freerouting.board
// draw all items on the board
for (int curr_priority = Drawable.MIN_DRAW_PRIORITY; curr_priority <= Drawable.MIDDLE_DRAW_PRIORITY; ++curr_priority)
{
Iterator<UndoableObjects.UndoableObjectNode> it = item_list.start_read_object();
@ -1180,7 +1180,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns the list of items on the eu.mihosoft.freerouting.board, whose shape on layer p_layer contains the point at p_location.
* Returns the list of items on the board, whose shape on layer p_layer contains the point at p_location.
* If p_layer {@literal <} 0, the layer is ignored.
* If p_item_selection_filter != null, only items of types selected by the filter are picked.
*/
@ -1204,7 +1204,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* checks, if p_point is contained in the bounding box of this eu.mihosoft.freerouting.board.
* checks, if p_point is contained in the bounding box of this board.
*/
public boolean contains(Point p_point)
{
@ -1226,7 +1226,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* returns the biggest half width of all traces on the eu.mihosoft.freerouting.board.
* returns the biggest half width of all traces on the board.
*/
public int get_max_trace_half_width()
{
@ -1234,7 +1234,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* returns the smallest half width of all traces on the eu.mihosoft.freerouting.board.
* returns the smallest half width of all traces on the board.
*/
public int get_min_trace_half_width()
{
@ -1242,7 +1242,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns a surrounding box of the geometry of this eu.mihosoft.freerouting.board
* Returns a surrounding box of the geometry of this board
*/
public IntBox get_bounding_box()
{
@ -1313,7 +1313,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Returns, if the observer of the eu.mihosoft.freerouting.board items is activated.
* Returns, if the observer of the board items is activated.
*/
public boolean observers_active()
{
@ -1353,7 +1353,7 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Inserts an item into the eu.mihosoft.freerouting.board data base
* Inserts an item into the board data base
*/
public void insert_item(Item p_item)
{
@ -1365,7 +1365,7 @@ public class BasicBoard implements java.io.Serializable
if (rules == null || rules.clearance_matrix == null || p_item.clearance_class_no() < 0 ||
p_item.clearance_class_no() >= rules.clearance_matrix.get_class_count())
{
System.out.println("LayeredBoard.insert_item: clearance_class no out of range");
FRLogger.warn("LayeredBoard.insert_item: clearance_class no out of range");
p_item.set_clearance_class_no(0);
}
p_item.board = this;
@ -1478,11 +1478,11 @@ public class BasicBoard implements java.io.Serializable
}
/**
* Makes the current eu.mihosoft.freerouting.board situation restorable by undo.
* Makes the current board situation restorable by undo.
*/
public void generate_snapshot()
{
FRLogger.logger.info("Generating snapshot");
FRLogger.info("Generating snapshot");
item_list.generate_snapshot();
components.generate_snapshot();
@ -1606,7 +1606,7 @@ public class BasicBoard implements java.io.Serializable
throws java.io.IOException, java.lang.ClassNotFoundException
{
p_stream.defaultReadObject();
// insert the items on the eu.mihosoft.freerouting.board into the search trees
// insert the items on the board into the search trees
search_tree_manager = new SearchTreeManager(this);
Iterator<Item> it = this.get_items().iterator();
while (it.hasNext())
@ -1617,27 +1617,27 @@ public class BasicBoard implements java.io.Serializable
}
}
/**
* List of items inserted into this eu.mihosoft.freerouting.board
* List of items inserted into this board
*/
public final UndoableObjects item_list;
/** List of placed components on the eu.mihosoft.freerouting.board. */
/** List of placed components on the board. */
public final Components components;
/**
* Class defining the eu.mihosoft.freerouting.rules for items to be inserted into this eu.mihosoft.freerouting.board.
* Class defining the rules for items to be inserted into this board.
* Contains for example the clearance matrix.
*/
public final BoardRules rules;
/**
* The eu.mihosoft.freerouting.library containing pastack masks, packagages and other
* templates used on the eu.mihosoft.freerouting.board.
* The library containing padstack masks, packages and other
* templates used on the board.
*/
public final BoardLibrary library;
/**
* The layer structure of this eu.mihosoft.freerouting.board.
* The layer structure of this board.
*/
public final LayerStructure layer_structure;
/**
* Handels the search trees pointing into the items of this eu.mihosoft.freerouting.board
* Handels the search trees pointing into the items of this board
*/
public transient SearchTreeManager search_tree_manager;
/**
@ -1645,7 +1645,7 @@ public class BasicBoard implements java.io.Serializable
*/
public final Communication communication;
/**
* bounding orthogonal rectangle of this eu.mihosoft.freerouting.board
* bounding orthogonal rectangle of this board
*/
public final IntBox bounding_box;
/**
@ -1656,11 +1656,11 @@ public class BasicBoard implements java.io.Serializable
/** the rectangle, where the graphics may be not uptodate */
transient private IntBox update_box = IntBox.EMPTY;
/**
* the biggest half width of all traces on the eu.mihosoft.freerouting.board
* the biggest half width of all traces on the board
*/
private int max_trace_half_width = 1000;
/**
* the smallest half width of all traces on the eu.mihosoft.freerouting.board
* the smallest half width of all traces on the board
*/
private int min_trace_half_width = 10000;
/**

View File

@ -28,7 +28,7 @@ import eu.mihosoft.freerouting.datastructures.Observers;
/**
*
* @author alfons
* @author Alfons Wirtz
*/
public interface BoardObservers extends Observers<Item>
{

View File

@ -32,11 +32,12 @@ import eu.mihosoft.freerouting.geometry.planar.Vector;
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Class describing a eu.mihosoft.freerouting.board outline.
* Class describing a board outline.
*
* @author alfons
* @author Alfons Wirtz
*/
public class BoardOutline extends Item implements java.io.Serializable
{
@ -85,7 +86,7 @@ public class BoardOutline extends Item implements java.io.Serializable
}
if (result < 0 || result >= this.board.layer_structure.arr.length)
{
System.out.println("BoardOutline.shape_layer: p_index out of range");
FRLogger.warn("BoardOutline.shape_layer: p_index out of range");
}
return result;
}
@ -193,7 +194,7 @@ public class BoardOutline extends Item implements java.io.Serializable
{
if (p_index < 0 || p_index >= this.shapes.length)
{
System.out.println("BoardOutline.get_shape: p_index out of range");
FRLogger.warn("BoardOutline.get_shape: p_index out of range");
return null;
}
return this.shapes[p_index];
@ -220,7 +221,7 @@ public class BoardOutline extends Item implements java.io.Serializable
}
/**
* The eu.mihosoft.freerouting.board shape outside the outline curves, where a keepout will be generated
* The board shape outside the outline curves, where a keepout will be generated
* The outline curves are holes of the keepout_area.
*/
Area get_keepout_area()
@ -289,7 +290,7 @@ public class BoardOutline extends Item implements java.io.Serializable
}
/**
* Returns, if keepout is generated outside the eu.mihosoft.freerouting.board outline.
* Returns, if keepout is generated outside the board outline.
* Otherwise only the line shapes of the outlines are inserted as keepout.
*/
public boolean keepout_outside_outline_generated()
@ -342,10 +343,10 @@ public class BoardOutline extends Item implements java.io.Serializable
{
return p_search_tree.calculate_tree_shapes(this);
}
/** The eu.mihosoft.freerouting.board shapes inside the outline curves. */
/** The board shapes inside the outline curves. */
private PolylineShape[] shapes;
/**
* The eu.mihosoft.freerouting.board shape outside the outline curves, where a keepout will be generated
* The board shape outside the outline curves, where a keepout will be generated
* The outline curves are holes of the keepout_area.
*/
private Area keepout_area = null;

View File

@ -30,10 +30,11 @@ import eu.mihosoft.freerouting.geometry.planar.Point;
import eu.mihosoft.freerouting.geometry.planar.Polyline;
import eu.mihosoft.freerouting.geometry.planar.TileShape;
import eu.mihosoft.freerouting.geometry.planar.Side;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class CalcFromSide
{
@ -99,7 +100,7 @@ public class CalcFromSide
this.no = p_shape.contains_on_border_line_no(border_projection);
if (this.no < 0)
{
System.out.println("CalcFromSide: this.no >= 0 expected");
FRLogger.warn("CalcFromSide: this.no >= 0 expected");
}
this.border_intersection = border_projection.to_float();
}
@ -143,7 +144,7 @@ public class CalcFromSide
}
if (front_side_no < 0)
{
System.out.println("CalcFromSide: start corner not found");
FRLogger.warn("CalcFromSide: start corner not found");
no = -1;
border_intersection = null;
return;

View File

@ -31,7 +31,7 @@ import eu.mihosoft.freerouting.geometry.planar.TileShape;
* Used in the shove algorithm to calculate the fromside for pushing and
* to cut off dog ears of the trace shape.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
class CalcShapeAndFromSide

View File

@ -24,7 +24,7 @@ import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
/**
*
* Used internally for marking changed areas on the eu.mihosoft.freerouting.board
* Used internally for marking changed areas on the board
* after shoving and optimizing items.
*
@ -124,7 +124,7 @@ class ChangedArea
MutableOctagon [] arr;
/**
* mutable octagon with double coordinates (see eu.mihosoft.freerouting.geometry.planar.IntOctagon)
* mutable octagon with double coordinates (see geometry.planar.IntOctagon)
*/
private static class MutableOctagon
{

View File

@ -29,7 +29,7 @@ import eu.mihosoft.freerouting.geometry.planar.ConvexShape;
/**
* Information of a clearance violation between 2 items.
*
* @author alfons
* @author Alfons Wirtz
*/
public class ClearanceViolation implements ObjectInfoPanel.Printable
{

View File

@ -29,7 +29,7 @@ import eu.mihosoft.freerouting.designforms.specctra.CoordinateTransform;
/**
* Communication information to host systems or host design formats.
*
* @author alfons
* @author Alfons Wirtz
*/
public class Communication implements java.io.Serializable
{

View File

@ -34,10 +34,10 @@ import eu.mihosoft.freerouting.library.Package;
/**
* Describes eu.mihosoft.freerouting.board components consisting of an array of pins
* Describes board components consisting of an array of pins
* und other stuff like component keepouts.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Printable, java.io.Serializable
{
@ -88,7 +88,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
}
/**
* If false, the component will be placed on the back side of the eu.mihosoft.freerouting.board.
* If false, the component will be placed on the back side of the board.
*/
public boolean placed_on_front()
{
@ -97,7 +97,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
/**
* Translates the location of this Component by p_p_vector.
* The Pins in the eu.mihosoft.freerouting.board must be moved seperately.
* The Pins in the board must be moved separately.
*/
public void translate_by(Vector p_vector)
{
@ -142,7 +142,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
double turn_angle = p_angle_in_degree;
if (p_flip_style_rotate_first && !this.placed_on_front())
{
// take care of the order of mirroring and rotating on the back side of the eu.mihosoft.freerouting.board
// take care of the order of mirroring and rotating on the back side of the board
turn_angle = 360 - p_angle_in_degree;
}
this.rotation_in_degree = this.rotation_in_degree + turn_angle;
@ -254,7 +254,7 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
}
/**
* Returns the eu.mihosoft.freerouting.library package of this component.
* Returns the library package of this component.
*/
public Package get_package()
{
@ -276,19 +276,19 @@ public class Component implements UndoableObjects.Storable, ObjectInfoPanel.Prin
/** The location of the component. */
private Point location;
/** The rotation of the eu.mihosoft.freerouting.library package of the component in degree */
/** The rotation of the library package of the component in degree */
private double rotation_in_degree;
/** Contains information for gate swapping and pin swapping, if != null */
private eu.mihosoft.freerouting.library.LogicalPart logical_part = null;
/** If false, the component will be placed on the back side of the eu.mihosoft.freerouting.board. */
/** If false, the component will be placed on the back side of the board. */
private boolean on_front;
/** The eu.mihosoft.freerouting.library package of the component if it is placed on the component side. */
/** The library package of the component if it is placed on the component side. */
private final Package lib_package_front;
/** The eu.mihosoft.freerouting.library package of the component if it is placed on the solder side. */
/** The library package of the component if it is placed on the solder side. */
private final Package lib_package_back;
/** Internal generated unique identification number. */

View File

@ -28,9 +28,9 @@ import eu.mihosoft.freerouting.geometry.planar.Area;
import eu.mihosoft.freerouting.geometry.planar.Vector;
/**
* Describes areas of the eu.mihosoft.freerouting.board, where components arre not allowed.
* Describes areas of the board, where components are not allowed.
*
* @author alfons
* @author Alfons Wirtz
*/
public class ComponentObstacleArea extends ObstacleArea
{

View File

@ -32,6 +32,7 @@ import eu.mihosoft.freerouting.geometry.planar.IntPoint;
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
@ -211,7 +212,7 @@ public class ComponentOutline extends Item implements java.io.Serializable
{
if (this.relative_area == null)
{
System.out.println("ObstacleArea.get_area: area is null");
FRLogger.warn("ObstacleArea.get_area: area is null");
return null;
}
Area turned_area = this.relative_area;

View File

@ -34,17 +34,18 @@ import eu.mihosoft.freerouting.geometry.planar.Point;
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
import eu.mihosoft.freerouting.library.Package;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Contains the lists of components on the eu.mihosoft.freerouting.board.
* Contains the lists of components on the board.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class Components implements java.io.Serializable
{
/**
* Inserts a component into the list.
* The items of the component have to be inserted seperately into the eu.mihosoft.freerouting.board.
* The items of the component have to be inserted separately into the board.
* If p_on_front is false, the component will be placed on the back side,
* and p_package_back is used instead of p_package_front.
*/
@ -62,7 +63,7 @@ public class Components implements java.io.Serializable
/**
* Adds a component to this object.
* The items of the component have to be inserted seperately into the eu.mihosoft.freerouting.board.
* The items of the component have to be inserted separately into the board.
* If p_on_front is false, the component will be placed on the back side.
* The component name is generated internally.
*/
@ -100,13 +101,13 @@ public class Components implements java.io.Serializable
Component result = component_arr.elementAt(p_component_no - 1);
if (result != null && result.no != p_component_no)
{
System.out.println("Components.get: inconsistent component number");
FRLogger.warn("Components.get: inconsistent component number");
}
return result;
}
/**
* Returns the number of components on the eu.mihosoft.freerouting.board.
* Returns the number of components on the board.
*/
public int count()
{
@ -169,7 +170,7 @@ public class Components implements java.io.Serializable
/**
* Moves the component with number p_component_no.
* Works contrary to Component.translate_by with the undo algorithm of the eu.mihosoft.freerouting.board.
* Works contrary to Component.translate_by with the undo algorithm of the board.
*/
public void move(int p_component_no, eu.mihosoft.freerouting.geometry.planar.Vector p_vector )
{
@ -180,7 +181,7 @@ public class Components implements java.io.Serializable
/**
* Turns the component with number p_component_no by p_factor times 90 degree around p_pole.
* Works contrary to Component.turn_90_degree with the undo algorithm of the eu.mihosoft.freerouting.board.
* Works contrary to Component.turn_90_degree with the undo algorithm of the board.
*/
public void turn_90_degree(int p_component_no, int p_factor, IntPoint p_pole)
{
@ -191,7 +192,7 @@ public class Components implements java.io.Serializable
/**
* Rotates the component with number p_component_no by p_rotation_in_degree around p_pole.
* Works contrary to Component.rotate with the undo algorithm of the eu.mihosoft.freerouting.board.
* Works contrary to Component.rotate with the undo algorithm of the board.
*/
public void rotate (int p_component_no, double p_rotation_in_degree, IntPoint p_pole)
{
@ -201,9 +202,9 @@ public class Components implements java.io.Serializable
}
/**
* Changes the placement side of the component the component with numberp_component_no and
* Changes the placement side of the component the component with number p_component_no and
* mirrors it at the vertical line through p_pole.
* Works contrary to Component.change_side the undo algorithm of the eu.mihosoft.freerouting.board.
* Works contrary to Component.change_side the undo algorithm of the board.
*/
public void change_side(int p_component_no, IntPoint p_pole)
{

View File

@ -30,6 +30,7 @@ import eu.mihosoft.freerouting.geometry.planar.Point;
import eu.mihosoft.freerouting.geometry.planar.Vector;
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
import eu.mihosoft.freerouting.geometry.planar.TileShape;
import eu.mihosoft.freerouting.logger.FRLogger;
import java.util.Set;
import java.util.TreeSet;
@ -37,7 +38,7 @@ import java.util.TreeSet;
/**
* A ObstacleArea, which can be electrically conected to other items.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class ConductionArea extends ObstacleArea implements Connectable
{
@ -56,7 +57,7 @@ public class ConductionArea extends ObstacleArea implements Connectable
{
if (this.net_count() != 1)
{
System.out.println("ConductionArea.copy not yet implemented for areas with more than 1 net");
FRLogger.warn("ConductionArea.copy not yet implemented for areas with more than 1 net");
return null;
}
return new ConductionArea(get_relative_area(), get_layer(), get_translation(), get_rotation_in_degree(),
@ -109,7 +110,7 @@ public class ConductionArea extends ObstacleArea implements Connectable
{
if (p_index < 0 || p_index >= this.tree_shape_count(p_search_tree))
{
System.out.println("ConductionArea.get_trace_connection_shape p_index out of range");
FRLogger.warn("ConductionArea.get_trace_connection_shape p_index out of range");
return null;
}
return this.get_tree_shape(p_search_tree, p_index);

View File

@ -24,9 +24,10 @@
package eu.mihosoft.freerouting.board;
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Class for transforming objects between user coordinate space and eu.mihosoft.freerouting.board coordinate space.
* Class for transforming objects between user coordinate space and board coordinate space.
*
* @author Alfons Wirtz
*/
@ -45,7 +46,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Scale a value from the eu.mihosoft.freerouting.board to the user coordinate system.
* Scale a value from the board to the user coordinate system.
*/
public double board_to_user(double p_value)
{
@ -53,7 +54,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Scale a value from the user to the eu.mihosoft.freerouting.board coordinate system.
* Scale a value from the user to the board coordinate system.
*/
public double user_to_board(double p_value)
{
@ -62,7 +63,7 @@ public class CoordinateTransform implements java.io.Serializable
/**
* Transforms a eu.mihosoft.freerouting.geometry.planar.FloatPoint from the eu.mihosoft.freerouting.board coordinate space
* Transforms a geometry.planar.FloatPoint from the board coordinate space
* to the user coordinate space.
*/
public FloatPoint board_to_user(FloatPoint p_point)
@ -71,8 +72,8 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms a eu.mihosoft.freerouting.geometry.planar.FloatPoint from the user coordinate space.
* to the eu.mihosoft.freerouting.board coordinate space.
* Transforms a geometry.planar.FloatPoint from the user coordinate space.
* to the board coordinate space.
*/
public FloatPoint user_to_board(FloatPoint p_point)
{
@ -96,7 +97,7 @@ public class CoordinateTransform implements java.io.Serializable
}
else
{
System.out.println("CoordinateTransform.board_to_user not yet implemented for p_shape");
FRLogger.warn("CoordinateTransform.board_to_user not yet implemented for p_shape");
result = null;
}
return result;
@ -132,13 +133,13 @@ public class CoordinateTransform implements java.io.Serializable
/** The factor of the user unit */
public final double user_unit_factor;
/** The unit used for eu.mihosoft.freerouting.board coordinates */
/** The unit used for board coordinates */
public final Unit board_unit;
/** The factor of the eu.mihosoft.freerouting.board unit */
/** The factor of the board unit */
public final double board_unit_factor;
/** The factor used for transforming coordinates between user coordinate space and eu.mihosoft.freerouting.board coordinate space */
/** The factor used for transforming coordinates between user coordinate space and board coordinate space */
private final double scale_factor;
}

View File

@ -38,11 +38,12 @@ import java.util.Set;
import java.util.TreeSet;
import eu.mihosoft.freerouting.library.Padstack;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Common superclass for Pins and Vias
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public abstract class DrillItem extends Item implements Connectable, java.io.Serializable
{
@ -273,7 +274,7 @@ public abstract class DrillItem extends Item implements Connectable, java.io.Ser
int to_layer = last_layer();
if (p_layer < from_layer || p_layer > to_layer)
{
System.out.println("DrillItem.get_tree_shape_on_layer: p_layer out of range");
FRLogger.warn("DrillItem.get_tree_shape_on_layer: p_layer out of range");
return null;
}
return get_tree_shape(p_tree, p_layer - from_layer);
@ -285,7 +286,7 @@ public abstract class DrillItem extends Item implements Connectable, java.io.Ser
int to_layer = last_layer();
if (p_layer < from_layer || p_layer > to_layer)
{
System.out.println("DrillItem.get_tile_shape_on_layer: p_layer out of range");
FRLogger.warn("DrillItem.get_tile_shape_on_layer: p_layer out of range");
return null;
}
return get_tile_shape(p_layer - from_layer);
@ -297,7 +298,7 @@ public abstract class DrillItem extends Item implements Connectable, java.io.Ser
int to_layer = last_layer();
if (p_layer < from_layer || p_layer > to_layer)
{
System.out.println("DrillItem.get_shape_on_layer: p_layer out of range");
FRLogger.warn("DrillItem.get_shape_on_layer: p_layer out of range");
return null;
}
return get_shape(p_layer - from_layer);
@ -390,7 +391,7 @@ public abstract class DrillItem extends Item implements Connectable, java.io.Ser
return TileShape.get_instance(this.get_center());
}
/** False, if this drillitem is places on the back side of the eu.mihosoft.freerouting.board */
/** False, if this drillitem is places on the back side of the board */
public boolean is_placed_on_front()
{
return true;

View File

@ -24,9 +24,9 @@
package eu.mihosoft.freerouting.board;
/**
* Sorted fixed states of eu.mihosoft.freerouting.board items. The strongest fixed states came last.
* Sorted fixed states of board items. The strongest fixed states came last.
*
* @author alfons
* @author Alfons Wirtz
*/
public enum FixedState
{

View File

@ -35,6 +35,7 @@ import eu.mihosoft.freerouting.geometry.planar.Vector;
import eu.mihosoft.freerouting.geometry.planar.Line;
import eu.mihosoft.freerouting.geometry.planar.Polyline;
import eu.mihosoft.freerouting.geometry.planar.TileShape;
import eu.mihosoft.freerouting.logger.FRLogger;
import java.util.Collection;
@ -42,7 +43,7 @@ import java.util.Collection;
* Class with functions for checking and inserting pads with eventually
* shoving aside obstacle traces.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class ForcedPadAlgo
{
@ -189,7 +190,7 @@ public class ForcedPadAlgo
{
if (p_pad_shape.is_empty())
{
System.out.println("ShoveTraceAux.forced_pad: p_pad_shape is empty");
FRLogger.warn("ShoveTraceAux.forced_pad: p_pad_shape is empty");
return true;
}
if (!p_pad_shape.is_contained_in(board.get_bounding_box()))
@ -497,7 +498,7 @@ public class ForcedPadAlgo
break;
default:
{
System.out.println("ForcedPadAlgo.in_front_of_pad: p_from_side out of range");
FRLogger.warn("ForcedPadAlgo.in_front_of_pad: p_from_side out of range");
result = true;
}
}

View File

@ -41,7 +41,7 @@ import eu.mihosoft.freerouting.library.Padstack;
/**
* Class with static functions for checking and inserting forced vias.
*
* @author alfons
* @author Alfons Wirtz
*/
public class ForcedViaAlgo
{

View File

@ -35,6 +35,7 @@ import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;
import eu.mihosoft.freerouting.logger.FRLogger;
import eu.mihosoft.freerouting.rules.Nets;
import eu.mihosoft.freerouting.boardgraphics.Drawable;
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
@ -44,7 +45,7 @@ import eu.mihosoft.freerouting.datastructures.ShapeTree;
import eu.mihosoft.freerouting.datastructures.ShapeTree.TreeEntry;
/**
* Basic class of the items on a eu.mihosoft.freerouting.board.
* Basic class of the items on a board.
*
* @author Alfons Wirtz
*/
@ -150,7 +151,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
{
if (this.board == null)
{
System.out.println("Item.get_tile_shape: eu.mihosoft.freerouting.board is null");
FRLogger.warn("Item.get_tile_shape: eu.mihosoft.freerouting.board is null");
return null;
}
return get_tree_shape(this.board.search_tree_manager.get_default_tree(), p_index);
@ -198,7 +199,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
/**
* Returns false, if this item is deleted oor not inserted into
* the eu.mihosoft.freerouting.board.
* the board.
*/
public boolean is_on_the_board()
{
@ -243,25 +244,25 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
/**
* Translates the shapes of this item by p_vector.
* Does not move the item in the eu.mihosoft.freerouting.board.
* Does not move the item in the board.
*/
public abstract void translate_by(Vector p_vector);
/**
* Turns this Item by p_factor times 90 degree around p_pole.
* Does not update the item in the eu.mihosoft.freerouting.board.
* Does not update the item in the board.
*/
public abstract void turn_90_degree(int p_factor, IntPoint p_pole);
/**
* Rotates this Item by p_angle_in_degree around p_pole.
* Does not update the item in the eu.mihosoft.freerouting.board.
* Does not update the item in the board.
*/
public abstract void rotate_approx(double p_angle_in_degree, FloatPoint p_pole);
/**
* Changes the placement side of this Item and mirrors it at the vertical line through p_pole.
* Does not update the item in the eu.mihosoft.freerouting.board.
* Does not update the item in the board.
*/
public abstract void change_placement_side(IntPoint p_pole);
@ -271,7 +272,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
public abstract IntBox bounding_box();
/**
* Translates this item by p_vector in the eu.mihosoft.freerouting.board.
* Translates this item by p_vector in the board.
*/
public void move_by(Vector p_vector)
{
@ -421,7 +422,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
TileShape shape_2 = curr_item.get_tree_shape(default_tree, curr_entry.shape_index_in_object);
if (shape_1 == null || shape_2 == null)
{
System.out.println("Item.clearance_violations: unexpected null shape");
FRLogger.warn("Item.clearance_violations: unexpected null shape");
continue;
}
if (!this.board.search_tree_manager.is_clearance_compensation_used())
@ -867,7 +868,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
TileShape curr_shape = this.get_tile_shape(i);
if (curr_shape.is_empty())
{
System.out.println("Item.validate: shape is empty");
FRLogger.warn("Item.validate: shape is empty");
result = false;
}
}
@ -1067,7 +1068,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
{
if (p_index < 0 || p_index >= this.board.rules.clearance_matrix.get_class_count())
{
System.out.println("Item.set_clearance_class_no: p_index out of range");
FRLogger.warn("Item.set_clearance_class_no: p_index out of range");
return;
}
clearance_class = p_index;
@ -1080,7 +1081,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
{
if (p_index < 0 || p_index >= this.board.rules.clearance_matrix.get_class_count())
{
System.out.println("Item.set_clearance_class_no: p_index out of range");
FRLogger.warn("Item.set_clearance_class_no: p_index out of range");
return;
}
clearance_class = p_index;
@ -1113,7 +1114,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
if (p_net_no > board.rules.nets.max_net_no())
{
System.out.println("Item.assign_net_no: p_net_no to big");
FRLogger.warn("Item.assign_net_no: p_net_no to big");
return;
}
board.item_list.save_for_undo(this);
@ -1129,7 +1130,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
else if (net_no_arr.length > 1)
{
System.out.println("Item.assign_net_no: unexpected net_count > 1");
FRLogger.warn("Item.assign_net_no: unexpected net_count > 1");
}
net_no_arr[0] = p_net_no;
}
@ -1197,7 +1198,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
if (this.search_trees_info == null)
{
System.out.println("Item.set_precalculated_tree_shapes search_trees_info not allocated");
FRLogger.warn("Item.set_precalculated_tree_shapes search_trees_info not allocated");
return;
}
this.search_trees_info.set_precalculated_tree_shapes(p_shapes, p_tree);
@ -1212,7 +1213,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
/**
* Gets the information for the eu.mihosoft.freerouting.autoroute algorithm.
* Gets the information for the autoroute algorithm.
* Creates it, if it does not yet exist.
*/
public eu.mihosoft.freerouting.autoroute.ItemAutorouteInfo get_autoroute_info()
@ -1225,7 +1226,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
/**
* Gets the information for the eu.mihosoft.freerouting.autoroute algorithm.
* Gets the information for the autoroute algorithm.
*/
public eu.mihosoft.freerouting.autoroute.ItemAutorouteInfo get_autoroute_info_pur()
{
@ -1233,7 +1234,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
/**
* Clears the data allocated for the eu.mihosoft.freerouting.autoroute algorithm.
* Clears the data allocated for the autoroute algorithm.
*/
public void clear_autoroute_info()
{
@ -1269,7 +1270,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
/**
* Internal funktion used in the implementation of print_info
* Internal function used in the implementation of print_info
*/
protected void print_clearance_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
{
@ -1298,7 +1299,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
/**
* Internal funktion used in the implementation of print_info
* Internal function used in the implementation of print_info
*/
protected void print_contact_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
{
@ -1314,7 +1315,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
/**
* Internal funktion used in the implementation of print_info
* Internal function used in the implementation of print_info
*/
protected void print_clearance_violation_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
{
@ -1340,7 +1341,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
/**
* Internal funktion used in the implementation of print_info
* Internal function used in the implementation of print_info
*/
protected void print_connectable_item_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
{
@ -1352,7 +1353,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
}
/**
* Internal funktion used in the implementation of print_info
* Internal function used in the implementation of print_info
*/
protected void print_item_info(ObjectInfoPanel p_window, java.util.Locale p_locale)
{
@ -1453,7 +1454,7 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
* to other items
*/
private int clearance_class;
/** The eu.mihosoft.freerouting.board this Item is on */
/** The board this Item is on */
transient public BasicBoard board;
/** The nets, to which this item belongs */
int[] net_no_arr;
@ -1464,10 +1465,10 @@ public abstract class Item implements Drawable, SearchTreeObject, ObjectInfoPane
private int component_no = 0;
private final int id_no;
/**
* Folse, if the item is deleted or not inserted into the eu.mihosoft.freerouting.board
* False, if the item is deleted or not inserted into the board
*/
private boolean on_the_board = false;
/** Temporary data used in the eu.mihosoft.freerouting.autoroute algorithm. */
/** Temporary data used in the autoroute algorithm. */
transient private eu.mihosoft.freerouting.autoroute.ItemAutorouteInfo autoroute_info = null;
private static double PROTECT_FANOUT_LENGTH = 400;

View File

@ -23,10 +23,12 @@
package eu.mihosoft.freerouting.board;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Creates unique Item identication nunbers.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class ItemIdNoGenerator implements eu.mihosoft.freerouting.datastructures.IdNoGenerator, java.io.Serializable
{
@ -47,7 +49,7 @@ public class ItemIdNoGenerator implements eu.mihosoft.freerouting.datastructures
{
if (last_generated_id_no >= c_max_id_no)
{
System.out.println("IdNoGenerator: danger of overflow, please regenerate id numbers from scratch!");
FRLogger.warn("IdNoGenerator: danger of overflow, please regenerate id numbers from scratch!");
}
++last_generated_id_no;
return last_generated_id_no;

View File

@ -32,7 +32,7 @@ import eu.mihosoft.freerouting.datastructures.ShapeTree;
import eu.mihosoft.freerouting.geometry.planar.TileShape;
/**
* Stores information about the search trees of the eu.mihosoft.freerouting.board items,
* Stores information about the search trees of the board items,
* which is precalculated for performance reasons.
*
* @author Alfons Wirtz

View File

@ -27,7 +27,7 @@ import java.util.Set;
import java.util.TreeSet;
/**
* Filter for selecting items on the eu.mihosoft.freerouting.board.
* Filter for selecting items on the board.
*
* @author Alfons Wirtz
*/

View File

@ -24,9 +24,9 @@
package eu.mihosoft.freerouting.board;
/**
* Describes the structure of a eu.mihosoft.freerouting.board layer.
* Describes the structure of a board layer.
*
* @author alfons
* @author Alfons Wirtz
*/
public class Layer implements java.io.Serializable
{

View File

@ -24,9 +24,9 @@
package eu.mihosoft.freerouting.board;
/**
* Describes the layer structure of the eu.mihosoft.freerouting.board.
* Describes the layer structure of the board.
*
* @author alfons
* @author Alfons Wirtz
*/
public class LayerStructure implements java.io.Serializable
{

View File

@ -36,8 +36,8 @@ import java.util.LinkedList;
import eu.mihosoft.freerouting.datastructures.Signum;
/**
* Class for moving a group of items on the eu.mihosoft.freerouting.board
* @author Alfons Wirtz
* Class for moving a group of items on the board
* @author Alfons Wirtz
*/
public class MoveComponent
{

View File

@ -24,7 +24,7 @@
package eu.mihosoft.freerouting.board;
/**
* Output window for printing information about eu.mihosoft.freerouting.board objects.
* Output window for printing information about board objects.
*
* @author Alfons Wirtz
*/

View File

@ -30,10 +30,11 @@ import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
import java.awt.Color;
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
* An item on the eu.mihosoft.freerouting.board with an relative_area shape, for example keepout, conduction relative_area
* An item on the board with an relative_area shape, for example keepout, conduction relative_area
*
*
*
@ -81,7 +82,7 @@ public class ObstacleArea extends Item implements java.io.Serializable
{
if (this.relative_area == null)
{
System.out.println("ObstacleArea.get_area: area is null");
FRLogger.warn("ObstacleArea.get_area: area is null");
return null;
}
Area turned_area = this.relative_area;
@ -171,7 +172,7 @@ public class ObstacleArea extends Item implements java.io.Serializable
TileShape[] tile_shapes = this.split_to_convex();
if (tile_shapes == null || p_no < 0 || p_no >= tile_shapes.length)
{
System.out.println("ConvexObstacle.get_tile_shape: p_no out of range");
FRLogger.warn("ConvexObstacle.get_tile_shape: p_no out of range");
return null;
}
return tile_shapes[p_no];
@ -345,7 +346,7 @@ public class ObstacleArea extends Item implements java.io.Serializable
{
if (this.relative_area == null)
{
System.out.println("ObstacleArea.split_to_convex: area is null");
FRLogger.warn("ObstacleArea.split_to_convex: area is null");
return null;
}
return this.get_area().split_to_convex();

View File

@ -36,6 +36,7 @@ import eu.mihosoft.freerouting.geometry.planar.FloatLine;
import eu.mihosoft.freerouting.geometry.planar.Side;
import eu.mihosoft.freerouting.autoroute.AutorouteControl.ExpansionCostFactor;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Contains functions for optimizing and improving via locations.
@ -62,7 +63,7 @@ public class OptViaAlgo
{
if (p_board.get_test_level().ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("OptViaAlgo.opt_via_location: probably endless loop") ;
FRLogger.warn("OptViaAlgo.opt_via_location: probably endless loop") ;
}
return false;
}
@ -133,7 +134,7 @@ public class OptViaAlgo
}
else
{
System.out.println("OptViaAlgo.opt_via_location: incorrect first contact");
FRLogger.warn("OptViaAlgo.opt_via_location: incorrect first contact");
return false;
}
@ -148,7 +149,7 @@ public class OptViaAlgo
}
else
{
System.out.println("OptViaAlgo.opt_via_location: incorrect second contact");
FRLogger.warn("OptViaAlgo.opt_via_location: incorrect second contact");
return false;
}
@ -178,7 +179,7 @@ public class OptViaAlgo
Vector delta = new_location.difference_by(via_center);
if (!MoveDrillItemAlgo.insert(p_via, delta, 9, 9, null, p_board))
{
System.out.println("OptViaAlgo.opt_via_location: move via failed");
FRLogger.warn("OptViaAlgo.opt_via_location: move via failed");
return false;
}
ItemSelectionFilter filter = new ItemSelectionFilter(ItemSelectionFilter.SelectableChoices.TRACES);
@ -213,7 +214,7 @@ public class OptViaAlgo
{
if (p_board.get_test_level().ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("OptViaAlgo.opt_plane_or_fanout_via: probably endless loop") ;
FRLogger.warn("OptViaAlgo.opt_plane_or_fanout_via: probably endless loop") ;
}
return false;
}
@ -263,7 +264,7 @@ public class OptViaAlgo
}
else
{
System.out.println("OptViaAlgo.opt_plane_or_fanout_via: unconsistant contact");
FRLogger.warn("OptViaAlgo.opt_plane_or_fanout_via: unconsistant contact");
return false;
}
Polyline trace_polyline = contact_trace.polyline();
@ -355,7 +356,7 @@ public class OptViaAlgo
Vector diff_vector = new_via_location.difference_by(via_center);
if (!MoveDrillItemAlgo.insert(p_via, diff_vector, 9, 9, null, p_board))
{
System.out.println("OptViaAlgo.opt_plane_or_fanout_via: move via failed");
FRLogger.warn("OptViaAlgo.opt_plane_or_fanout_via: move via failed");
return false;
}
ItemSelectionFilter filter = new ItemSelectionFilter(ItemSelectionFilter.SelectableChoices.TRACES);
@ -448,7 +449,7 @@ public class OptViaAlgo
{
if (p_board.get_test_level() == TestLevel.ALL_DEBUGGING_OUTPUT)
{
System.out.println("OptViaAlgo.reposition_via: from_location equal p_to_location");
FRLogger.warn("OptViaAlgo.reposition_via: from_location equal p_to_location");
}
return false;
}

View File

@ -37,12 +37,13 @@ import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
import eu.mihosoft.freerouting.library.Package;
import eu.mihosoft.freerouting.library.Padstack;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Class describing the functionality of an electrical Item on the eu.mihosoft.freerouting.board
* Class describing the functionality of an electrical Item on the board
* with a shape on 1 or several layers.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class Pin extends DrillItem implements java.io.Serializable
{
@ -121,7 +122,7 @@ public class Pin extends DrillItem implements java.io.Serializable
}
if (curr_shape == null)
{
System.out.println("Pin: At least 1 shape != null expected");
FRLogger.warn("Pin: At least 1 shape != null expected");
}
else if (!curr_shape.contains_inside(pin_center))
{
@ -137,7 +138,7 @@ public class Pin extends DrillItem implements java.io.Serializable
Component component = board.components.get(get_component_no());
if (component == null)
{
System.out.println("Pin.get_padstack; component not found");
FRLogger.warn("Pin.get_padstack; component not found");
return null;
}
int padstack_no = component.get_package().get_pin(pin_no).padstack_no;
@ -163,14 +164,14 @@ public class Pin extends DrillItem implements java.io.Serializable
Component component = board.components.get(this.get_component_no());
if (component == null)
{
System.out.println("Pin.name: component not found");
FRLogger.warn("Pin.name: component not found");
return null;
}
return component.get_package().get_pin(pin_no).name;
}
/**
* Gets index of this pin in the eu.mihosoft.freerouting.library package of the pins component.
* Gets index of this pin in the library package of the pins component.
*/
public int get_index_in_package()
{
@ -189,19 +190,19 @@ public class Pin extends DrillItem implements java.io.Serializable
Component component = board.components.get(this.get_component_no());
if (component == null)
{
System.out.println("Pin.get_shape: component not found");
FRLogger.warn("Pin.get_shape: component not found");
return null;
}
Package lib_package = component.get_package();
if (lib_package == null)
{
System.out.println("Pin.get_shape: package not found");
FRLogger.warn("Pin.get_shape: package not found");
return null;
}
Package.Pin package_pin = lib_package.get_pin(this.pin_no);
if (package_pin == null)
{
System.out.println("Pin.get_shape: pin_no out of range");
FRLogger.warn("Pin.get_shape: pin_no out of range");
return null;
}
Vector rel_location = package_pin.relative_location;
@ -364,7 +365,7 @@ public class Pin extends DrillItem implements java.io.Serializable
int intersecting_border_line_no = pad_shape.intersecting_border_line_no(pin_center, curr_exit_direction);
if (intersecting_border_line_no < 0)
{
System.out.println("Pin.get_trace_exit_restrictions: border line not found");
FRLogger.warn("Pin.get_trace_exit_restrictions: border line not found");
continue;
}
Line curr_exit_line = new Line(pin_center, curr_exit_direction);
@ -489,7 +490,7 @@ public class Pin extends DrillItem implements java.io.Serializable
}
else
{
System.out.println("Pin.get_swappable_pins: swappable pin not found");
FRLogger.warn("Pin.get_swappable_pins: swappable pin not found");
}
}
}
@ -533,7 +534,7 @@ public class Pin extends DrillItem implements java.io.Serializable
{
if (this.net_count() > 1 || p_other.net_count() > 1)
{
System.out.println("Pin.swap not yet implemented for pins belonging to more than 1 net ");
FRLogger.warn("Pin.swap not yet implemented for pins belonging to more than 1 net ");
return false;
}
int this_net_no;
@ -584,7 +585,7 @@ public class Pin extends DrillItem implements java.io.Serializable
}
/** False, if this drillitem is places on the back side of the eu.mihosoft.freerouting.board */
/** False, if this drillitem is places on the back side of the board */
public boolean is_placed_on_front()
{
boolean result = true;
@ -605,13 +606,13 @@ public class Pin extends DrillItem implements java.io.Serializable
Shape padstack_shape = this.get_padstack().get_shape(padstack_layer);
if (padstack_shape == null)
{
System.out.println("Pin.get_min_width: padstack_shape is null");
FRLogger.warn("Pin.get_min_width: padstack_shape is null");
return 0;
}
eu.mihosoft.freerouting.geometry.planar.IntBox padstack_bounding_box = padstack_shape.bounding_box();
if (padstack_bounding_box == null)
{
System.out.println("Pin.get_min_width: padstack_bounding_box is null");
FRLogger.warn("Pin.get_min_width: padstack_bounding_box is null");
return 0;
}
return padstack_bounding_box.min_width();
@ -637,13 +638,13 @@ public class Pin extends DrillItem implements java.io.Serializable
Shape padstack_shape = this.get_padstack().get_shape(padstack_layer);
if (padstack_shape == null)
{
System.out.println("Pin.get_max_width: padstack_shape is null");
FRLogger.warn("Pin.get_max_width: padstack_shape is null");
return 0;
}
eu.mihosoft.freerouting.geometry.planar.IntBox padstack_bounding_box = padstack_shape.bounding_box();
if (padstack_bounding_box == null)
{
System.out.println("Pin.get_max_width: padstack_bounding_box is null");
FRLogger.warn("Pin.get_max_width: padstack_bounding_box is null");
return 0;
}
return padstack_bounding_box.max_width();

View File

@ -41,6 +41,7 @@ import java.util.Iterator;
import java.util.LinkedList;
import eu.mihosoft.freerouting.boardgraphics.GraphicsContext;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
@ -63,7 +64,7 @@ public class PolylineTrace extends Trace implements java.io.Serializable
p_id_no, p_group_no, p_fixed_state, p_board);
if (p_polyline.arr.length < 3)
{
System.out.println("PolylineTrace: p_polyline.arr.length >= 3 expected");
FRLogger.warn("PolylineTrace: p_polyline.arr.length >= 3 expected");
}
lines = p_polyline;
}
@ -580,7 +581,7 @@ public class PolylineTrace extends Trace implements java.io.Serializable
if (found_trace_split)
{
// reread the overlapping tree entries and reset the iterator,
// because the eu.mihosoft.freerouting.board has changed
// because the board has changed
default_tree.overlapping_tree_entries(curr_shape, get_layer(), overlapping_tree_entries);
it = overlapping_tree_entries.iterator();
break;
@ -771,7 +772,7 @@ public class PolylineTrace extends Trace implements java.io.Serializable
}
if (split_polylines.length != 2)
{
System.out.println("PolylineTrace.split: array of length 2 expected for split_polylines");
FRLogger.warn("PolylineTrace.split: array of length 2 expected for split_polylines");
return null;
}
if (split_inside_drill_pad_prohibited(p_line_no, p_new_end_line))
@ -953,7 +954,7 @@ public class PolylineTrace extends Trace implements java.io.Serializable
{
if (p_index < 0 || p_index >= this.tile_shape_count())
{
System.out.println("PolylineTrace.get_trace_connection_shape p_index out of range");
FRLogger.warn("PolylineTrace.get_trace_connection_shape p_index out of range");
return null;
}
LineSegment curr_line_segment = new LineSegment(this.lines, p_index + 1);

View File

@ -26,7 +26,7 @@ package eu.mihosoft.freerouting.board;
import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
/**
* Shape class used for printing a eu.mihosoft.freerouting.geometry.planar.Shape after transforming it to user coordinates.
* Shape class used for printing a geometry.planar.Shape after transforming it to user coordinates.
*
* @author Alfons Wirtz
*/

View File

@ -40,11 +40,12 @@ import eu.mihosoft.freerouting.datastructures.Stoppable;
import eu.mihosoft.freerouting.datastructures.TimeLimit;
import eu.mihosoft.freerouting.autoroute.AutorouteControl.ExpansionCostFactor;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Class with functionality for optimising traces and vias.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public abstract class PullTightAlgo
{
@ -204,7 +205,7 @@ public abstract class PullTightAlgo
boolean time_limit_exceeded = this.time_limit.limit_exceeded();
if (time_limit_exceeded && this.board.get_test_level().ordinal() >= TestLevel.CRITICAL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("PullTightAlgo.is_stop_requested: time limit exceeded");
FRLogger.warn("PullTightAlgo.is_stop_requested: time limit exceeded");
}
return time_limit_exceeded;
}

View File

@ -38,7 +38,7 @@ import eu.mihosoft.freerouting.datastructures.Signum;
/**
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
class PullTightAlgo45 extends PullTightAlgo
{

View File

@ -33,7 +33,7 @@ import eu.mihosoft.freerouting.geometry.planar.TileShape;
/**
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
class PullTightAlgo90 extends PullTightAlgo
{

View File

@ -40,6 +40,7 @@ import eu.mihosoft.freerouting.datastructures.Stoppable;
import eu.mihosoft.freerouting.datastructures.TimeLimit;
import eu.mihosoft.freerouting.datastructures.ShapeTree.TreeEntry;
import eu.mihosoft.freerouting.logger.FRLogger;
import eu.mihosoft.freerouting.rules.ViaInfo;
import eu.mihosoft.freerouting.rules.BoardRules;
@ -50,7 +51,7 @@ import eu.mihosoft.freerouting.autoroute.CompleteFreeSpaceExpansionRoom;
/**
*
* Contains higher level functions of a eu.mihosoft.freerouting.board
* Contains higher level functions of a board
*
* @author Alfons Wirtz
*/
@ -186,7 +187,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
}
/**
* marks the whole eu.mihosoft.freerouting.board as changed
* marks the whole board as changed
*/
public void mark_all_changed_area()
{
@ -707,7 +708,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
}
if (!(from_corner instanceof IntPoint && to_corner instanceof IntPoint))
{
System.out.println("RoutingBoard.insert_forced_trace_segment: only implemented for IntPoints");
FRLogger.warn("RoutingBoard.insert_forced_trace_segment: only implemented for IntPoints");
return from_corner;
}
start_marking_changed_area();
@ -809,7 +810,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
Point curr_last_corner = new_polyline.last_corner();
if (!(curr_last_corner instanceof IntPoint))
{
System.out.println("insert_forced_trace_segment: IntPoint expected");
FRLogger.warn("insert_forced_trace_segment: IntPoint expected");
return from_corner;
}
new_corner = curr_last_corner;
@ -846,7 +847,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
p_max_via_recursion_depth, p_max_spring_over_recursion_depth);
if (!insert_ok)
{
System.out.println("shove trace failed");
FRLogger.warn("shove trace failed");
return null;
}
}
@ -905,8 +906,8 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
}
/**
* Initialises the eu.mihosoft.freerouting.autoroute database for routing a connection.
* If p_retain_autoroute_database, the eu.mihosoft.freerouting.autoroute database is retained and maintained after
* Initialises the autoroute database for routing a connection.
* If p_retain_autoroute_database, the autoroute database is retained and maintained after
* the algorithm for performance reasons.
*/
public AutorouteEngine init_autoroute(int p_net_no, int p_trace_clearance_class_no,
@ -921,7 +922,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
}
/**
* Clears the eu.mihosoft.freerouting.autoroute database in case it was retained.
* Clears the autoroute database in case it was retained.
*/
public void finish_autoroute()
{
@ -945,7 +946,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
}
if (p_item.net_count() > 1)
{
System.out.println("RoutingBoard.eu.mihosoft.freerouting.autoroute: net_count > 1 not yet implemented");
FRLogger.warn("RoutingBoard.autoroute: net_count > 1 not yet implemented");
}
int route_net_no = p_item.get_net_no(0);
AutorouteControl ctrl_settings = new AutorouteControl(this, route_net_no, p_settings, p_via_costs, p_settings.autoroute_settings.get_trace_cost_arr());
@ -1203,7 +1204,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
}
/**
* Sets, if all conduction areas on the eu.mihosoft.freerouting.board are obstacles for route of foreign nets.
* Sets, if all conduction areas on the board are obstacles for route of foreign nets.
*/
public void change_conduction_is_obstacle(boolean p_value)
{
@ -1212,7 +1213,7 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
return; // no muultiply
}
boolean something_changed = false;
// Change the is_obstacle property of all conduction areas of the eu.mihosoft.freerouting.board.
// Change the is_obstacle property of all conduction areas of the board.
Iterator<UndoableObjects.UndoableObjectNode> it = item_list.start_read_object();
for (;;)
{
@ -1370,8 +1371,8 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
}
/**
* Sets, if the eu.mihosoft.freerouting.autoroute database has to be maintained outside the outoroute algorithm
* while changing items on rhe eu.mihosoft.freerouting.board.
* Sets, if the autoroute database has to be maintained outside the outoroute algorithm
* while changing items on rhe board.
*/
void set_maintaining_autoroute_database(boolean p_value)
{
@ -1386,8 +1387,8 @@ public class RoutingBoard extends BasicBoard implements java.io.Serializable
}
/**
* Returns, if the eu.mihosoft.freerouting.autoroute database is maintained outside the outoroute algorithm
* while changing items on rhe eu.mihosoft.freerouting.board.
* Returns, if the autoroute database is maintained outside the outoroute algorithm
* while changing items on rhe board.
*/
boolean is_maintaining_autoroute_database()
{

View File

@ -33,6 +33,7 @@ import eu.mihosoft.freerouting.datastructures.ShapeTree;
import eu.mihosoft.freerouting.geometry.planar.FortyfiveDegreeBoundingDirections;
import eu.mihosoft.freerouting.geometry.planar.Polyline;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
@ -88,7 +89,7 @@ public class SearchTreeManager
}
/**
* Returns the default tree used in eu.mihosoft.freerouting.interactive routing.
* Returns the default tree used in interactive routing.
*/
public ShapeSearchTree get_default_tree()
{
@ -176,7 +177,7 @@ public class SearchTreeManager
Iterator<ShapeSearchTree> it = this.compensated_search_trees.iterator();
if (p_no == default_tree.compensated_clearance_class_no)
{
System.out.println("SearchtreeManager.clearance_class_removed: unable to remove default tree");
FRLogger.warn("SearchtreeManager.clearance_class_removed: unable to remove default tree");
return;
}
while(it.hasNext())
@ -232,7 +233,7 @@ public class SearchTreeManager
}
/**
* Clears all compensated trees used in the eu.mihosoft.freerouting.autoroute algorithm apart from the default tree.
* Clears all compensated trees used in the autoroute algorithm apart from the default tree.
*/
public void reset_compensated_trees()
{
@ -258,7 +259,7 @@ public class SearchTreeManager
{
if (this.board == null)
{
System.out.println("SearchtreeManager.remove_all_board_items: eu.mihosoft.freerouting.board is null");
FRLogger.warn("SearchtreeManager.remove_all_board_items: eu.mihosoft.freerouting.board is null");
return;
}
Iterator<UndoableObjects.UndoableObjectNode> it = this.board.item_list.start_read_object();
@ -277,7 +278,7 @@ public class SearchTreeManager
{
if (this.board == null)
{
System.out.println("SearchtreeManager.insert_all_board_items: eu.mihosoft.freerouting.board is null");
FRLogger.warn("SearchtreeManager.insert_all_board_items: eu.mihosoft.freerouting.board is null");
return;
}
Iterator<UndoableObjects.UndoableObjectNode> it = this.board.item_list.start_read_object();

View File

@ -24,9 +24,9 @@
package eu.mihosoft.freerouting.board;
/**
* Common ShapeSearchTree functionality for eu.mihosoft.freerouting.board.Items and eu.mihosoft.freerouting.autoroute.ExpansionRooms
* Common ShapeSearchTree functionality for board.Items and autoroute.ExpansionRooms
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public interface SearchTreeObject extends eu.mihosoft.freerouting.datastructures.ShapeTree.Storable
{

View File

@ -43,6 +43,7 @@ import java.util.LinkedList;
import java.util.Set;
import java.util.TreeSet;
import eu.mihosoft.freerouting.logger.FRLogger;
import eu.mihosoft.freerouting.rules.ClearanceMatrix;
import eu.mihosoft.freerouting.datastructures.Signum;
@ -53,7 +54,7 @@ import eu.mihosoft.freerouting.autoroute.CompleteFreeSpaceExpansionRoom;
/**
*
* Elementary geometric search functions making direct use
* of the MinAreaTree in the package eu.mihosoft.freerouting.datastructures.
* of the MinAreaTree in the package datastructures.
*
*
* @author Alfons Wirtz
@ -401,13 +402,13 @@ public class ShapeSearchTree extends eu.mihosoft.freerouting.datastructures.MinA
}
if (p_tree_entries == null)
{
System.out.println("eu.mihosoft.freerouting.board.ShapeSearchTree.overlaps: p_obstacle_entries is null");
FRLogger.warn("ShapeSearchTree.overlaps: p_obstacle_entries is null");
return;
}
RegularTileShape bounds = p_shape.bounding_shape(bounding_directions);
if (bounds == null)
{
System.out.println("eu.mihosoft.freerouting.board.ShapeSearchTree.overlaps: p_shape not bounded");
FRLogger.warn("ShapeSearchTree.overlaps: p_shape not bounded");
return;
}
Collection<Leaf> tmp_list = this.overlaps(bounds);
@ -475,14 +476,14 @@ public class ShapeSearchTree extends eu.mihosoft.freerouting.datastructures.MinA
}
if (p_obstacle_entries == null)
{
System.out.println("eu.mihosoft.freerouting.board.ShapeSearchTree.overlaps_with_clearance: p_obstacle_entries is null");
FRLogger.warn("ShapeSearchTree.overlaps_with_clearance: p_obstacle_entries is null");
return;
}
ClearanceMatrix cl_matrix = board.rules.clearance_matrix;
RegularTileShape bounds = p_shape.bounding_shape(bounding_directions);
if (bounds == null)
{
System.out.println("eu.mihosoft.freerouting.board.ShapeSearchTree.overlaps_with_clearance: p_shape is not bounded");
FRLogger.warn("ShapeSearchTree.overlaps_with_clearance: p_shape is not bounded");
bounds = board.get_bounding_box();
}
int max_clearance =
@ -644,7 +645,7 @@ public class ShapeSearchTree extends eu.mihosoft.freerouting.datastructures.MinA
{
if (p_room.get_contained_shape() == null)
{
System.out.println("ShapeSearchTree.complete_shape: p_shape_to_be_contained != null expected");
FRLogger.warn("ShapeSearchTree.complete_shape: p_shape_to_be_contained != null expected");
return new LinkedList<IncompleteFreeSpaceExpansionRoom>();
}
if (this.root == null)
@ -756,7 +757,7 @@ public class ShapeSearchTree extends eu.mihosoft.freerouting.datastructures.MinA
{
if (this.board.get_test_level().ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("ShapeSearchTree.restrain_shape: p_shape_to_be_contained is empty");
FRLogger.warn("ShapeSearchTree.restrain_shape: p_shape_to_be_contained is empty");
}
return result;
}
@ -968,7 +969,7 @@ public class ShapeSearchTree extends eu.mihosoft.freerouting.datastructures.MinA
int offset_width = this.clearance_compensation_value(p_drill_item.clearance_class_no(), p_drill_item.shape_layer(i));
if (curr_tile_shape == null)
{
System.out.println("ShapeSearchTree.calculate_tree_shapes: shape is null");
FRLogger.warn("ShapeSearchTree.calculate_tree_shapes: shape is null");
}
else
{
@ -1158,7 +1159,7 @@ public class ShapeSearchTree extends eu.mihosoft.freerouting.datastructures.MinA
Leaf curr_leaf = curr_tree_entries[i];
if (curr_leaf.shape_index_in_object != i)
{
System.out.println("tree entry inconsistent for Item");
FRLogger.warn("tree entry inconsistent for Item");
return false;
}
}

View File

@ -36,6 +36,7 @@ import eu.mihosoft.freerouting.geometry.planar.Line;
import eu.mihosoft.freerouting.autoroute.IncompleteFreeSpaceExpansionRoom;
import eu.mihosoft.freerouting.autoroute.CompleteFreeSpaceExpansionRoom;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* A special simple ShapeSearchtree, where the shapes are of class IntOctagon.
@ -65,7 +66,7 @@ public class ShapeSearchTree45Degree extends ShapeSearchTree
{
if (!(p_room.get_contained_shape().is_IntOctagon()) && this.board.get_test_level() != TestLevel.RELEASE_VERSION)
{
System.out.println("ShapeSearchTree45Degree.complete_shape: unexpected p_shape_to_be_contained");
FRLogger.warn("ShapeSearchTree45Degree.complete_shape: unexpected p_shape_to_be_contained");
return new LinkedList<IncompleteFreeSpaceExpansionRoom>();
}
IntOctagon shape_to_be_contained = p_room.get_contained_shape().bounding_octagon();
@ -78,7 +79,7 @@ public class ShapeSearchTree45Degree extends ShapeSearchTree
{
if (!(p_room.get_shape() instanceof IntOctagon))
{
System.out.println("ShapeSearchTree45Degree.complete_shape: p_start_shape of type IntOctagon expected");
FRLogger.warn("ShapeSearchTree45Degree.complete_shape: p_start_shape of type IntOctagon expected");
return new LinkedList<IncompleteFreeSpaceExpansionRoom>();
}
start_shape = p_room.get_shape().bounding_octagon().intersection(start_shape);
@ -249,7 +250,7 @@ public class ShapeSearchTree45Degree extends ShapeSearchTree
{
if (this.board.get_test_level().ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("ShapeSearchTree45Degree.restrain_shape: p_shape_to_be_contained is empty");
FRLogger.warn("ShapeSearchTree45Degree.restrain_shape: p_shape_to_be_contained is empty");
}
return result;
}
@ -369,7 +370,7 @@ public class ShapeSearchTree45Degree extends ShapeSearchTree
}
else
{
System.out.println("ShapeSearchTree45Degree.signed_line_distance: p_obstacle_line_no out of range");
FRLogger.warn("ShapeSearchTree45Degree.signed_line_distance: p_obstacle_line_no out of range");
result = 0;
}
return result;
@ -423,7 +424,7 @@ public class ShapeSearchTree45Degree extends ShapeSearchTree
}
else
{
System.out.println("ShapeSearchTree45Degree.calc_outside_restrained_shape: p_obstacle_line_no out of range");
FRLogger.warn("ShapeSearchTree45Degree.calc_outside_restrained_shape: p_obstacle_line_no out of range");
}
IntOctagon result = new IntOctagon(lx, ly, rx, uy, ulx, lrx, llx, urx);
@ -478,7 +479,7 @@ public class ShapeSearchTree45Degree extends ShapeSearchTree
}
else
{
System.out.println("ShapeSearchTree45Degree.calc_inside_restrained_shape: p_obstacle_line_no out of range");
FRLogger.warn("ShapeSearchTree45Degree.calc_inside_restrained_shape: p_obstacle_line_no out of range");
}
IntOctagon result = new IntOctagon(lx, ly, rx, uy, ulx, lrx, llx, urx);

View File

@ -35,6 +35,7 @@ import eu.mihosoft.freerouting.geometry.planar.Polyline;
import eu.mihosoft.freerouting.autoroute.IncompleteFreeSpaceExpansionRoom;
import eu.mihosoft.freerouting.autoroute.CompleteFreeSpaceExpansionRoom;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* A special simple ShapeSearchtree, where the shapes are of class IntBox.
@ -64,7 +65,7 @@ public class ShapeSearchTree90Degree extends ShapeSearchTree
{
if (!(p_room.get_contained_shape() instanceof IntBox))
{
System.out.println("BoxShapeSearchTree.complete_shape: unexpected p_shape_to_be_contained");
FRLogger.warn("BoxShapeSearchTree.complete_shape: unexpected p_shape_to_be_contained");
return new LinkedList<IncompleteFreeSpaceExpansionRoom>();
}
IntBox shape_to_be_contained = (IntBox) p_room.get_contained_shape();
@ -77,7 +78,7 @@ public class ShapeSearchTree90Degree extends ShapeSearchTree
{
if (!(p_room.get_shape() instanceof IntBox))
{
System.out.println("BoxShapeSearchTree.complete_shape: p_start_shape of type IntBox expected");
FRLogger.warn("BoxShapeSearchTree.complete_shape: p_start_shape of type IntBox expected");
return new LinkedList<IncompleteFreeSpaceExpansionRoom>();
}
start_shape = ((IntBox)p_room.get_shape()).intersection(start_shape);
@ -177,7 +178,7 @@ public class ShapeSearchTree90Degree extends ShapeSearchTree
{
if (this.board.get_test_level().ordinal() >= TestLevel.ALL_DEBUGGING_OUTPUT.ordinal())
{
System.out.println("BoxShapeSearchTree.restrain_shape: p_shape_to_be_contained is empty");
FRLogger.warn("BoxShapeSearchTree.restrain_shape: p_shape_to_be_contained is empty");
}
return result;
}
@ -242,7 +243,7 @@ public class ShapeSearchTree90Degree extends ShapeSearchTree
IntBox is = shape_to_be_contained.intersection(p_obstacle_shape);
if (is.is_empty())
{
System.out.println("BoxShapeSearchTree.restrain_shape: Intersection between obstacle_shape and shape_to_be_contained expected");
FRLogger.warn("BoxShapeSearchTree.restrain_shape: Intersection between obstacle_shape and shape_to_be_contained expected");
return result;
}
IntBox new_shape_1 = null;
@ -303,7 +304,7 @@ public class ShapeSearchTree90Degree extends ShapeSearchTree
int offset_width = this.clearance_compensation_value(p_drill_item.clearance_class_no(), p_drill_item.shape_layer(i));
if (curr_tile_shape == null)
{
System.out.println("BoxShapeSearchTree.calculate_tree_shapes: shape is null");
FRLogger.warn("BoxShapeSearchTree.calculate_tree_shapes: shape is null");
}
else
{

View File

@ -25,6 +25,7 @@ import eu.mihosoft.freerouting.geometry.planar.Line;
import eu.mihosoft.freerouting.geometry.planar.Point;
import eu.mihosoft.freerouting.geometry.planar.Polyline;
import eu.mihosoft.freerouting.geometry.planar.TileShape;
import eu.mihosoft.freerouting.logger.FRLogger;
import java.util.Collection;
import java.util.Iterator;
@ -254,7 +255,7 @@ public class ShapeTraceEntries
{
if (!p_trace.is_on_the_board())
{
System.out.println("ShapeTraceEntries.cutout_trace : trace is deleted");
FRLogger.warn("ShapeTraceEntries.cutout_trace : trace is deleted");
return;
}
ConvexShape offset_shape;
@ -500,7 +501,7 @@ public class ShapeTraceEntries
int edge_count = this.shape.border_line_count();
if (this.from_side.no < 0 || from_side.no >= edge_count)
{
System.out.println("ShapeTraceEntries.resort: from side not calculated");
FRLogger.warn("ShapeTraceEntries.resort: from side not calculated");
return;
}
// resort the intersection points, so that they start in the
@ -521,8 +522,7 @@ public class ShapeTraceEntries
{
from_point_projection = from_side.border_intersection.projection_approx(shape.border_line(from_side.no));
from_point_dist = from_point_projection.distance_square(compare_corner_1);
if (from_point_dist >=
compare_corner_1.distance_square(compare_corner_2))
if (from_point_dist >= compare_corner_1.distance_square(compare_corner_2))
{
from_side = new CalcFromSide(from_side.no, null);
}
@ -769,8 +769,7 @@ public class ShapeTraceEntries
}
if (curr_level != 1)
{
System.out.println(
"ShapeTraceEntries.calculate_stack_levels: curr_level inconsistent");
FRLogger.warn("ShapeTraceEntries.calculate_stack_levels: curr_level inconsistent");
return false;
}
return true;
@ -788,7 +787,7 @@ public class ShapeTraceEntries
{
if (this.trace_piece_count != 0)
{
System.out.println("ShapeTraceEntries: trace_piece_count is inconsistent");
FRLogger.warn("ShapeTraceEntries: trace_piece_count is inconsistent");
}
return null;
}
@ -806,7 +805,7 @@ public class ShapeTraceEntries
}
if (first == null)
{
System.out.println("ShapeTraceEntries: max_stack_level not found");
FRLogger.warn("ShapeTraceEntries: max_stack_level not found");
return null;
}
EntryPoint [] result = new EntryPoint [2];

View File

@ -31,6 +31,7 @@ import eu.mihosoft.freerouting.geometry.planar.Vector;
import eu.mihosoft.freerouting.geometry.planar.Polyline;
import eu.mihosoft.freerouting.geometry.planar.TileShape;
import eu.mihosoft.freerouting.geometry.planar.LineSegment;
import eu.mihosoft.freerouting.logger.FRLogger;
import java.util.Collection;
import java.util.Iterator;
@ -67,7 +68,7 @@ public class ShoveTraceAlgo
if (p_trace_shape.is_empty())
{
System.out.println("ShoveTraceAux.check: p_trace_shape is empty");
FRLogger.warn("ShoveTraceAux.check: p_trace_shape is empty");
return true;
}
if (!p_trace_shape.is_contained_in(board.get_bounding_box()))
@ -212,14 +213,14 @@ public class ShoveTraceAlgo
TileShape[] trace_shapes = p_line_segment.to_polyline().offset_shapes(p_trace_half_width);
if (trace_shapes.length != 1)
{
System.out.println("ShoveTraceAlgo.check: trace_shape count 1 expected");
FRLogger.warn("ShoveTraceAlgo.check: trace_shape count 1 expected");
return 0;
}
TileShape trace_shape = trace_shapes[0];
if (trace_shape.is_empty())
{
System.out.println("ShoveTraceAlgo.check: trace_shape is empty");
FRLogger.warn("ShoveTraceAlgo.check: trace_shape is empty");
return 0;
}
if (!trace_shape.is_contained_in(p_board.get_bounding_box()))
@ -372,7 +373,7 @@ public class ShoveTraceAlgo
{
if (p_trace_shape.is_empty())
{
System.out.println("ShoveTraceAux.insert: p_trace_shape is empty");
FRLogger.warn("ShoveTraceAux.insert: p_trace_shape is empty");
return true;
}
if (!p_trace_shape.is_contained_in(board.get_bounding_box()))

View File

@ -28,7 +28,7 @@ package eu.mihosoft.freerouting.board;
* If {@literal >} RELEASE, some features may be used, which are still in experimental state.
* Also warnings for debugging may be printed depending on the test_level.
*
* @author alfons
* @author Alfons Wirtz
*/
public enum TestLevel
{

View File

@ -23,6 +23,7 @@ import eu.mihosoft.freerouting.geometry.planar.FloatPoint;
import eu.mihosoft.freerouting.geometry.planar.IntOctagon;
import eu.mihosoft.freerouting.geometry.planar.Point;
import eu.mihosoft.freerouting.geometry.planar.TileShape;
import eu.mihosoft.freerouting.logger.FRLogger;
import java.util.Collection;
import java.util.Iterator;
@ -511,7 +512,7 @@ public abstract class Trace extends Item implements Connectable, java.io.Seriali
if (this.first_corner().equals(this.last_corner()))
{
System.out.println("Trace.validate: first and last corner are equal");
FRLogger.warn("Trace.validate: first and last corner are equal");
result = false;
}
return result;
@ -548,5 +549,5 @@ public abstract class Trace extends Item implements Connectable, java.io.Seriali
private final int half_width ; // half width of the trace pen
private int layer ; // eu.mihosoft.freerouting.board layer of the trace
private int layer ; // board layer of the trace
}

View File

@ -31,13 +31,14 @@ import eu.mihosoft.freerouting.geometry.planar.TileShape;
import eu.mihosoft.freerouting.geometry.planar.Shape;
import eu.mihosoft.freerouting.geometry.planar.Vector;
import eu.mihosoft.freerouting.library.Padstack;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Class describing the functionality of an electrical Item on the eu.mihosoft.freerouting.board,
* Class describing the functionality of an electrical Item on the board,
* which may have a shape on several layer, whose geometry is described by a
* padstack.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class Via extends DrillItem implements java.io.Serializable
{
@ -61,7 +62,7 @@ public class Via extends DrillItem implements java.io.Serializable
{
if (padstack == null)
{
System.out.println("Via.get_shape: padstack is null");
FRLogger.warn("Via.get_shape: padstack is null");
return null;
}
if (this.precalculated_shapes == null)
@ -276,6 +277,6 @@ public class Via extends DrillItem implements java.io.Serializable
/** True, if coppersharing of this via with smd pins of the same net is allowed. */
public final boolean attach_allowed;
transient private Shape[] precalculated_shapes = null;
/** Temporary data used in the eu.mihosoft.freerouting.autoroute algorithm. */
/** Temporary data used in the autoroute algorithm. */
transient private eu.mihosoft.freerouting.autoroute.ExpansionDrill autoroute_drill_info = null;
}

View File

@ -27,9 +27,9 @@ import eu.mihosoft.freerouting.geometry.planar.Area;
import eu.mihosoft.freerouting.geometry.planar.Vector;
/**
* Describes Areas on the eu.mihosoft.freerouting.board, where vias are not allowed.
* Describes Areas on the board, where vias are not allowed.
*
* @author alfons
* @author Alfons Wirtz
*/
public class ViaObstacleArea extends ObstacleArea
{

View File

@ -23,11 +23,13 @@
package eu.mihosoft.freerouting.boardgraphics;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* The color intensities for each item type.
* The values are between 0 (invisible) and 1 (full intensity).
*
* @author alfons
* @author Alfons Wirtz
*/
public class ColorIntensityTable implements java.io.Serializable
{
@ -68,7 +70,7 @@ public class ColorIntensityTable implements java.io.Serializable
{
if (p_no < 0 || p_no >= ObjectNames.values().length)
{
System.out.println("ColorIntensityTable.get_value: p_no out of range");
FRLogger.warn("ColorIntensityTable.get_value: p_no out of range");
return 0;
}
return arr[p_no];
@ -78,7 +80,7 @@ public class ColorIntensityTable implements java.io.Serializable
{
if (p_no < 0 || p_no >= ObjectNames.values().length)
{
System.out.println("ColorIntensityTable.set_value: p_no out of range");
FRLogger.warn("ColorIntensityTable.set_value: p_no out of range");
return;
}
arr [p_no] = p_value;

View File

@ -25,7 +25,7 @@ package eu.mihosoft.freerouting.boardgraphics;
import javax.swing.table.AbstractTableModel;
/**
* Abstract class to store colors used for drawing the eu.mihosoft.freerouting.board.
* Abstract class to store colors used for drawing the board.
*
* @author Alfons Wirtz
*/

View File

@ -27,7 +27,7 @@ import java.awt.Dimension;
import java.awt.geom.Point2D;
/**
* Transformation function between the eu.mihosoft.freerouting.board and the screen coordinate systems.
* Transformation function between the board and the screen coordinate systems.
*
* @author Alfons Wirtz
*/
@ -79,7 +79,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* scale a value from the eu.mihosoft.freerouting.board to the screen coordinate system
* scale a value from the board to the screen coordinate system
*/
public double board_to_screen(double p_val)
{
@ -87,7 +87,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* scale a value the screen to the eu.mihosoft.freerouting.board coordinate system
* scale a value the screen to the board coordinate system
*/
public double screen_to_board(double p_val)
{
@ -96,7 +96,7 @@ public class CoordinateTransform implements java.io.Serializable
/**
* transform a eu.mihosoft.freerouting.geometry.planar.FloatPoint to a java.awt.geom.Point2D
* transform a geometry.planar.FloatPoint to a java.awt.geom.Point2D
*/
public Point2D board_to_screen(FloatPoint p_point)
{
@ -123,7 +123,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transform a java.awt.geom.Point2D to a eu.mihosoft.freerouting.geometry.planar.FloatPoint
* Transform a java.awt.geom.Point2D to a geometry.planar.FloatPoint
*/
public FloatPoint screen_to_board(Point2D p_point)
{
@ -149,7 +149,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms an angle in radian on the eu.mihosoft.freerouting.board to an angle on the screen.
* Transforms an angle in radian on the board to an angle on the screen.
*/
public double board_to_screen_angle(double p_angle)
{
@ -174,7 +174,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transform a eu.mihosoft.freerouting.geometry.planar.IntBox to a java.awt.Rectangle
* Transform a geometry.planar.IntBox to a java.awt.Rectangle
* If the internal rotation is not a multiple of Pi/2, a bounding rectangle of the
* rotated rectangular shape is returned.
*/
@ -193,7 +193,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transform a java.awt.Rectangle to a eu.mihosoft.freerouting.geometry.planar.IntBox
* Transform a java.awt.Rectangle to a geometry.planar.IntBox
* If the internal rotation is not a multiple of Pi/2, a bounding box of the
* rotated rectangular shape is returned.
*/
@ -210,7 +210,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* If p_value is true, the left side and the right side of the eu.mihosoft.freerouting.board will be swapped.
* If p_value is true, the left side and the right side of the board will be swapped.
*/
public void set_mirror_left_right(boolean p_value)
{
@ -218,7 +218,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Returns, if the left side and the right side of the eu.mihosoft.freerouting.board are swapped.
* Returns, if the left side and the right side of the board are swapped.
*/
public boolean is_mirror_left_right()
{
@ -226,7 +226,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* If p_value is true, the top side and the botton side of the eu.mihosoft.freerouting.board will be swapped.
* If p_value is true, the top side and the botton side of the board will be swapped.
*/
public void set_mirror_top_bottom(boolean p_value)
{
@ -236,7 +236,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Returns, if the top side and the botton side of the eu.mihosoft.freerouting.board are swapped.
* Returns, if the top side and the botton side of the board are swapped.
*/
public boolean is_mirror_top_bottom()
{
@ -246,7 +246,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Sets the rotation of the displayed eu.mihosoft.freerouting.board to p_value.
* Sets the rotation of the displayed board to p_value.
*/
public void set_rotation(double p_value)
{
@ -254,7 +254,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Returns the rotation of the displayed eu.mihosoft.freerouting.board.
* Returns the rotation of the displayed board.
*/
public double get_rotation()
{
@ -287,12 +287,12 @@ public class CoordinateTransform implements java.io.Serializable
private final double display_y_offset;
/**
* Left side and right side of the eu.mihosoft.freerouting.board are swapped.
* Left side and right side of the board are swapped.
*/
private boolean mirror_left_right = false;
/**
* Top side and bottom side of the eu.mihosoft.freerouting.board are swapped.
* Top side and bottom side of the board are swapped.
*/
private boolean mirror_top_bottom = true;

View File

@ -27,6 +27,7 @@ import eu.mihosoft.freerouting.geometry.planar.IntBox;
import eu.mihosoft.freerouting.geometry.planar.PolylineShape;
import eu.mihosoft.freerouting.geometry.planar.Shape;
import eu.mihosoft.freerouting.geometry.planar.TileShape;
import eu.mihosoft.freerouting.logger.FRLogger;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
@ -46,7 +47,7 @@ import java.awt.geom.AffineTransform;
/**
* Context for drawing items in the eu.mihosoft.freerouting.board package to the screen.
* Context for drawing items in the board package to the screen.
*
* @author Alfons Wirtz
*/
@ -88,7 +89,7 @@ public class GraphicsContext implements java.io.Serializable
}
/**
* Changes the bounds of the eu.mihosoft.freerouting.board design to p_design_bounds.
* Changes the bounds of the board design to p_design_bounds.
* Useful when components are still placed outside the boaed.
*/
public void change_design_bounds(IntBox p_new_design_bounds)
@ -412,7 +413,7 @@ public class GraphicsContext implements java.io.Serializable
}
/**
* draws the interiour of an item of class eu.mihosoft.freerouting.geometry.planar.Area
* draws the interior of an item of class geometry.planar.Area
*/
public void fill_area(Area p_area, Graphics p_g, Color p_color, double p_translucency_factor)
{
@ -429,7 +430,7 @@ public class GraphicsContext implements java.io.Serializable
PolylineShape border = (PolylineShape) p_area.get_border();
if (!border.is_bounded())
{
System.out.println("GraphicsContext.fill_area: shape not bounded");
FRLogger.warn("GraphicsContext.fill_area: shape not bounded");
return;
}
java.awt.Shape clip_shape = p_g.getClip() ;
@ -747,7 +748,7 @@ public class GraphicsContext implements java.io.Serializable
return result;
}
/** Returns the number of layers on the eu.mihosoft.freerouting.board */
/** Returns the number of layers on the board */
public int layer_count()
{
return layer_visibility_arr.length;

View File

@ -26,7 +26,7 @@ package eu.mihosoft.freerouting.boardgraphics;
import java.awt.Color;
/**
* Stores the layer dependent colors used for drawing for the items on the eu.mihosoft.freerouting.board.
* Stores the layer dependent colors used for drawing for the items on the board.
*
* @author Alfons Wirtz
*/

View File

@ -28,7 +28,7 @@ import java.awt.Color;
/**
* Information for drawing an item on the screen.
*
* @author alfons
* @author Alfons Wirtz
*/
public class ItemDrawInfo
{

View File

@ -26,7 +26,7 @@ package eu.mihosoft.freerouting.datastructures;
/**
* Used in the file chooser to filter all files which do not have an extension from the input array.
*
* @author alfons
* @author Alfons Wirtz
*/
public class FileFilter extends javax.swing.filechooser.FileFilter
{

View File

@ -23,12 +23,14 @@
package eu.mihosoft.freerouting.datastructures;
import eu.mihosoft.freerouting.logger.FRLogger;
import java.io.OutputStreamWriter;
/**
* Describes legal identifiers together with the character used for string quotes.
*
* @author alfons
* @author Alfons Wirtz
*/
public class IdentifierType
{
@ -60,7 +62,7 @@ public class IdentifierType
}
catch (java.io.IOException e)
{
System.out.println("IndentFileWriter.new_line: unable to write to file");
FRLogger.warn("IndentFileWriter.new_line: unable to write to file");
}
}
@ -71,7 +73,7 @@ public class IdentifierType
{
if (p_string == null)
{
System.out.println("IdentifierType.is_legal: p_string is null");
FRLogger.warn("IdentifierType.is_legal: p_string is null");
return false;
}
for (int i = 0; i < reserved_chars.length; ++i)

View File

@ -23,10 +23,12 @@
package eu.mihosoft.freerouting.datastructures;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Handles the indenting of scopes while writing to an output text file.
*
* @author alfons
* @author Alfons Wirtz
*/
public class IndentFileWriter extends java.io.OutputStreamWriter
{
@ -49,7 +51,7 @@ public class IndentFileWriter extends java.io.OutputStreamWriter
}
catch (java.io.IOException e)
{
System.out.println("IndentFileWriter.start_scope: unable to write to file");
FRLogger.error("IndentFileWriter.start_scope: unable to write to file", e);
}
++current_indent_level;
}
@ -67,7 +69,7 @@ public class IndentFileWriter extends java.io.OutputStreamWriter
}
catch (java.io.IOException e)
{
System.out.println("IndentFileWriter.end_scope: unable to write to file");
FRLogger.error("IndentFileWriter.end_scope: unable to write to file", e);
}
}
@ -86,7 +88,7 @@ public class IndentFileWriter extends java.io.OutputStreamWriter
}
catch (java.io.IOException e)
{
System.out.println("IndentFileWriter.new_line: unable to write to file");
FRLogger.error("IndentFileWriter.new_line: unable to write to file", e);
}
}

View File

@ -28,6 +28,7 @@ import java.util.TreeSet;
import eu.mihosoft.freerouting.geometry.planar.ShapeBoundingDirections;
import eu.mihosoft.freerouting.geometry.planar.RegularTileShape;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Binary search tree for shapes in the plane.
@ -39,7 +40,7 @@ import eu.mihosoft.freerouting.geometry.planar.RegularTileShape;
* Instead any algorithm to calculate a bounding shape of two input shapes can be used.
* The algorithm would of course also work for higher dimensions.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class MinAreaTree extends ShapeTree
{
@ -200,7 +201,7 @@ public class MinAreaTree extends ShapeTree
}
else
{
System.out.println("MinAreaTree.remove_leaf: parent inconsistent");
FRLogger.warn("MinAreaTree.remove_leaf: parent inconsistent");
other_leaf = null;
}
// link the other leaf to the grand_parent and remove the parent node
@ -223,7 +224,7 @@ public class MinAreaTree extends ShapeTree
}
else
{
System.out.println("MinAreaTree.remove_leaf: grand_parent inconsistent");
FRLogger.warn("MinAreaTree.remove_leaf: grand_parent inconsistent");
}
}
parent.parent = null;

View File

@ -34,6 +34,7 @@ import eu.mihosoft.freerouting.geometry.planar.Point;
import eu.mihosoft.freerouting.geometry.planar.IntPoint;
import eu.mihosoft.freerouting.geometry.planar.Side;
import eu.mihosoft.freerouting.geometry.planar.Limits;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Creates a Delaunay triangulation in the plane for the input objects.
@ -158,7 +159,7 @@ public class PlanarDelaunayTriangulation
if (curr_side == Side.ON_THE_RIGHT)
{
// p_corner is outside this triangle
System.out.println("PlanarDelaunayTriangulation.split: p_corner is outside");
FRLogger.warn("PlanarDelaunayTriangulation.split: p_corner is outside");
return false;
}
else if (curr_side == Side.COLLINEAR)
@ -170,7 +171,7 @@ public class PlanarDelaunayTriangulation
Corner common_corner = curr_edge.common_corner(containing_edge);
if (common_corner == null)
{
System.out.println("PlanarDelaunayTriangulation.split: common corner expected");
FRLogger.warn("PlanarDelaunayTriangulation.split: common corner expected");
return false;
}
if (p_corner.object == common_corner.object)
@ -269,7 +270,7 @@ public class PlanarDelaunayTriangulation
}
else
{
System.out.println("PlanarDelaunayTriangulation.legalize_edge: edge lines inconsistant");
FRLogger.warn("PlanarDelaunayTriangulation.legalize_edge: edge lines inconsistant");
return false;
}
Edge flipped_edge = p_edge.flip();
@ -303,11 +304,11 @@ public class PlanarDelaunayTriangulation
boolean result = this.search_graph.anchor.validate();
if (result == true)
{
System.out.println("Delauny triangulation check passed ok");
FRLogger.warn("Delauny triangulation check passed ok");
}
else
{
System.out.println("Delauny triangulation check has detected problems");
FRLogger.warn("Delauny triangulation check has detected problems");
}
return result;
}
@ -477,7 +478,7 @@ public class PlanarDelaunayTriangulation
}
else
{
System.out.println("Edge.other_neighbour: inconsistant neigbour triangle");
FRLogger.warn("Edge.other_neighbour: inconsistant neigbour triangle");
result = null;
}
return result;
@ -532,7 +533,7 @@ public class PlanarDelaunayTriangulation
}
if (left_index < 0 || right_index < 0)
{
System.out.println("Edge.flip: edge line inconsistant");
FRLogger.warn("Edge.flip: edge line inconsistant");
return null;
}
Edge left_prev_edge = this.left_triangle.edge_lines[(left_index + 2) % 3];
@ -604,7 +605,7 @@ public class PlanarDelaunayTriangulation
{
if (this.start_corner.object != null || this.end_corner.object != null)
{
System.out.println("Edge.validate: left triangle may be null only for bounding edges");
FRLogger.warn("Edge.validate: left triangle may be null only for bounding edges");
result = false;
}
}
@ -622,7 +623,7 @@ public class PlanarDelaunayTriangulation
}
if (!found)
{
System.out.println("Edge.validate: left triangle does not contain this edge");
FRLogger.warn("Edge.validate: left triangle does not contain this edge");
result = false;
}
}
@ -630,7 +631,7 @@ public class PlanarDelaunayTriangulation
{
if (this.start_corner.object != null || this.end_corner.object != null)
{
System.out.println("Edge.validate: right triangle may be null only for bounding edges");
FRLogger.warn("Edge.validate: right triangle may be null only for bounding edges");
result = false;
}
}
@ -648,7 +649,7 @@ public class PlanarDelaunayTriangulation
}
if (!found)
{
System.out.println("Edge.validate: right triangle does not contain this edge");
FRLogger.warn("Edge.validate: right triangle does not contain this edge");
result = false;
}
}
@ -702,7 +703,7 @@ public class PlanarDelaunayTriangulation
{
if (p_no < 0 || p_no >= 3)
{
System.out.println("Triangle.get_corner: p_no out of range");
FRLogger.warn("Triangle.get_corner: p_no out of range");
return null;
}
Edge curr_edge = edge_lines[p_no];
@ -717,7 +718,7 @@ public class PlanarDelaunayTriangulation
}
else
{
System.out.println("Triangle.get_corner: inconsistant edge lines");
FRLogger.warn("Triangle.get_corner: inconsistant edge lines");
result = null;
}
return result;
@ -740,7 +741,7 @@ public class PlanarDelaunayTriangulation
}
if (edge_line_no < 0)
{
System.out.println("Triangle.opposite_corner: p_edge_line not found");
FRLogger.warn("Triangle.opposite_corner: p_edge_line not found");
return null;
}
Edge next_edge = this.edge_lines[(edge_line_no + 1)% 3];
@ -763,7 +764,7 @@ public class PlanarDelaunayTriangulation
{
if (this.is_on_the_left_of_edge_line == null)
{
System.out.println("Triangle.contains: array is_on_the_left_of_edge_line not initialized");
FRLogger.warn("Triangle.contains: array is_on_the_left_of_edge_line not initialized");
return false;
}
for (int i = 0; i < 3; ++i)
@ -917,12 +918,12 @@ public class PlanarDelaunayTriangulation
}
if (this_touching_edge_no < 0 || neigbbour_touching_edge_no < 0)
{
System.out.println("Triangle.split_at_border_point: touching edge not found");
FRLogger.warn("Triangle.split_at_border_point: touching edge not found");
return null;
}
if (touching_edge != other_touching_edge)
{
System.out.println("Triangle.split_at_border_point: edges inconsistent");
FRLogger.warn("Triangle.split_at_border_point: edges inconsistent");
return null;
}
@ -1080,12 +1081,12 @@ public class PlanarDelaunayTriangulation
}
else
{
System.out.println("Triangle.validate: edge inconsistent");
FRLogger.warn("Triangle.validate: edge inconsistent");
return false;
}
if (curr_start_corner != prev_end_corner)
{
System.out.println("Triangle.validate: corner inconsistent");
FRLogger.warn("Triangle.validate: corner inconsistent");
result = false;
}
prev_edge = curr_edge;
@ -1198,7 +1199,7 @@ public class PlanarDelaunayTriangulation
return result;
}
}
System.out.println("TriangleGraph.position_locate: containing triangle not found");
FRLogger.warn("TriangleGraph.position_locate: containing triangle not found");
return null;
}
@ -1224,7 +1225,7 @@ public class PlanarDelaunayTriangulation
return result;
}
}
System.out.println("TriangleGraph.position_locate_reku: containing triangle not found");
FRLogger.warn("TriangleGraph.position_locate_reku: containing triangle not found");
return null;
}

View File

@ -27,13 +27,16 @@ import eu.mihosoft.freerouting.geometry.planar.ShapeBoundingDirections;
import eu.mihosoft.freerouting.geometry.planar.RegularTileShape;
import eu.mihosoft.freerouting.geometry.planar.Shape;
import eu.mihosoft.freerouting.geometry.planar.TileShape;
import eu.mihosoft.freerouting.logger.FRLogger;
import java.awt.event.WindowFocusListener;
/**
* Abstract binary search tree for shapes in the plane.
* The shapes are stored in the leafs of the tree.
* Objects to be stored in the tree must implement the interface ShapeTree.Storable.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public abstract class ShapeTree
{
@ -79,7 +82,7 @@ public abstract class ShapeTree
RegularTileShape bounding_shape = object_shape.bounding_shape(bounding_directions) ;
if ( bounding_shape == null )
{
System.out.println("ShapeTree.insert: bounding shape of TreeObject is null");
FRLogger.warn("ShapeTree.insert: bounding shape of TreeObject is null");
return null;
}
// Construct a new KdLeaf and set it up
@ -169,17 +172,11 @@ public abstract class ShapeTree
}
}
double everage_depth = cumulative_depth / leaf_arr.length;
System.out.print("MinAreaTree: Entry count: ");
System.out.print(leaf_arr.length);
System.out.print(" log: ");
System.out.print(Math.round(Math.log(leaf_arr.length)));
System.out.print(" Everage depth: ");
System.out.print(Math.round(everage_depth));
System.out.print(" ");
System.out.print(" Maximum depth: ");
System.out.print(maximum_depth);
System.out.print(" ");
System.out.println(p_message);
FRLogger.info("MinAreaTree: Entry count: " + leaf_arr.length
+ " log: " + Math.round(Math.log(leaf_arr.length))
+ " Everage depth: " + Math.round(everage_depth) + " "
+ " Maximum depth: " + maximum_depth + " "
+ p_message);
}

View File

@ -27,7 +27,7 @@ package eu.mihosoft.freerouting.datastructures;
/**
* Interface for stoppable threads.
*
* @author alfons
* @author Alfons Wirtz
*/
public interface Stoppable
{

View File

@ -22,6 +22,8 @@
*/
package eu.mihosoft.freerouting.datastructures;
import eu.mihosoft.freerouting.logger.FRLogger;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
@ -33,7 +35,7 @@ import java.util.Vector;
* Database of objects, for which Undo and Redo operations are made possible.
* The algorithm works only for objects containing no references.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class UndoableObjects implements java.io.Serializable
{
@ -110,7 +112,7 @@ public class UndoableObjects implements java.io.Serializable
}
if (object_node.object != p_object)
{
System.out.println("UndoableObjectList.delete: Object inconsistent");
FRLogger.warn("UndoableObjectList.delete: Object inconsistent");
return false;
}
@ -245,11 +247,11 @@ public class UndoableObjects implements java.io.Serializable
}
if (this.objects.remove(curr_deleted_node.object) == null)
{
System.out.println("previous deleted object not found");
FRLogger.warn("previous deleted object not found");
}
if (p_restored_objects == null || !p_restored_objects.remove(curr_deleted_node.object))
{
// the object needs only be cancelled if it is already in the eu.mihosoft.freerouting.board
// the object needs only be cancelled if it is already in the board
if (p_cancelled_objects != null)
{
p_cancelled_objects.add(curr_deleted_node.object);
@ -327,7 +329,7 @@ public class UndoableObjects implements java.io.Serializable
UndoableObjectNode curr_node = objects.get(p_object);
if (curr_node == null)
{
System.out.println("UndoableObjects.save_for_undo: object node not found");
FRLogger.warn("UndoableObjects.save_for_undo: object node not found");
return;
}
if (curr_node.level < this.stack_level)

View File

@ -25,6 +25,7 @@ package eu.mihosoft.freerouting.designforms.specctra;
import eu.mihosoft.freerouting.datastructures.IndentFileWriter;
import eu.mihosoft.freerouting.datastructures.IdentifierType;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
@ -48,12 +49,12 @@ public class AutorouteSettings
next_token = p_scanner.next_token();
} catch (java.io.IOException e)
{
System.out.println("AutorouteSettings.read_scope: IO error scanning file");
FRLogger.error("AutorouteSettings.read_scope: IO error scanning file", e);
return null;
}
if (next_token == null)
{
System.out.println("AutorouteSettings.read_scope: unexpected end of file");
FRLogger.warn("AutorouteSettings.read_scope: unexpected end of file");
return null;
}
if (next_token == Keyword.CLOSED_BRACKET)
@ -125,18 +126,18 @@ public class AutorouteSettings
next_token = p_scanner.next_token();
} catch (java.io.IOException e)
{
System.out.println("AutorouteSettings.read_layer_rule: IO error scanning file");
FRLogger.error("AutorouteSettings.read_layer_rule: IO error scanning file", e);
return null;
}
if (!(next_token instanceof String))
{
System.out.println("AutorouteSettings.read_layer_rule: String expected");
FRLogger.warn("AutorouteSettings.read_layer_rule: String expected");
return null;
}
int layer_no = p_layer_structure.get_no((String) next_token);
if (layer_no < 0)
{
System.out.println("AutorouteSettings.read_layer_rule: layer not found");
FRLogger.warn("AutorouteSettings.read_layer_rule: layer not found");
return null;
}
for (;;)
@ -147,12 +148,12 @@ public class AutorouteSettings
next_token = p_scanner.next_token();
} catch (java.io.IOException e)
{
System.out.println("AutorouteSettings.read_layer_rule: IO error scanning file");
FRLogger.error("AutorouteSettings.read_layer_rule: IO error scanning file", e);
return null;
}
if (next_token == null)
{
System.out.println("AutorouteSettings.read_layer_rule: unexpected end of file");
FRLogger.warn("AutorouteSettings.read_layer_rule: unexpected end of file");
return null;
}
if (next_token == Keyword.CLOSED_BRACKET)
@ -178,19 +179,19 @@ public class AutorouteSettings
}
else if (next_token != Keyword.HORIZONTAL)
{
System.out.println("AutorouteSettings.read_layer_rule: unexpected key word");
FRLogger.warn("AutorouteSettings.read_layer_rule: unexpected key word");
return null;
}
p_settings.set_preferred_direction_is_horizontal(layer_no, pref_dir_is_horizontal);
next_token = p_scanner.next_token();
if (next_token != Keyword.CLOSED_BRACKET)
{
System.out.println("AutorouteSettings.read_layer_rule: uclosing bracket expected");
FRLogger.warn("AutorouteSettings.read_layer_rule: uclosing bracket expected");
return null;
}
} catch (java.io.IOException e)
{
System.out.println("AutorouteSettings.read_layer_rule: IO error scanning file");
FRLogger.error("AutorouteSettings.read_layer_rule: IO error scanning file", e);
return null;
}
}

View File

@ -30,7 +30,7 @@ import eu.mihosoft.freerouting.datastructures.IdentifierType;
/**
* Class for reading and writing circle scopes from dsn-files.
*
* @author alfons
* @author Alfons Wirtz
*/
public class Circle extends Shape
{

View File

@ -24,6 +24,8 @@
package eu.mihosoft.freerouting.designforms.specctra;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
*
* @author Alfons Wirtz
@ -50,12 +52,12 @@ public class Circuit
}
catch (java.io.IOException e)
{
System.out.println("Circuit.read_scope: IO error scanning file");
FRLogger.error("Circuit.read_scope: IO error scanning file", e);
return null;
}
if (next_token == null)
{
System.out.println("Circuit.read_scope: unexpected end of file");
FRLogger.warn("Circuit.read_scope: unexpected end of file");
return null;
}
if (next_token == Keyword.CLOSED_BRACKET)
@ -104,7 +106,7 @@ public class Circuit
}
catch (java.io.IOException e)
{
System.out.println("Circuit.read_length_scope: IO error scanning file");
FRLogger.error("Circuit.read_length_scope: IO error scanning file", e);
return null;
}
if (next_token instanceof Double)
@ -117,7 +119,7 @@ public class Circuit
}
else
{
System.out.println("Circuit.read_length_scope: number expected");
FRLogger.warn("Circuit.read_length_scope: number expected");
return null;
}
}
@ -131,12 +133,12 @@ public class Circuit
}
catch (java.io.IOException e)
{
System.out.println("Circuit.read_length_scope: IO error scanning file");
FRLogger.error("Circuit.read_length_scope: IO error scanning file", e);
return null;
}
if (next_token == null)
{
System.out.println("Circuit.read_length_scope: unexpected end of file");
FRLogger.warn("Circuit.read_length_scope: unexpected end of file");
return null;
}
if (next_token == Keyword.CLOSED_BRACKET)

View File

@ -24,10 +24,12 @@
package eu.mihosoft.freerouting.designforms.specctra;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Handels the placement bata of a eu.mihosoft.freerouting.library component.
* Handels the placement data of a library component.
*
* @author alfons
* @author Alfons Wirtz
*/
public class Component extends ScopeKeyword
{
@ -54,7 +56,7 @@ public class Component extends ScopeKeyword
}
catch (java.io.IOException e)
{
System.out.println("Component.read_scope: IO error scanning file");
FRLogger.error("Component.read_scope: IO error scanning file", e);
return false;
}
return true;
@ -68,7 +70,7 @@ public class Component extends ScopeKeyword
Object next_token = p_scanner.next_token();
if (!(next_token instanceof String))
{
System.out.println("Component.read_scope: component name expected");
FRLogger.warn("Component.read_scope: component name expected");
return null;
}
String name = (String) next_token;
@ -141,19 +143,19 @@ public class Component extends ScopeKeyword
eu.mihosoft.freerouting.library.Package.Pin package_pin = p_component.get_package().get_pin(p_pin_no);
if (package_pin == null)
{
System.out.println("Component.write_pin_info: package pin not found");
FRLogger.warn("Component.write_pin_info: package pin not found");
return;
}
eu.mihosoft.freerouting.board.Pin component_pin = p_par.board.get_pin(p_component.no, p_pin_no);
if (component_pin == null)
{
System.out.println("Component.write_pin_info: component pin not found");
FRLogger.warn("Component.write_pin_info: component pin not found");
return;
}
String cl_class_name = p_par.board.rules.clearance_matrix.get_name(component_pin.clearance_class_no());
if (cl_class_name == null)
{
System.out.println("Component.write_pin_info: clearance class name not found");
FRLogger.warn("Component.write_pin_info: clearance class name not found");
return;
}
p_par.file.new_line();
@ -201,7 +203,7 @@ public class Component extends ScopeKeyword
String cl_class_name = p_par.board.rules.clearance_matrix.get_name(curr_obstacle_area.clearance_class_no());
if (cl_class_name == null)
{
System.out.println("Component.write_keepout_infos: clearance class name not found");
FRLogger.warn("Component.write_keepout_infos: clearance class name not found");
return;
}
p_par.file.new_line();
@ -253,7 +255,7 @@ public class Component extends ScopeKeyword
Object next_token = p_scanner.next_token();
if (!(next_token instanceof String))
{
System.out.println("Component.read_place_scope: String expected");
FRLogger.warn("Component.read_place_scope: String expected");
return null;
}
String name = (String) next_token;
@ -277,7 +279,7 @@ public class Component extends ScopeKeyword
}
else
{
System.out.println("Component.read_place_scope: number expected");
FRLogger.warn("Component.read_place_scope: number expected");
return null;
}
}
@ -289,7 +291,7 @@ public class Component extends ScopeKeyword
}
else if (next_token != FRONT)
{
System.out.println("Component.read_place_scope: Keyword.FRONT expected");
FRLogger.warn("Component.read_place_scope: Keyword.FRONT expected");
}
double rotation;
next_token = p_scanner.next_token();
@ -303,7 +305,7 @@ public class Component extends ScopeKeyword
}
else
{
System.out.println("Component.read_place_scope: number expected");
FRLogger.warn("Component.read_place_scope: number expected");
return null;
}
boolean position_fixed = false;
@ -359,7 +361,7 @@ public class Component extends ScopeKeyword
}
if (next_token != CLOSED_BRACKET)
{
System.out.println("Component.read_place_scope: ) expected");
FRLogger.warn("Component.read_place_scope: ) expected");
return null;
}
ComponentPlacement.ComponentLocation result =
@ -369,9 +371,8 @@ public class Component extends ScopeKeyword
}
catch (java.io.IOException e)
{
System.out.println("Component.read_scope: IO error scanning file");
System.out.println(e);
return null;
FRLogger.error("Component.read_scope: IO error scanning file", e);
return null;
}
}
@ -381,7 +382,7 @@ public class Component extends ScopeKeyword
Object next_token = p_scanner.next_token();
if (!(next_token instanceof String))
{
System.out.println("Component.read_item_clearance_info: String expected");
FRLogger.warn("Component.read_item_clearance_info: String expected");
return null;
}
String name = (String) next_token;
@ -402,12 +403,12 @@ public class Component extends ScopeKeyword
}
if (next_token != CLOSED_BRACKET)
{
System.out.println("Component.read_item_clearance_info: ) expected");
FRLogger.warn("Component.read_item_clearance_info: ) expected");
return null;
}
if (cl_class_name == null)
{
System.out.println("Component.read_item_clearance_info: clearance class name not found");
FRLogger.warn("Component.read_item_clearance_info: clearance class name not found");
return null;
}
return new ComponentPlacement.ItemClearanceInfo(name, cl_class_name);

View File

@ -28,9 +28,9 @@ import java.util.LinkedList;
import java.util.Map;
/**
* Describes the placement data of a eu.mihosoft.freerouting.library component
* Describes the placement data of a library component
*
* @author alfons
* @author Alfons Wirtz
*/
public class ComponentPlacement
{
@ -42,10 +42,10 @@ public class ComponentPlacement
locations = new LinkedList<ComponentLocation>();
}
/** The name of the corresponding eu.mihosoft.freerouting.library component */
/** The name of the corresponding library component */
public final String lib_name;
/** The list of ComponentLocations of the eu.mihosoft.freerouting.library component on the eu.mihosoft.freerouting.board. */
/** The list of ComponentLocations of the library component on the board. */
public final Collection<ComponentLocation> locations;
/** The structure of an entry in the list locations. */

View File

@ -28,18 +28,19 @@ import eu.mihosoft.freerouting.geometry.planar.Vector;
import eu.mihosoft.freerouting.geometry.planar.Line;
import eu.mihosoft.freerouting.geometry.planar.IntBox;
import eu.mihosoft.freerouting.geometry.planar.PolylineShape;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Computes transformations between a specctra dsn-file coordinates and eu.mihosoft.freerouting.board coordinates.
* Computes transformations between a specctra dsn-file coordinates and board coordinates.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class CoordinateTransform implements java.io.Serializable
{
/**
* Creates a new instance of CoordinateTransform.
* The base point of the dsn coordinate system will be translated to zero in the eu.mihosoft.freerouting.board
* The base point of the dsn coordinate system will be translated to zero in the board
* coordinate system.
*/
public CoordinateTransform(double p_scale_factor, double p_base_x, double p_base_y)
@ -50,7 +51,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Scale a value from the eu.mihosoft.freerouting.board to the dsn coordinate system
* Scale a value from the board to the dsn coordinate system
*/
public double board_to_dsn(double p_val)
{
@ -58,7 +59,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Scale a value from the dsn to the eu.mihosoft.freerouting.board coordinate system
* Scale a value from the dsn to the board coordinate system
*/
public double dsn_to_board(double p_val)
{
@ -66,7 +67,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms a eu.mihosoft.freerouting.geometry.planar.FloatPoint to a tuple of doubles
* Transforms a geometry.planar.FloatPoint to a tuple of doubles
* in the dsn coordinate system.
*/
public double[] board_to_dsn(FloatPoint p_point)
@ -78,7 +79,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms a eu.mihosoft.freerouting.geometry.planar.FloatPoint to a tuple of doubles
* Transforms a geometry.planar.FloatPoint to a tuple of doubles
* in the dsn coordinate system in relative (vector) coordinates.
*/
public double[] board_to_dsn_rel(FloatPoint p_point)
@ -90,7 +91,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms an array of n eu.mihosoft.freerouting.geometry.planar.FloatPoints to
* Transforms an array of n geometry.planar.FloatPoints to
* an array of 2*n doubles in the dsn coordinate system.
*/
public double [] board_to_dsn(FloatPoint [] p_points)
@ -105,7 +106,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms an array of n eu.mihosoft.freerouting.geometry.planar.Lines to
* Transforms an array of n geometry.planar.Lines to
* an array of 4*n doubles in the dsn coordinate system.
*/
public double [] board_to_dsn(Line [] p_lines)
@ -124,7 +125,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms an array of n eu.mihosoft.freerouting.geometry.planar.FloatPoints to
* Transforms an array of n geometry.planar.FloatPoints to
* an array of 2*n doubles in the dsn coordinate system in relative (vector) coordinates.
*/
public double [] board_to_dsn_rel(FloatPoint [] p_points)
@ -139,7 +140,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms a eu.mihosoft.freerouting.geometry.planar.Vector to a tuple of doubles
* Transforms a geometry.planar.Vector to a tuple of doubles
* in the dsn coordinate system.
*/
public double[] board_to_dsn(Vector p_vector)
@ -152,7 +153,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms a dsn tuple to a eu.mihosoft.freerouting.geometry.planar.FloatPoint
* Transforms a dsn tuple to a geometry.planar.FloatPoint
*/
public FloatPoint dsn_to_board(double [] p_tuple)
{
@ -162,7 +163,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms a dsn tuple to a eu.mihosoft.freerouting.geometry.planar.FloatPoint in relative (vector) coordinates.
* Transforms a dsn tuple to a geometry.planar.FloatPoint in relative (vector) coordinates.
*/
public FloatPoint dsn_to_board_rel(double [] p_tuple)
{
@ -172,7 +173,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms a eu.mihosoft.freerouting.geometry.planar.Intbox to the coordinates of a Rectangle.
* Transforms a geometry.planar.Intbox to the coordinates of a Rectangle.
*/
public double [] board_to_dsn(IntBox p_box)
{
@ -185,7 +186,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms a eu.mihosoft.freerouting.geometry.planar.Intbox to a Rectangle in relative (vector) coordinates.
* Transforms a geometry.planar.Intbox to a Rectangle in relative (vector) coordinates.
*/
public double [] board_to_dsn_rel(IntBox p_box)
{
@ -198,7 +199,7 @@ public class CoordinateTransform implements java.io.Serializable
}
/**
* Transforms a eu.mihosoft.freerouting.board shape to a dsn shape.
* Transforms a board shape to a dsn shape.
*/
public Shape board_to_dsn(eu.mihosoft.freerouting.geometry.planar.Shape p_board_shape, Layer p_layer)
{
@ -222,14 +223,14 @@ public class CoordinateTransform implements java.io.Serializable
}
else
{
System.out.println("CoordinateTransform.board_to_dsn not yet implemented for p_board_shape");
FRLogger.warn("CoordinateTransform.board_to_dsn not yet implemented for p_board_shape");
result = null;
}
return result;
}
/**
* Transforms the relative (vector) coordinates of a eu.mihosoft.freerouting.geometry.planar.Shape to a specctra dsn shape.
* Transforms the relative (vector) coordinates of a geometry.planar.Shape to a specctra dsn shape.
*/
public Shape board_to_dsn_rel(eu.mihosoft.freerouting.geometry.planar.Shape p_board_shape, Layer p_layer)
{
@ -253,7 +254,7 @@ public class CoordinateTransform implements java.io.Serializable
}
else
{
System.out.println("CoordinateTransform.board_to_dsn not yet implemented for p_board_shape");
FRLogger.warn("CoordinateTransform.board_to_dsn not yet implemented for p_board_shape");
result = null;
}
return result;

View File

@ -26,11 +26,12 @@ import eu.mihosoft.freerouting.datastructures.IndentFileWriter;
import eu.mihosoft.freerouting.board.BasicBoard;
import eu.mihosoft.freerouting.board.TestLevel;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Class for reading and writing dsn-files.
*
* @author alfons
* @author Alfons Wirtz
*/
public class DsnFile
{
@ -45,9 +46,9 @@ public class DsnFile
}
/**
* Creates a routing eu.mihosoft.freerouting.board from a Specctra dns file.
* Creates a routing board from a Specctra dns file.
* The parameters p_item_observers and p_item_id_no_generator are used,
* in case the eu.mihosoft.freerouting.board is embedded into a host system.
* in case the board is embedded into a host system.
* Returns false, if an error occured.
*/
public static ReadResult read(java.io.InputStream p_input_stream, eu.mihosoft.freerouting.interactive.IBoardHandling p_board_handling,
@ -63,8 +64,7 @@ public class DsnFile
}
catch (java.io.IOException e)
{
System.out.println("DsnFile.read: IO error scanning file");
System.out.println(e);
FRLogger.error("DsnFile.read: IO error scanning file", e);
return ReadResult.ERROR;
}
boolean keyword_ok = true;
@ -79,7 +79,7 @@ public class DsnFile
}
if (!keyword_ok)
{
System.out.println("DsnFile.read: specctra dsn file format expected");
FRLogger.warn("DsnFile.read: specctra dsn file format expected");
return ReadResult.ERROR;
}
}
@ -92,7 +92,7 @@ public class DsnFile
result = ReadResult.OK;
if (read_scope_par.autoroute_settings == null)
{
// look for power planes with incorrect layer type and adjust eu.mihosoft.freerouting.autoroute parameters
// look for power planes with incorrect layer type and adjust autoroute parameters
adjust_plane_autoroute_settings(p_board_handling);
}
}
@ -185,7 +185,7 @@ public class DsnFile
}
if (curr_area < 0.5 * board_area)
{
// skip conduction areas not covering most of the eu.mihosoft.freerouting.board
// skip conduction areas not covering most of the board
continue;
}
@ -206,7 +206,7 @@ public class DsnFile
{
return false;
}
// Adjust the layer prefered directions in the eu.mihosoft.freerouting.autoroute settings.
// Adjust the layer preferred directions in the autoroute settings.
// and deactivate the changed layers.
eu.mihosoft.freerouting.interactive.AutorouteSettings autoroute_settings = p_board_handling.get_settings().autoroute_settings;
int layer_count = routing_board.get_layer_count();
@ -239,7 +239,7 @@ public class DsnFile
IndentFileWriter output_file = new IndentFileWriter(p_file);
if (output_file == null)
{
System.out.println("unable to write dsn file");
FRLogger.warn("unable to write dsn file");
return false;
}
@ -249,7 +249,7 @@ public class DsnFile
}
catch (java.io.IOException e)
{
System.out.println("unable to write dsn file");
FRLogger.error("unable to write dsn file", e);
return false;
}
try
@ -258,7 +258,7 @@ public class DsnFile
}
catch (java.io.IOException e)
{
System.out.println("unable to close dsn file");
FRLogger.error("unable to close dsn file", e);
return false;
}
return true;
@ -300,14 +300,14 @@ public class DsnFile
}
else if (next_token != Keyword.OFF)
{
System.out.println("DsnFile.read_boolean: Keyword.OFF expected");
FRLogger.warn("DsnFile.read_boolean: Keyword.OFF expected");
}
ScopeKeyword.skip_scope(p_scanner);
return result;
}
catch (java.io.IOException e)
{
System.out.println("DsnFile.read_boolean: IO error scanning file");
FRLogger.warn("DsnFile.read_boolean: IO error scanning file");
return false;
}
}
@ -324,20 +324,20 @@ public class DsnFile
}
else
{
System.out.println("DsnFile.read_integer_scope: number expected");
FRLogger.warn("DsnFile.read_integer_scope: number expected");
return 0;
}
next_token = p_scanner.next_token();
if (next_token != Keyword.CLOSED_BRACKET)
{
System.out.println("DsnFile.read_integer_scope: closing bracket expected");
FRLogger.warn("DsnFile.read_integer_scope: closing bracket expected");
return 0;
}
return value;
}
catch (java.io.IOException e)
{
System.out.println("DsnFile.read_integer_scope: IO error scanning file");
FRLogger.error("DsnFile.read_integer_scope: IO error scanning file", e);
return 0;
}
}
@ -358,20 +358,20 @@ public class DsnFile
}
else
{
System.out.println("DsnFile.read_float_scope: number expected");
FRLogger.warn("DsnFile.read_float_scope: number expected");
return 0;
}
next_token = p_scanner.next_token();
if (next_token != Keyword.CLOSED_BRACKET)
{
System.out.println("DsnFile.read_float_scope: closing bracket expected");
FRLogger.warn("DsnFile.read_float_scope: closing bracket expected");
return 0;
}
return value;
}
catch (java.io.IOException e)
{
System.out.println("DsnFile.read_float_scope: IO error scanning file");
FRLogger.error("DsnFile.read_float_scope: IO error scanning file", e);
return 0;
}
}
@ -384,20 +384,20 @@ public class DsnFile
Object next_token = p_scanner.next_token();
if (!(next_token instanceof String))
{
System.out.println("DsnFile:read_string_scope: String expected");
FRLogger.warn("DsnFile:read_string_scope: String expected");
return null;
}
String result = (String) next_token;
next_token = p_scanner.next_token();
if (next_token != Keyword.CLOSED_BRACKET)
{
System.out.println("DsnFile.read_string_scope: closing bracket expected");
FRLogger.warn("DsnFile.read_string_scope: closing bracket expected");
}
return result;
}
catch (java.io.IOException e)
{
System.out.println("DsnFile.read_string_scope: IO error scanning file");
FRLogger.error("DsnFile.read_string_scope: IO error scanning file", e);
return null;
}
}
@ -417,7 +417,7 @@ public class DsnFile
}
if (!(next_token instanceof String))
{
System.out.println("DsnFileread_string_list_scope: string expected");
FRLogger.warn("DsnFileread_string_list_scope: string expected");
return null;
}
result.add((String) next_token);
@ -425,7 +425,7 @@ public class DsnFile
}
catch (java.io.IOException e)
{
System.out.println("DsnFile.read_string_list_scope: IO error scanning file");
FRLogger.error("DsnFile.read_string_list_scope: IO error scanning file", e);
}
return result;
}

View File

@ -25,7 +25,7 @@ package eu.mihosoft.freerouting.designforms.specctra;
/**
* Enumeration class for keywords of the specctra dsn file format
*
* @author alfons
* @author Alfons Wirtz
*/
public class Keyword
{

View File

@ -30,11 +30,11 @@ import java.util.LinkedList;
/**
* Describes a layer in a Specctra dsn file.
*
* @author alfons
* @author Alfons Wirtz
*/
public class Layer
{
/** all layers of the eu.mihosoft.freerouting.board */
/** all layers of the board */
public static final Layer PCB = new Layer("pcb", -1, false);
/** the signal layers */
public static final Layer SIGNAL = new Layer("signal", -1, true);

View File

@ -28,7 +28,7 @@ import java.util.Iterator;
/**
* Describes a layer structure read from a dsn file.
*
* @author alfons
* @author Alfons Wirtz
*/
public class LayerStructure
{
@ -45,7 +45,7 @@ public class LayerStructure
}
/**
* Creates a dsn-LayerStructure from a eu.mihosoft.freerouting.board LayerStructure.
* Creates a dsn-LayerStructure from a board LayerStructure.
*/
public LayerStructure(eu.mihosoft.freerouting.board.LayerStructure p_board_layer_structure)
{

View File

@ -27,6 +27,7 @@ import eu.mihosoft.freerouting.geometry.planar.IntVector;
import eu.mihosoft.freerouting.geometry.planar.Vector;
import eu.mihosoft.freerouting.geometry.planar.PolygonShape;
import eu.mihosoft.freerouting.geometry.planar.Simplex;
import eu.mihosoft.freerouting.logger.FRLogger;
import java.util.Collection;
import java.util.Iterator;
@ -34,9 +35,9 @@ import java.util.LinkedList;
/**
* Class for reading and writing eu.mihosoft.freerouting.library scopes from dsn-files.
* Class for reading and writing library scopes from dsn-files.
*
* @author Alfons Wirtz
* @author Alfons Wirtz
*/
public class Library extends ScopeKeyword
{
@ -62,13 +63,12 @@ public class Library extends ScopeKeyword
}
catch (java.io.IOException e)
{
System.out.println("Library.read_scope: IO error scanning file");
System.out.println(e);
FRLogger.error("Library.read_scope: IO error scanning file", e);
return false;
}
if (next_token == null)
{
System.out.println("Library.read_scope: unexpected end of file");
FRLogger.warn("Library.read_scope: unexpected end of file");
return false;
}
if (next_token == CLOSED_BRACKET)
@ -119,9 +119,7 @@ public class Library extends ScopeKeyword
}
else
{
System.out.print("Library.read_scope: via padstack with name ");
System.out.print(curr_padstack_name);
System.out.println(" not found");
FRLogger.warn("Library.read_scope: via padstack with name '" + curr_padstack_name + " not found");
}
}
if (found_padstack_count != via_padstacks.length)
@ -134,7 +132,7 @@ public class Library extends ScopeKeyword
board.library.set_via_padstacks(via_padstacks);
}
// Create the eu.mihosoft.freerouting.library packages on the eu.mihosoft.freerouting.board
// Create the library packages on the board
board.library.packages = new eu.mihosoft.freerouting.library.Packages(board.library.padstacks);
Iterator<Package> it = package_list.iterator();
while (it.hasNext())
@ -150,7 +148,7 @@ public class Library extends ScopeKeyword
eu.mihosoft.freerouting.library.Padstack board_padstack = board.library.padstacks.get(pin_info.padstack_name);
if (board_padstack == null)
{
System.out.println("Library.read_scope: eu.mihosoft.freerouting.board padstack not found");
FRLogger.warn("Library.read_scope: eu.mihosoft.freerouting.board padstack not found");
return false;
}
pin_arr[i] = new eu.mihosoft.freerouting.library.Package.Pin(pin_info.pin_name, board_padstack.no, rel_coor, pin_info.rotation);
@ -167,7 +165,7 @@ public class Library extends ScopeKeyword
}
else
{
System.out.println("Library.read_scope: outline shape is null");
FRLogger.warn("Library.read_scope: outline shape is null");
}
}
generate_missing_keepout_names("keepout_", curr_package.keepouts);
@ -244,7 +242,7 @@ public class Library extends ScopeKeyword
}
if (first_layer_no >= p_par.board.get_layer_count() || last_layer_no < 0)
{
System.out.println("Library.write_padstack_scope: padstack shape not found");
FRLogger.warn("Library.write_padstack_scope: padstack shape not found");
return;
}
@ -295,7 +293,7 @@ public class Library extends ScopeKeyword
}
else
{
System.out.println("Library.read_padstack_scope: unexpected padstack identifier");
FRLogger.warn("Library.read_padstack_scope: unexpected padstack identifier");
return false;
}
@ -321,7 +319,7 @@ public class Library extends ScopeKeyword
}
if (curr_next_token != Keyword.CLOSED_BRACKET)
{
System.out.println("Library.read_padstack_scope: closing bracket expected");
FRLogger.warn("Library.read_padstack_scope: closing bracket expected");
return false;
}
}
@ -343,8 +341,7 @@ public class Library extends ScopeKeyword
}
catch (java.io.IOException e)
{
System.out.println("Library.read_padstack_scope: IO error scanning file");
System.out.println(e);
FRLogger.error("Library.read_padstack_scope: IO error scanning file", e);
return false;
}
if (p_board_padstacks.get(padstack_name) != null)
@ -354,8 +351,7 @@ public class Library extends ScopeKeyword
}
if (shape_list.isEmpty())
{
System.out.print("Library.read_padstack_scope: shape not found for padstack with name ");
System.out.println(padstack_name);
FRLogger.warn("Library.read_padstack_scope: shape not found for padstack with name '" + padstack_name + "'");
return true;
}
eu.mihosoft.freerouting.geometry.planar.ConvexShape[] padstack_shapes = new eu.mihosoft.freerouting.geometry.planar.ConvexShape[p_layer_structure.arr.length];
@ -378,7 +374,7 @@ public class Library extends ScopeKeyword
eu.mihosoft.freerouting.geometry.planar.TileShape[] convex_shapes = curr_shape.split_to_convex();
if (convex_shapes.length != 1)
{
System.out.println("Library.read_padstack_scope: convex shape expected");
FRLogger.warn("Library.read_padstack_scope: convex shape expected");
}
convex_shape = convex_shapes[0];
if (convex_shape instanceof Simplex)
@ -391,8 +387,8 @@ public class Library extends ScopeKeyword
{
if (padstack_shape.dimension() < 2)
{
System.out.print("Library.read_padstack_scope: shape is not an area ");
// enllarge the shape a little bit, so that it is an area
FRLogger.warn("Library.read_padstack_scope: shape is not an area ");
// enlarge the shape a little bit, so that it is an area
padstack_shape = padstack_shape.offset(1);
if (padstack_shape.dimension() < 2)
{
@ -413,7 +409,7 @@ public class Library extends ScopeKeyword
int shape_layer = p_layer_structure.get_no(pad_shape.layer.name);
if (shape_layer < 0 || shape_layer >= padstack_shapes.length)
{
System.out.println("Library.read_padstack_scope: layer number found");
FRLogger.warn("Library.read_padstack_scope: layer number found");
return false;
}
padstack_shapes[shape_layer] = padstack_shape;

View File

@ -30,12 +30,13 @@ import java.util.Iterator;
import eu.mihosoft.freerouting.datastructures.IndentFileWriter;
import eu.mihosoft.freerouting.datastructures.IdentifierType;
import eu.mihosoft.freerouting.logger.FRLogger;
/**
* Class for reading and writing net scopes from dsn-files.
*
* @author alfons
* @author Alfons Wirtz
*/
public class Net
{
@ -80,13 +81,13 @@ public class Net
eu.mihosoft.freerouting.board.Component curr_component = p_par.board.components.get(p_pin.get_component_no());
if (curr_component == null)
{
System.out.println("Net.write_scope: component not found");
FRLogger.warn("Net.write_scope: component not found");
return;
}
eu.mihosoft.freerouting.library.Package.Pin lib_pin = curr_component.get_package().get_pin(p_pin.get_index_in_package());
if (lib_pin == null)
{
System.out.println("Net.write_scope: pin number out of range");
FRLogger.warn("Net.write_scope: pin number out of range");
return;
}
p_par.file.new_line();

Some files were not shown because too many files have changed in this diff Show More