group coordinate planes and lines
This commit is contained in:
@@ -98,6 +98,7 @@
|
||||
#include "Plane.h"
|
||||
#include "Line.h"
|
||||
#include "Part.h"
|
||||
#include "Origin.h"
|
||||
#include "MaterialObject.h"
|
||||
#include "Expression.h"
|
||||
|
||||
@@ -1136,6 +1137,7 @@ void Application::initTypes(void)
|
||||
App ::Plane ::init();
|
||||
App ::Line ::init();
|
||||
App ::Part ::init();
|
||||
App ::Origin ::init();
|
||||
|
||||
// Expression classes
|
||||
App ::Expression ::init();
|
||||
|
||||
@@ -78,6 +78,7 @@ SET(Document_CPP_SRCS
|
||||
GeoFeatureGroupPyImp.cpp
|
||||
GeoFeatureGroup.cpp
|
||||
Part.cpp
|
||||
Origin.cpp
|
||||
Path.cpp
|
||||
InventorObject.cpp
|
||||
MeasureDistance.cpp
|
||||
@@ -109,6 +110,7 @@ SET(Document_HPP_SRCS
|
||||
GeoFeature.h
|
||||
GeoFeatureGroup.h
|
||||
Part.h
|
||||
Origin.h
|
||||
Path.h
|
||||
InventorObject.h
|
||||
MeasureDistance.h
|
||||
|
||||
@@ -52,10 +52,6 @@ PyObject* GeoFeatureGroupPy::addObject(PyObject *args)
|
||||
PyErr_SetString(PyExc_Exception, "Cannot add a GeoFeatureGroup to itself");
|
||||
return NULL;
|
||||
}
|
||||
if (docObj->getDocumentObjectPtr()->getTypeId().isDerivedFrom(GeoFeatureGroup::getClassTypeId())) {
|
||||
PyErr_SetString(PyExc_Exception, "Cannot add a GeoFeatureGroup to a GeoFeatureGroup");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
getGeoFeatureGroupPtr()->addObject(docObj->getDocumentObjectPtr());
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) Jürgen Riegel (juergen.riegel@web.de) 2012 *
|
||||
* Copyright (c) Stefan Tröger (stefantroeger@gmx.net) 2015 *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
|
||||
54
src/App/Origin.cpp
Normal file
54
src/App/Origin.cpp
Normal file
@@ -0,0 +1,54 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) Stefan Tröger (stefantroeger@gmx.net) 2015 *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library 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 Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <App/Plane.h>
|
||||
|
||||
#include "Origin.h"
|
||||
|
||||
|
||||
using namespace App;
|
||||
|
||||
|
||||
PROPERTY_SOURCE(App::Origin, App::GeoFeatureGroup)
|
||||
|
||||
|
||||
|
||||
//===========================================================================
|
||||
// Feature
|
||||
//===========================================================================
|
||||
|
||||
Origin::Origin(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Origin::~Origin(void)
|
||||
{
|
||||
}
|
||||
|
||||
59
src/App/Origin.h
Normal file
59
src/App/Origin.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) Stefan Tröger (stefantroeger@gmx.net) 2015 *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library 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 Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef APP_Origin_H
|
||||
#define APP_Origin_H
|
||||
|
||||
#include "GeoFeatureGroup.h"
|
||||
#include "PropertyLinks.h"
|
||||
|
||||
|
||||
|
||||
namespace App
|
||||
{
|
||||
|
||||
|
||||
/** Base class of all geometric document objects.
|
||||
*/
|
||||
class AppExport Origin : public App::GeoFeatureGroup
|
||||
{
|
||||
PROPERTY_HEADER(App::Origin);
|
||||
|
||||
public:
|
||||
|
||||
/// Constructor
|
||||
Origin(void);
|
||||
virtual ~Origin();
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
virtual const char* getViewProviderName(void) const {
|
||||
return "Gui::ViewProviderOrigin";
|
||||
}
|
||||
};
|
||||
|
||||
//typedef App::FeaturePythonT<Origin> OriginPython;
|
||||
|
||||
} //namespace App
|
||||
|
||||
|
||||
#endif // APP_Origin_H
|
||||
Reference in New Issue
Block a user