pcb 4.1.1
An interactive printed circuit board layout editor.
|
Functions used to remove vias, pins ... More...
#include <setjmp.h>
#include <memory.h>
#include "global.h"
#include "data.h"
#include "draw.h"
#include "error.h"
#include "misc.h"
#include "move.h"
#include "mymem.h"
#include "polygon.h"
#include "rats.h"
#include "remove.h"
#include "rtree.h"
#include "search.h"
#include "select.h"
#include "set.h"
#include "undo.h"
Go to the source code of this file.
Data Structures | |
struct | rlp_info |
Functions | |
static void * | DestroyVia (PinType *Via) |
Destroys a via. | |
static void * | DestroyRat (RatType *Rat) |
Destroys a rat. | |
static void * | DestroyLine (LayerType *Layer, LineType *Line) |
Destroys a line from a layer. | |
static void * | DestroyArc (LayerType *Layer, ArcType *Arc) |
Destroys an arc from a layer. | |
static void * | DestroyText (LayerType *Layer, TextType *Text) |
Destroys a text from a layer. | |
static void * | DestroyPolygon (LayerType *Layer, PolygonType *Polygon) |
Destroys a polygon from a layer. | |
static void * | DestroyElement (ElementType *) |
static void * | RemoveVia (PinType *Via) |
Removes a via. | |
static void * | RemoveRat (RatType *Rat) |
Removes a rat. | |
static void * | DestroyPolygonPoint (LayerType *Layer, PolygonType *Polygon, PointType *Point) |
Removes a polygon-point from a polygon and destroys the data. | |
static void * | RemovePolygonContour (LayerType *Layer, PolygonType *Polygon, Cardinal contour) |
Removes a contour from a polygon. | |
static void * | RemovePolygonPoint (LayerType *Layer, PolygonType *Polygon, PointType *Point) |
Removes a polygon-point from a polygon. | |
static void * | RemoveLinePoint (LayerType *Layer, LineType *Line, PointType *Point) |
Removes a line point, or a line if the selected point is the end. | |
void | RemovePCB (PCBType *Ptr) |
Remove PCB. | |
static int | remove_point (const BoxType *b, void *cl) |
void * | RemoveLine (LayerType *Layer, LineType *Line) |
Removes a line from a layer. | |
void * | RemoveArc (LayerType *Layer, ArcType *Arc) |
Removes an arc from a layer. | |
void * | RemoveText (LayerType *Layer, TextType *Text) |
Removes a text from a layer. | |
void * | RemovePolygon (LayerType *Layer, PolygonType *Polygon) |
Removes a polygon from a layer. | |
void * | RemoveElement (ElementType *Element) |
Removes an element. | |
bool | RemoveSelected (void) |
Removes all selected and visible objects. | |
void | RemoveDegradedVias (void) |
void * | RemoveObject (int Type, void *Ptr1, void *Ptr2, void *Ptr3) |
Remove object as referred by pointers and type, allocated memory is passed to the 'remove undo' list. | |
bool | DeleteRats (bool selected) |
Deletes rat lines only. | |
void * | DestroyObject (DataType *Target, int Type, void *Ptr1, void *Ptr2, void *Ptr3) |
Remove object as referred by pointers and type. | |
Variables | |
static ObjectFunctionType | RemoveFunctions |
static ObjectFunctionType | DestroyFunctions |
static DataType * | DestroyTarget |
static bool | Bulk = false |
Functions used to remove vias, pins ...
PCB, interactive printed circuit board design.
Copyright (C) 1994,1995,1996 Thomas Nau
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Contact addresses for paper mail and Email:
Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
Definition in file remove.c.
bool DeleteRats | ( | bool | selected | ) |
Deletes rat lines only.
Can delete all rat lines, or only selected one.
Definition at line 643 of file remove.c.
References Bulk, PCBType::Data, Draw(), END_LOOP, IncrementUndoSerialNumber(), line, PCB, RAT_LOOP, RemoveRat(), and TEST_FLAG.
Referenced by ActionDelete(), ActionDeleteRats(), ActionImport(), AutoPlaceSelected(), AutoRoute(), and toporouter().
Destroys an arc from a layer.
Definition at line 164 of file remove.c.
References LayerType::Arc, LayerType::arc_tree, LayerType::ArcN, and r_delete_entry().
static void * DestroyElement | ( | ElementType * | Element | ) | [static] |
Definition at line 254 of file remove.c.
References DataType::Element, DataType::element_tree, DataType::ElementN, ELEMENTTEXT_LOOP, END_LOOP, FreeElementMemory(), n, DataType::name_tree, PAD_LOOP, DataType::pad_tree, pin, PIN_LOOP, DataType::pin_tree, and r_delete_entry().
Destroys a line from a layer.
Definition at line 147 of file remove.c.
References LayerType::Line, LayerType::line_tree, LayerType::LineN, and r_delete_entry().
void* DestroyObject | ( | DataType * | Target, |
int | Type, | ||
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Remove object as referred by pointers and type.
Allocated memory is destroyed assumed to already be erased.
Definition at line 671 of file remove.c.
References ObjectOperation().
Referenced by ConvertBufferToElement(), GetUndoSlot(), ripout_livedraw_obj(), and UndoInsertPoint().
static void * DestroyPolygon | ( | LayerType * | Layer, |
PolygonType * | Polygon | ||
) | [static] |
Destroys a polygon from a layer.
Definition at line 180 of file remove.c.
References FreePolygonMemory(), LayerType::Polygon, LayerType::polygon_tree, LayerType::PolygonN, and r_delete_entry().
static void * DestroyPolygonPoint | ( | LayerType * | Layer, |
PolygonType * | Polygon, | ||
PointType * | Point | ||
) | [static] |
Removes a polygon-point from a polygon and destroys the data.
Definition at line 197 of file remove.c.
References PCBType::Data, polygon_st::HoleIndex, polygon_st::HoleIndexN, InitClip(), PCB, polygon_st::PointN, polygon_point_contour(), polygon_point_idx(), LayerType::polygon_tree, r_delete_entry(), r_insert_entry(), RemovePolygonContour(), and SetPolygonBoundingBox().
static void * DestroyRat | ( | RatType * | Rat | ) | [static] |
Destroys a rat.
Definition at line 294 of file remove.c.
References r_delete_entry(), DataType::Rat, DataType::rat_tree, and DataType::RatN.
Destroys a text from a layer.
Definition at line 237 of file remove.c.
References r_delete_entry(), LayerType::Text, LayerType::text_tree, LayerType::TextN, and TextType::TextString.
static void * DestroyVia | ( | PinType * | Via | ) | [static] |
Destroys a via.
Definition at line 130 of file remove.c.
References r_delete_entry(), DataType::Via, DataType::via_tree, and DataType::ViaN.
static int remove_point | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 349 of file remove.c.
References rlp_info::env, rlp_info::line, line, rlp_info::point, PointType::X, and PointType::Y.
Referenced by RemoveLinePoint().
Removes an arc from a layer.
Definition at line 420 of file remove.c.
References Bulk, Draw(), EraseArc(), MoveObjectToRemoveUndoList(), and LayerType::On.
Referenced by GlobalPuller().
void RemoveDegradedVias | ( | void | ) |
Definition at line 613 of file remove.c.
References Bulk, PCBType::Data, END_LOOP, PCB, RemoveVia(), VIA_IS_BURIED, and VIA_LOOP.
Referenced by ChangeBuriedViasAfterLayerDelete(), and ChangeBuriedViasAfterLayerMove().
void* RemoveElement | ( | ElementType * | Element | ) |
Removes an element.
Definition at line 578 of file remove.c.
References Bulk, Draw(), PCBType::ElementOn, EraseElement(), FRONT, PCBType::InvisibleObjectsOn, MoveObjectToRemoveUndoList(), PCB, and PCBType::PinOn.
Referenced by ActionElementList(), and NotifyMode().
Removes a line from a layer.
Definition at line 403 of file remove.c.
References Bulk, Draw(), EraseLine(), MoveObjectToRemoveUndoList(), and LayerType::On.
Referenced by ActionDJopt(), GlobalPuller(), remove_line(), and RemoveLinePoint().
Removes a line point, or a line if the selected point is the end.
Definition at line 378 of file remove.c.
References rlp_info::env, rlp_info::line, LayerType::line_tree, MoveObject(), rlp_info::point, r_search(), remove_point(), RemoveLine(), PointType::X, and PointType::Y.
void* RemoveObject | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3 | ||
) |
Remove object as referred by pointers and type, allocated memory is passed to the 'remove undo' list.
Definition at line 631 of file remove.c.
References ObjectOperation(), and ptr.
Referenced by ActionRipUp(), nbcb_ripup(), netlist_rip_up_cb(), NotifyMode(), remove_via_at(), and RemoveExcessPolygonPoints().
void RemovePCB | ( | PCBType * | Ptr | ) |
Remove PCB.
Definition at line 119 of file remove.c.
References ClearUndoList(), and FreePCBMemory().
Referenced by ActionNew(), LoadLayoutToBuffer(), and real_load_pcb().
void* RemovePolygon | ( | LayerType * | Layer, |
PolygonType * | Polygon | ||
) |
Removes a polygon from a layer.
Definition at line 455 of file remove.c.
References Bulk, Draw(), ErasePolygon(), MoveObjectToRemoveUndoList(), and LayerType::On.
Referenced by MorphPolygon(), and RemovePolygonContour().
static void * RemovePolygonContour | ( | LayerType * | Layer, |
PolygonType * | Polygon, | ||
Cardinal | contour | ||
) | [static] |
Removes a contour from a polygon.
If removing the outer contour, it removes the whole polygon.
Definition at line 474 of file remove.c.
References AddObjectToRemoveContourUndoList(), Bulk, PCBType::Data, Draw(), DrawPolygon(), ErasePolygon(), polygon_st::HoleIndex, polygon_st::HoleIndexN, InitClip(), LayerType::On, PCB, polygon_st::PointN, polygon_st::Points, and RemovePolygon().
Referenced by DestroyPolygonPoint(), and RemovePolygonPoint().
static void * RemovePolygonPoint | ( | LayerType * | Layer, |
PolygonType * | Polygon, | ||
PointType * | Point | ||
) | [static] |
Removes a polygon-point from a polygon.
Definition at line 524 of file remove.c.
References AddObjectToRemovePointUndoList(), Bulk, PCBType::Data, Draw(), DrawPolygon(), ErasePolygon(), polygon_st::HoleIndex, polygon_st::HoleIndexN, InitClip(), LayerType::On, PCB, polygon_st::PointN, polygon_point_contour(), polygon_point_idx(), LayerType::polygon_tree, r_delete_entry(), r_insert_entry(), RemoveExcessPolygonPoints(), RemovePolygonContour(), and SetPolygonBoundingBox().
static void * RemoveRat | ( | RatType * | Rat | ) | [static] |
Removes a rat.
Definition at line 329 of file remove.c.
References Bulk, Draw(), EraseRat(), MoveObjectToRemoveUndoList(), PCB, and PCBType::RatOn.
Referenced by DeleteRats().
bool RemoveSelected | ( | void | ) |
Removes all selected and visible objects.
Definition at line 598 of file remove.c.
References Bulk, Draw(), IncrementUndoSerialNumber(), and SelectedOperation().
Referenced by ActionDelete(), ActionRemoveSelected(), ActionSelect(), and click_cb().
Removes a text from a layer.
Definition at line 437 of file remove.c.
References Bulk, Draw(), EraseText(), MoveObjectToRemoveUndoList(), LayerType::On, r_delete_entry(), and LayerType::text_tree.
static void * RemoveVia | ( | PinType * | Via | ) | [static] |
Removes a via.
Definition at line 312 of file remove.c.
References Bulk, Draw(), EraseVia(), MoveObjectToRemoveUndoList(), PCB, and PCBType::ViaOn.
Referenced by RemoveDegradedVias().
bool Bulk = false [static] |
Definition at line 113 of file remove.c.
Referenced by DeleteRats(), RemoveArc(), RemoveDegradedVias(), RemoveElement(), RemoveLine(), RemovePolygon(), RemovePolygonContour(), RemovePolygonPoint(), RemoveRat(), RemoveSelected(), RemoveText(), and RemoveVia().
ObjectFunctionType DestroyFunctions [static] |
{ DestroyLine, DestroyText, DestroyPolygon, DestroyVia, DestroyElement, NULL, NULL, NULL, NULL, DestroyPolygonPoint, DestroyArc, DestroyRat }
DataType* DestroyTarget [static] |
ObjectFunctionType RemoveFunctions [static] |
{ RemoveLine, RemoveText, RemovePolygon, RemoveVia, RemoveElement, NULL, NULL, NULL, RemoveLinePoint, RemovePolygonPoint, RemoveArc, RemoveRat }