当前位置: 首页>>代码示例>>Java>>正文


Java Area类代码示例

本文整理汇总了Java中geometry.planar.Area的典型用法代码示例。如果您正苦于以下问题:Java Area类的具体用法?Java Area怎么用?Java Area使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Area类属于geometry.planar包,在下文中一共展示了Area类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: insert_component_outline

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Inserts a component ouline 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");
        return null;
    }
    if (!p_area.is_bounded())
    {
        System.out.println("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,
            p_component_no, p_fixed_state, this);
    insert_item(outline);
    return outline;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:22,代码来源:BasicBoard.java

示例2: overlapping_items

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Returns all items on layer p_layer, which overlap with p_area.
 * If p_layer < 0, the layer is ignored
 */
public Set<Item> overlapping_items(Area p_area, int p_layer)
{
    Set<Item> result = new TreeSet<Item>();
    TileShape[] tile_shapes = p_area.split_to_convex();
    for (int i = 0; i < tile_shapes.length; ++i)
    {
        Set<SearchTreeObject> curr_overlaps = overlapping_objects(tile_shapes[i], p_layer);
        for (SearchTreeObject curr_overlap : curr_overlaps)
        {
            if (curr_overlap instanceof Item)
            {
                result.add((Item) curr_overlap);
            }
        }
    }
    return result;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:22,代码来源:BasicBoard.java

示例3: make_conductive

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Turns an obstacle area into a conduction area with net number p_net_no
 * If it is convex and has no holes, it is turned into a Pin,
 * alse into a conduction area.
 */
public Connectable make_conductive(ObstacleArea p_area, int p_net_no)
{
    Item new_item;
    Area curr_area = p_area.get_relative_area();
    int layer = p_area.get_layer();
    FixedState fixed_state = p_area.get_fixed_state();
    Vector translation = p_area.get_translation();
    double rotation = p_area.get_rotation_in_degree();
    boolean side_changed = p_area.get_side_changed();
    int[] net_no_arr = new int[1];
    net_no_arr[0] = p_net_no;
    new_item = new ConductionArea(curr_area, layer, translation, rotation, side_changed, net_no_arr,
            p_area.clearance_class_no(), 0, p_area.get_component_no(), p_area.name, true, fixed_state, this);
    remove_item(p_area);
    insert_item(new_item);
    return (Connectable) new_item;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:23,代码来源:BasicBoard.java

示例4: ConductionArea

import geometry.planar.Area; //导入依赖的package包/类
/** Creates a new instance of ConductionArea */
ConductionArea(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree, boolean p_side_changed,
        int[] p_net_no_arr, int p_clearance_class, int p_id_no, int p_group_no, String p_name, boolean p_is_obstacle,
        FixedState p_fixed_state, BasicBoard p_board)
{
    super(p_area, p_layer, p_translation, p_rotation_in_degree, p_side_changed, p_net_no_arr, p_clearance_class, p_id_no, 
            p_group_no, p_name, p_fixed_state, p_board);
    is_obstacle = p_is_obstacle;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:10,代码来源:ConductionArea.java

示例5: ComponentObstacleArea

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Creates a new instance of  ComponentObstacleArea
 * If p_is_obstacle ist false, the new instance is not regarded as obstacle and used only for displaying on the screen.
 */
ComponentObstacleArea(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree,
        boolean p_side_changed, int p_clearance_type, int p_id_no, int p_component_no,
        String p_name, FixedState p_fixed_state, BasicBoard p_board)
{
    super(p_area, p_layer, p_translation, p_rotation_in_degree, p_side_changed, new int[0],
            p_clearance_type, p_id_no, p_component_no, p_name, p_fixed_state, p_board);
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:12,代码来源:ComponentObstacleArea.java

示例6: ComponentOutline

import geometry.planar.Area; //导入依赖的package包/类
/** Creates a new instance of ComponentOutline */
public ComponentOutline(Area p_area, boolean p_is_front, Vector p_translation, double p_rotation_in_degree,
        int p_component_no, FixedState p_fixed_state, BasicBoard p_board)
{
    super(new int[0], 0, 0, p_component_no, p_fixed_state, p_board);
    this.relative_area = p_area;
    this.is_front = p_is_front;
    this.translation = p_translation;
    this.rotation_in_degree = p_rotation_in_degree;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:11,代码来源:ComponentOutline.java

示例7: get_area

import geometry.planar.Area; //导入依赖的package包/类
public Area get_area()
{
    if (this.precalculated_absolute_area == null)
    {
        if (this.relative_area == null)
        {
            System.out.println("ObstacleArea.get_area: area is null");
            return null;
        }
        Area turned_area = this.relative_area;
        if (!this.is_front && !this.board.components.get_flip_style_rotate_first())
        {
            turned_area = turned_area.mirror_vertical(Point.ZERO);
        }
        if (this.rotation_in_degree != 0)
        {
            double rotation = this.rotation_in_degree;
            if (rotation % 90 == 0)
            {
                turned_area = turned_area.turn_90_degree(((int) rotation) / 90, Point.ZERO);
            }
            else
            {
                turned_area = turned_area.rotate_approx(Math.toRadians(rotation), FloatPoint.ZERO);
            }

        }
        if (!this.is_front && this.board.components.get_flip_style_rotate_first())
        {
            turned_area = turned_area.mirror_vertical(Point.ZERO);
        }
        this.precalculated_absolute_area = turned_area.translate_by(this.translation);
    }
    return this.precalculated_absolute_area;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:36,代码来源:ComponentOutline.java

示例8: insert_obstacle

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Inserts an obstacle into the board , whose geometry is described
 * by a polygonyal 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");
        return null;
    }
    ObstacleArea obs = new ObstacleArea(p_area, p_layer, Vector.ZERO, 0, false, p_clearance_class, 0, 0, null, p_fixed_state, this);
    insert_item(obs);
    return obs;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:17,代码来源:BasicBoard.java

示例9: insert_via_obstacle

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Inserts an via obstacle area into the board , whose geometry is described
 * by a polygonyal 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");
        return null;
    }
    ViaObstacleArea obs = new ViaObstacleArea(p_area, p_layer, Vector.ZERO, 0, false,
            p_clearance_class, 0, 0, null, p_fixed_state, this);
    insert_item(obs);
    return obs;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:18,代码来源:BasicBoard.java

示例10: insert_component_obstacle

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Inserts a component obstacle area into the board , whose geometry is described
 * by a polygonyal 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");
        return null;
    }
    ComponentObstacleArea obs = new ComponentObstacleArea(p_area, p_layer, Vector.ZERO, 0, false,
            p_clearance_class, 0, 0, null, p_fixed_state, this);
    insert_item(obs);
    return obs;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:18,代码来源:BasicBoard.java

示例11: insert_conduction_area

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Inserts a condution area into the board , whose geometry is described
 * by a polygonyal 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.
 */
public ConductionArea insert_conduction_area(Area p_area, int p_layer,
                                             int[] p_net_no_arr, int p_clearance_class, boolean p_is_obstacle, FixedState p_fixed_state)
{
    if (p_area == null)
    {
        System.out.println("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,
            0, 0, null, p_is_obstacle, p_fixed_state, this);
    insert_item(c);
    return c;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:20,代码来源:BasicBoard.java

示例12: check_shape

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Checks, if the an object with shape p_shape and net nos p_net_no_arr
 * and clearance class p_cl_class can be inserted on layer p_layer
 * without clearance violation.
 */
public boolean check_shape(Area p_shape, int p_layer, int[] p_net_no_arr, int p_cl_class)
{
    TileShape[] tiles = p_shape.split_to_convex();
    ShapeSearchTree default_tree = this.search_tree_manager.get_default_tree();
    for (int i = 0; i < tiles.length; ++i)
    {
        TileShape curr_shape = tiles[i];
        if (!curr_shape.is_contained_in(bounding_box))
        {
            return false;
        }
        Set<SearchTreeObject> obstacles = new TreeSet<SearchTreeObject>();
        default_tree.overlapping_objects_with_clearance(curr_shape, p_layer,
                p_net_no_arr, p_cl_class, obstacles);
        for (SearchTreeObject curr_ob : obstacles)
        {
            boolean is_obstacle = true;
            for (int j = 0; j < p_net_no_arr.length; ++j)
            {
                if (!curr_ob.is_obstacle(p_net_no_arr[j]))
                {
                    is_obstacle = false;
                }
            }
            if (is_obstacle)
            {
                return false;
            }
        }
    }
    return true;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:38,代码来源:BasicBoard.java

示例13: ViaObstacleArea

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Creates a new area item which may belong to several nets
 */
ViaObstacleArea(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree, boolean p_side_changed,
        int[] p_net_no_arr, int p_clearance_type, int p_id_no, int p_group_no, String p_name, FixedState p_fixed_state, BasicBoard p_board)
{
    super(p_area, p_layer, p_translation, p_rotation_in_degree, p_side_changed, p_net_no_arr, 
            p_clearance_type, p_id_no, p_group_no, p_name, p_fixed_state, p_board);
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:10,代码来源:ViaObstacleArea.java

示例14: ObstacleArea

import geometry.planar.Area; //导入依赖的package包/类
/**
 * Creates a new relative_area item which may belong to several nets.
 * p_name is null, if the ObstacleArea does not belong to a component.
 */
ObstacleArea(Area p_area, int p_layer, Vector p_translation, double p_rotation_in_degree, boolean p_side_changed,
        int[] p_net_no_arr, int p_clearance_type, int p_id_no, int p_cmp_no, String p_name, FixedState p_fixed_state, BasicBoard p_board)
{
    super(p_net_no_arr, p_clearance_type, p_id_no, p_cmp_no, p_fixed_state, p_board);
    this.relative_area = p_area;
    this.layer = p_layer;
    this.translation = p_translation;
    this.rotation_in_degree = p_rotation_in_degree;
    this.side_changed = p_side_changed;
    this.name = p_name;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:16,代码来源:ObstacleArea.java

示例15: get_area

import geometry.planar.Area; //导入依赖的package包/类
public Area get_area()
{
    if (this.precalculated_absolute_area == null)
    {
        if (this.relative_area == null)
        {
            System.out.println("ObstacleArea.get_area: area is null");
            return null;
        }
        Area turned_area = this.relative_area;
        if (this.side_changed && !this.board.components.get_flip_style_rotate_first())
        {
            turned_area =  turned_area.mirror_vertical(Point.ZERO);
        }
        if (this.rotation_in_degree != 0)
        {
            double rotation = this.rotation_in_degree;
            if (rotation % 90 == 0)
            {
                turned_area = turned_area.turn_90_degree(((int) rotation )/ 90, Point.ZERO);
            }
            else
            {
                turned_area = turned_area.rotate_approx(Math.toRadians(rotation), FloatPoint.ZERO);
            }
            
        }
        if (this.side_changed && this.board.components.get_flip_style_rotate_first())
        {
            turned_area =  turned_area.mirror_vertical(Point.ZERO);
        }
        this.precalculated_absolute_area =  turned_area.translate_by(this.translation);
    }
    return this.precalculated_absolute_area;
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:36,代码来源:ObstacleArea.java


注:本文中的geometry.planar.Area类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。