1
/****************************************************************************
3
** This file is part of the LibreCAD project, a 2D CAD program
5
** Copyright (C) 2010 R. van Twisk (librecad@rvt.dds.nl)
6
** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
9
** This file may be distributed and/or modified under the terms of the
10
** GNU General Public License version 2 as published by the Free Software
11
** Foundation and appearing in the file gpl-2.0.txt included in the
12
** packaging of this file.
14
** This program is distributed in the hope that it will be useful,
15
** but WITHOUT ANY WARRANTY; without even the implied warranty of
16
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
** GNU General Public License for more details.
19
** You should have received a copy of the GNU General Public License
20
** along with this program; if not, write to the Free Software
21
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
** This copyright notice MUST APPEAR in all copies of the script!
25
**********************************************************************/
31
#include "rs_entitycontainer.h"
33
#include "rs_polyline.h"
34
#include "rs_insert.h"
40
* Data needed to insert library items.
42
struct RS_LibraryInsertData {
44
RS_Vector insertionPoint;
51
* Class for the creation of new entities.
52
* This class is bound to an entity container in which the
53
* entities are stored.
55
* @author Andrew Mustun
59
RS_Creation(RS_EntityContainer* container,
60
RS_GraphicView* graphicView=NULL,
61
bool handleUndo=true);
63
RS_Entity* createParallelThrough(const RS_Vector& coord,
67
RS_Entity* createParallel(const RS_Vector& coord,
72
RS_Line* createParallelLine(const RS_Vector& coord,
73
double distance, int number,
76
RS_Arc* createParallelArc(const RS_Vector& coord,
77
double distance, int number,
80
RS_Circle* createParallelCircle(const RS_Vector& coord,
81
double distance, int number,
84
RS_Line* createBisector(const RS_Vector& coord1,
85
const RS_Vector& coord2,
91
RS_Line* createTangent1(const RS_Vector& coord,
92
const RS_Vector& point,
95
* create a tangent line which is orthogonal to the given RS_Line(normal)
97
RS_Line* createLineOrthTan(const RS_Vector& coord,
100
RS_Line* createTangent2(const RS_Vector& coord,
104
* create the path of centers of common tangent circles of the two given circles
105
*@ return NULL, if failed
106
*@ at success return either an ellipse or hyperbola
108
std::vector<RS_Entity*> createCircleTangent2( RS_Entity* circle1,RS_Entity* circle2);
110
RS_Line* createLineRelAngle(const RS_Vector& coord,
115
RS_Line* createPolygon(const RS_Vector& center,
116
const RS_Vector& corner,
119
RS_Line* createPolygon2(const RS_Vector& corner1,
120
const RS_Vector& corner2,
123
RS_Insert* createInsert(RS_InsertData& data);
125
RS_Image* createImage(RS_ImageData& data);
127
RS_Block* createBlock(const RS_BlockData& data,
128
const RS_Vector& referencePoint,
131
RS_Insert* createLibraryInsert(RS_LibraryInsertData& data);
133
//void createPoint(const RS_Vector& p);
134
//void createLine2P(const RS_Vector& p1, const RS_Vector& p2);
135
//void createRectangle(const RS_Vector& e1, const RS_Vector& e2);
136
//RS_Polyline* createPolyline(const RS_Vector& p);
139
RS_EntityContainer* container;
141
RS_Document* document;
142
RS_GraphicView* graphicView;