本文整理汇总了Java中geometry.planar.IntOctagon.EMPTY属性的典型用法代码示例。如果您正苦于以下问题:Java IntOctagon.EMPTY属性的具体用法?Java IntOctagon.EMPTY怎么用?Java IntOctagon.EMPTY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类geometry.planar.IntOctagon
的用法示例。
在下文中一共展示了IntOctagon.EMPTY属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: opt_changed_area
/**
* Optimizes the route in the internally marked area.
* If p_net_no > 0, only traces with net number p_net_no are optimized.
* If p_clip_shape != null the optimizing is restricted to p_clip_shape.
* p_trace_cost_arr is used for optimizing vias and may be null.
* If p_stoppable_thread != null, the agorithm can be requested to be stopped.
* If p_time_limit > 0; the algorithm will be stopped after p_time_limit Milliseconds.
* If p_keep_point != null, traces on layer p_keep_point_layer containing p_keep_point
* will also contain this point after optimizing.
*/
public void opt_changed_area(int[] p_only_net_no_arr, IntOctagon p_clip_shape, int p_accuracy, ExpansionCostFactor[] p_trace_cost_arr,
Stoppable p_stoppable_thread, int p_time_limit, Point p_keep_point, int p_keep_point_layer)
{
if (changed_area == null)
{
return;
}
if (p_clip_shape != IntOctagon.EMPTY)
{
PullTightAlgo pull_tight_algo =
PullTightAlgo.get_instance(this, p_only_net_no_arr, p_clip_shape,
p_accuracy, p_stoppable_thread, p_time_limit, p_keep_point, p_keep_point_layer);
pull_tight_algo.opt_changed_area(p_trace_cost_arr);
}
join_graphics_update_box(changed_area.surrounding_box());
changed_area = null;
}
示例2: to_int
/**
* calculates the smallest IntOctagon containing this octagon.
*/
IntOctagon to_int()
{
if (rx < lx || uy < ly || lrx < ulx || urx < llx)
{
return IntOctagon.EMPTY;
}
return new IntOctagon ((int)Math.floor(lx), (int)Math.floor(ly),
(int)Math.ceil(rx), (int)Math.ceil(uy),
(int)Math.floor(ulx), (int)Math.ceil(lrx),
(int)Math.floor(llx), (int)Math.ceil(urx));
}
示例3: remove_items_and_pull_tight
/**
* Removes the items in p_item_list and pulls the nearby rubbertraces tight.
* Returns false, if some items could not be removed, because they were fixed.
*/
public boolean remove_items_and_pull_tight(Collection<Item> p_item_list, int p_tidy_width,
int p_pull_tight_accuracy, boolean p_with_delete_fixed)
{
boolean result = true;
IntOctagon tidy_region;
boolean calculate_tidy_region;
if (p_tidy_width < Integer.MAX_VALUE)
{
tidy_region = IntOctagon.EMPTY;
calculate_tidy_region = (p_tidy_width > 0);
}
else
{
tidy_region = null;
calculate_tidy_region = false;
}
start_marking_changed_area();
Set<Integer> changed_nets = new TreeSet<Integer>();
Iterator<Item> it = p_item_list.iterator();
while (it.hasNext())
{
Item curr_item = it.next();
if (!p_with_delete_fixed && curr_item.is_delete_fixed() || curr_item.is_user_fixed())
{
result = false;
}
else
{
for (int i = 0; i < curr_item.tile_shape_count(); ++i)
{
TileShape curr_shape = curr_item.get_tile_shape(i);
changed_area.join(curr_shape, curr_item.shape_layer(i));
if (calculate_tidy_region)
{
tidy_region = tidy_region.union(curr_shape.bounding_octagon());
}
}
remove_item(curr_item);
for (int i = 0; i < curr_item.net_count(); ++i)
{
changed_nets.add(curr_item.get_net_no(i));
}
}
}
for (Integer curr_net_no : changed_nets)
{
this.combine_traces(curr_net_no);
}
if (calculate_tidy_region)
{
tidy_region = tidy_region.enlarge(p_tidy_width);
}
opt_changed_area(new int[0], tidy_region, p_pull_tight_accuracy, null, null, PULL_TIGHT_TIME_LIMIT);
return result;
}
示例4: move_drill_item
/**
* Translates p_drill_item by p_vector and shoves obstacle
* traces aside. Returns false, if that was not possible without creating
* clearance violations. In this case the database may be damaged, so that an undo
* becomes necessesary.
*/
public boolean move_drill_item(DrillItem p_drill_item, Vector p_vector,
int p_max_recursion_depth, int p_max_via_recursion_depth,
int p_tidy_width, int p_pull_tight_accuracy, int p_pull_tight_time_limit)
{
clear_shove_failing_obstacle();
// unfix the connected shove fixed traces.
Collection<Item> contact_list = p_drill_item.get_normal_contacts();
Iterator<Item> it = contact_list.iterator();
while (it.hasNext())
{
Item curr_contact = it.next();
if (curr_contact.get_fixed_state() == FixedState.SHOVE_FIXED)
{
curr_contact.set_fixed_state(FixedState.UNFIXED);
}
}
IntOctagon tidy_region;
boolean calculate_tidy_region;
if (p_tidy_width < Integer.MAX_VALUE)
{
tidy_region = IntOctagon.EMPTY;
calculate_tidy_region = (p_tidy_width > 0);
}
else
{
tidy_region = null;
calculate_tidy_region = false;
}
int[] net_no_arr = p_drill_item.net_no_arr;
start_marking_changed_area();
if (!MoveDrillItemAlgo.insert(p_drill_item, p_vector,
p_max_recursion_depth, p_max_via_recursion_depth, tidy_region, this))
{
return false;
}
if (calculate_tidy_region)
{
tidy_region = tidy_region.enlarge(p_tidy_width);
}
int[] opt_net_no_arr;
if (p_max_recursion_depth <= 0)
{
opt_net_no_arr = net_no_arr;
}
else
{
opt_net_no_arr = new int[0];
}
opt_changed_area(opt_net_no_arr, tidy_region, p_pull_tight_accuracy, null, null, p_pull_tight_time_limit);
return true;
}