Merge branch 'master' into start-icon

This commit is contained in:
Alex Gryson 2016-12-05 17:08:53 +01:00 committed by GitHub
commit be96a53b95
41 changed files with 2409 additions and 350 deletions

View File

@ -33,6 +33,7 @@
#include "Base/Exception.h"
#include <Base/Console.h>
#include <Base/PyObjectBase.h>
#include <ExtensionPy.h>
/* We do not use a standard property macro for type initiation. The reason is that we have the first
* PropertyData in the extension chain, there is no parent property data.
@ -96,7 +97,12 @@ void Extension::initExtension(ExtensionContainer* obj) {
PyObject* Extension::getExtensionPyObject(void) {
return nullptr;
if (ExtensionPythonObject.is(Py::_None())){
// ref counter is set to 1
auto grp = new ExtensionPy(this);
ExtensionPythonObject = Py::Object(grp,true);
}
return Py::new_reference_to(ExtensionPythonObject);
}
const char* Extension::name() {

View File

@ -117,7 +117,7 @@ public:
EXTENSION_PROXY_ONEARG(allowObject, pyobj);
if(result.isNone())
ExtensionT::allowObject(obj);
return ExtensionT::allowObject(obj);
if(result.isBoolean())
return result.isTrue();

View File

@ -871,3 +871,79 @@ std::string Matrix4D::analyse(void) const
}
return text;
}
Matrix4D& Matrix4D::Outer(const Vector3f& rV1, const Vector3f& rV2)
{
setToUnity();
dMtrx4D[0][0] = rV1.x * rV2.x;
dMtrx4D[0][1] = rV1.x * rV2.y;
dMtrx4D[0][2] = rV1.x * rV2.z;
dMtrx4D[1][0] = rV1.y * rV2.x;
dMtrx4D[1][1] = rV1.y * rV2.y;
dMtrx4D[1][2] = rV1.y * rV2.z;
dMtrx4D[2][0] = rV1.z * rV2.x;
dMtrx4D[2][1] = rV1.z * rV2.y;
dMtrx4D[2][2] = rV1.z * rV2.z;
return *this;
}
Matrix4D& Matrix4D::Outer(const Vector3d& rV1, const Vector3d& rV2)
{
setToUnity();
dMtrx4D[0][0] = rV1.x * rV2.x;
dMtrx4D[0][1] = rV1.x * rV2.y;
dMtrx4D[0][2] = rV1.x * rV2.z;
dMtrx4D[1][0] = rV1.y * rV2.x;
dMtrx4D[1][1] = rV1.y * rV2.y;
dMtrx4D[1][2] = rV1.y * rV2.z;
dMtrx4D[2][0] = rV1.z * rV2.x;
dMtrx4D[2][1] = rV1.z * rV2.y;
dMtrx4D[2][2] = rV1.z * rV2.z;
return *this;
}
Matrix4D& Matrix4D::Hat(const Vector3f& rV)
{
setToUnity();
dMtrx4D[0][0] = 0.0;
dMtrx4D[0][1] = -rV.z;
dMtrx4D[0][2] = rV.y;
dMtrx4D[1][0] = rV.z;
dMtrx4D[1][1] = 0.0;
dMtrx4D[1][2] = -rV.x;
dMtrx4D[2][0] = -rV.y;
dMtrx4D[2][1] = rV.x;
dMtrx4D[2][2] = 0.0;
return *this;
}
Matrix4D& Matrix4D::Hat(const Vector3d& rV)
{
setToUnity();
dMtrx4D[0][0] = 0.0;
dMtrx4D[0][1] = -rV.z;
dMtrx4D[0][2] = rV.y;
dMtrx4D[1][0] = rV.z;
dMtrx4D[1][1] = 0.0;
dMtrx4D[1][2] = -rV.x;
dMtrx4D[2][0] = -rV.y;
dMtrx4D[2][1] = rV.x;
dMtrx4D[2][2] = 0.0;
return *this;
}

View File

@ -95,6 +95,12 @@ public:
double determinant() const;
/// Analyse the transformation
std::string analyse(void) const;
/// Outer product (Dyadic product)
Matrix4D& Outer(const Vector3f& rV1, const Vector3f& rV2);
Matrix4D& Outer(const Vector3d& rV1, const Vector3d& rV2);
/// Hat operator (skew symmetric)
Matrix4D& Hat(const Vector3f& rV);
Matrix4D& Hat(const Vector3d& rV);
//@}
void getMatrix (double dMtrx[16]) const;

View File

@ -96,7 +96,7 @@ Vector3<_Precision> Vector3<_Precision>::operator - (const Vector3<_Precision>&
cVctRes.z = z - rcVct.z;
return cVctRes;
}
template <class _Precision>
Vector3<_Precision> Vector3<_Precision>::operator - (void) const
{
@ -131,7 +131,7 @@ Vector3<_Precision>& Vector3<_Precision>::operator *= (_Precision fScale)
}
template <class _Precision>
Vector3<_Precision>& Vector3<_Precision>::operator /= (_Precision fDiv)
Vector3<_Precision>& Vector3<_Precision>::operator /= (_Precision fDiv)
{
x /= fDiv;
y /= fDiv;
@ -194,7 +194,7 @@ Vector3<_Precision> Vector3<_Precision>::Cross(const Vector3<_Precision>& rcVct)
template <class _Precision>
bool Vector3<_Precision>::operator != (const Vector3<_Precision>& rcVct) const
{
{
return !((*this) == rcVct);
}
@ -213,7 +213,7 @@ bool Vector3<_Precision>::IsEqual(const Vector3<_Precision> &rclPnt, _Precision
}
template <class _Precision>
Vector3<_Precision>& Vector3<_Precision>::ProjectToPlane (const Vector3<_Precision> &rclBase,
Vector3<_Precision>& Vector3<_Precision>::ProjectToPlane (const Vector3<_Precision> &rclBase,
const Vector3<_Precision> &rclNorm)
{
Vector3<_Precision> clTemp(rclNorm);
@ -231,7 +231,7 @@ void Vector3<_Precision>::ProjectToPlane (const Vector3 &rclBase,
}
template <class _Precision>
_Precision Vector3<_Precision>::DistanceToPlane (const Vector3<_Precision> &rclBase,
_Precision Vector3<_Precision>::DistanceToPlane (const Vector3<_Precision> &rclBase,
const Vector3<_Precision> &rclNorm) const
{
return ((*this - rclBase) * rclNorm) / rclNorm.Length();
@ -244,7 +244,7 @@ _Precision Vector3<_Precision>::Length (void) const
}
template <class _Precision>
_Precision Vector3<_Precision>::DistanceToLine (const Vector3<_Precision> &rclBase,
_Precision Vector3<_Precision>::DistanceToLine (const Vector3<_Precision> &rclBase,
const Vector3<_Precision> &rclDirect) const
{
return (_Precision) fabs((rclDirect % Vector3(*this - rclBase)).Length() / rclDirect.Length());
@ -401,7 +401,7 @@ _Precision Vector3<_Precision>::GetAngle (const Vector3 &rcVect) const
_Precision divid, fNum;
divid = Length() * ((Vector3<_Precision>&)rcVect).Length();
if ((divid < -1e-10f) || (divid > 1e-10f)) {
fNum = (*this * rcVect) / divid;
if (fNum < -1)

View File

@ -126,6 +126,7 @@ public:
Vector3 operator % (const Vector3<_Precision>& rcVct) const;
/// Cross product
Vector3 Cross (const Vector3<_Precision>& rcVct) const;
/// Comparing for inequality
bool operator != (const Vector3<_Precision>& rcVct) const;
/// Comparing for equality
@ -159,8 +160,8 @@ public:
Vector3 & Normalize (void);
/// Get angle between both vectors. The returned value lies in the interval [0,pi].
_Precision GetAngle (const Vector3 &rcVect) const;
/** Transforms this point to the coordinate system defined by origin \a rclBase,
* vector \a vector rclDirX and vector \a vector rclDirY.
/** Transforms this point to the coordinate system defined by origin \a rclBase,
* vector \a vector rclDirX and vector \a vector rclDirY.
* \note \a rclDirX must be perpendicular to \a rclDirY, i.e. \a rclDirX * \a rclDirY = 0..
*/
void TransformToCoordinateSystem (const Vector3 &rclBase, const Vector3 &rclDirX, const Vector3 &rclDirY);
@ -183,7 +184,7 @@ public:
/// Projects this point onto the line given by the base \a rclPoint and the direction \a rclLine.
/**
* Projects a point \a rclPoint onto the line defined by the origin and the direction \a rclLine.
* The result is a vector from \a rclPoint to the point on the line. The length of this vector
* The result is a vector from \a rclPoint to the point on the line. The length of this vector
* is the distance from \a rclPoint to the line.
* Note: The resulting vector does not depend on the current vector.
*/
@ -286,4 +287,3 @@ inline _Vec1 convertTo(const _Vec2& v)
} // namespace Base
#endif // BASE_VECTOR3D_H

View File

@ -580,9 +580,12 @@ void ViewProvider::dragObject(App::DocumentObject* obj) {
bool ViewProvider::canDropObject(App::DocumentObject* obj) const {
auto vector = getExtensionsDerivedFromType<Gui::ViewProviderExtension>();
for(Gui::ViewProviderExtension* ext : vector)
Base::Console().Message("Check extensions for drop\n");
for(Gui::ViewProviderExtension* ext : vector){
Base::Console().Message("Check extensions %s\n", ext->name());
if(ext->extensionCanDropObject(obj))
return true;
}
return false;
}

View File

@ -97,13 +97,14 @@ public:
ViewProviderExtensionPythonT() {
ExtensionT::m_isPythonExtension = true;
ExtensionT::initExtension(ViewProviderExtensionPythonT::getExtensionClassTypeId());
EXTENSION_ADD_PROPERTY(Proxy,(Py::Object()));
EXTENSION_ADD_PROPERTY(ExtensionProxy,(Py::Object()));
}
virtual ~ViewProviderExtensionPythonT() {
}
App::PropertyPythonObject Proxy;
App::PropertyPythonObject ExtensionProxy;
};
typedef ViewProviderExtensionPythonT<Gui::ViewProviderExtension> ViewProviderExtensionPython;

View File

@ -36,6 +36,7 @@
#include <App/DocumentObject.h>
#include <App/GroupExtension.h>
#include <App/Expression.h>
#include <Base/Console.h>
#include <QMessageBox>
using namespace Gui;
@ -76,6 +77,8 @@ bool ViewProviderGroupExtension::extensionCanDropObjects() const {
bool ViewProviderGroupExtension::extensionCanDropObject(App::DocumentObject* obj) const {
Base::Console().Message("Check ViewProviderGroupExtension");
auto* group = getExtendedViewProvider()->getObject()->getExtensionByType<App::GroupExtension>();
//we cannot drop thing of this group into it again

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="PropertyContainerPy"
Father="ExtensionContainerPy"
Name="ViewProviderPy"
Twin="ViewProvider"
TwinPointer="ViewProvider"
Include="Gui/ViewProvider.h"
Namespace="Gui"
FatherInclude="App/PropertyContainerPy.h"
FatherInclude="App/ExtensionContainerPy.h"
FatherNamespace="App">
<Documentation>
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net" />

View File

@ -51,7 +51,7 @@ PyObject *ArcOfConicPy::PyMake(struct _typeobject *, PyObject *, PyObject *) //
}
// constructor method
int ArcOfConicPy::PyInit(PyObject* args, PyObject* /*kwds*/)
int ArcOfConicPy::PyInit(PyObject* /*args*/, PyObject* /*kwds*/)
{
return -1;
}

View File

@ -87,7 +87,7 @@ int Curve2dPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/)
return 0;
}
PyObject* Curve2dPy::reverse(PyObject *args)
PyObject* Curve2dPy::reverse(PyObject * /*args*/)
{
try {
Handle_Geom2d_Curve curve = Handle_Geom2d_Curve::DownCast(getGeom2dCurvePtr()->handle());

View File

@ -162,6 +162,28 @@ class CommandPathPost:
return True
return False
def exportObjectsWith(self, objs, job, needFilename = True):
# check if the user has a project and has set the default post and
# output filename
postArgs = PathPreferences.defaultPostProcessorArgs()
if hasattr(job, "PostProcessorArgs") and job.PostProcessorArgs:
postArgs = job.PostProcessorArgs
elif hasattr(job, "PostProcessor") and job.PostProcessor:
postArgs = ''
postname = self.resolvePostProcessor(job)
filename = '-'
if postname and needFilename:
filename = self.resolveFileName(job)
if postname and filename:
print("post: %s(%s, %s)" % (postname, filename, postArgs))
processor = PostProcessor.load(postname)
gcode = processor.export(objs, filename, postArgs)
return (False, gcode)
else:
return (True, '')
def Activated(self):
FreeCAD.ActiveDocument.openTransaction(
translate("Path_Post", "Post Process the Selected path(s)"))
@ -187,7 +209,7 @@ class CommandPathPost:
else:
job = jobs.pop()
print("Job for selected objects = %s" % job.Name)
(fail, rc) = exportObjectsWith(selected, job)
(fail, rc) = self.exportObjectsWith(selected, job)
if fail:
FreeCAD.ActiveDocument.abortTransaction()
@ -195,27 +217,7 @@ class CommandPathPost:
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
def exportObjectsWith(self, objs, job, needFilename = True):
# check if the user has a project and has set the default post and
# output filename
postArgs = PathPreferences.defaultPostProcessorArgs()
if hasattr(job, "PostProcessorArgs") and job.PostProcessorArgs:
postArgs = job.PostProcessorArgs
elif hasattr(job, "PostProcessor") and job.PostProcessor:
postArgs = ''
postname = self.resolvePostProcessor(job)
filename = '-'
if postname and needFilename:
filename = self.resolveFileName(job)
if postname and filename:
print("post: %s(%s, %s)" % (postname, filename, postArgs))
processor = PostProcessor.load(postname)
gcode = processor.export(objs, filename, postArgs)
return (False, gcode)
else:
return (True, '')
if FreeCAD.GuiUp:
# register the FreeCAD command

View File

@ -26,6 +26,7 @@
#ifndef _PreComp_
# include <sstream>
#include <QRectF>
#include <cmath>
#endif
#include <App/Document.h>
@ -35,6 +36,7 @@
#include <Base/Console.h>
#include <Base/Exception.h>
#include "DrawUtil.h"
#include "DrawPage.h"
#include "DrawProjGroupItem.h"
@ -65,13 +67,91 @@ DrawProjGroup::DrawProjGroup(void)
ADD_PROPERTY_TYPE(spacingX, (15), agroup, App::Prop_None, "Horizontal spacing between views");
ADD_PROPERTY_TYPE(spacingY, (15), agroup, App::Prop_None, "Vertical spacing between views");
ADD_PROPERTY(viewOrientationMatrix, (Base::Matrix4D()));
}
DrawProjGroup::~DrawProjGroup()
{
}
void DrawProjGroup::onChanged(const App::Property* prop)
{
//TODO: For some reason, when the projection type is changed, the isometric views show change appropriately, but the orthographic ones dont... Or vice-versa. why would you change from 1st to 3rd in mid drawing?
//if group hasn't been added to page yet, can't scale or distribute projItems
TechDraw::DrawPage *page = getPage();
if (!isRestoring() && page) {
if ( prop == &Views ) {
recompute();
} else if (prop == &Scale) {
updateChildren(Scale.getValue());
//resetPositions();
distributeProjections();
} else if (prop == &Source) {
App::DocumentObject* sourceObj = Source.getValue();
if (sourceObj != nullptr) {
if (!hasAnchor()) {
addProjection("Front");
}
} else {
//Source has been changed to null! Why? What to do?
}
} else if (prop == &ScaleType) {
recompute();
} else if (prop == &AutoDistribute &&
AutoDistribute.getValue()) {
resetPositions();
recompute();
}
}
TechDraw::DrawViewCollection::onChanged(prop);
}
App::DocumentObjectExecReturn *DrawProjGroup::execute(void)
{
//if group hasn't been added to page yet, can't scale or distribute projItems
TechDraw::DrawPage *page = getPage();
if (!page) {
return DrawViewCollection::execute();
}
App::DocumentObject* docObj = Source.getValue();
if (docObj == nullptr) {
return DrawViewCollection::execute();
}
docObj = Anchor.getValue(); //must have an anchor, so create one as soon as we have a Page and Source
if (docObj == nullptr) {
docObj = addProjection("Front");
}
double newScale = Scale.getValue();
if (ScaleType.isValue("Automatic")) {
//Recalculate scale if Group is too big or too small!
if (!checkFit(page)) {
newScale = calculateAutomaticScale();
if(std::abs(Scale.getValue() - newScale) > FLT_EPSILON) {
resetPositions();
Scale.setValue(newScale);
}
}
} else if (ScaleType.isValue("Page")) {
newScale = page->Scale.getValue();
if(std::abs(Scale.getValue() - newScale) > FLT_EPSILON) {
resetPositions();
Scale.setValue(newScale);
}
} else if (ScaleType.isValue("Custom")) {
//don't have to do anything special
}
// recalculate positions for children
if (Views.getSize()) {
updateChildren(newScale);
distributeProjections();
}
return DrawViewCollection::execute();
}
short DrawProjGroup::mustExecute() const
{
short result = 0;
@ -169,7 +249,6 @@ QRectF DrawProjGroup::getRect() const //this is current rect, not potent
arrangeViewPointers(viewPtrs);
double width, height;
minimumBbViews(viewPtrs, width, height); // w,h of just the views at 1:1 scale
//need to add spacingX,spacingY
double xSpace = spacingX.getValue() * 3.0 * std::max(1.0,Scale.getValue());
double ySpace = spacingY.getValue() * 2.0 * std::max(1.0,Scale.getValue());
double rectW = Scale.getValue() * width + xSpace; //scale the 1:1 w,h and add whitespace
@ -200,28 +279,6 @@ void DrawProjGroup::minimumBbViews(DrawProjGroupItem *viewPtrs[10],
height = row0h + row1h + row2h;
}
void DrawProjGroup::onChanged(const App::Property* prop)
{
//TODO: For some reason, when the projection type is changed, the isometric views show change appropriately, but the orthographic ones dont... Or vice-versa.
//if group hasn't been added to page yet, can't scale or distribute projItems
TechDraw::DrawPage *page = getPage();
if (!isRestoring() && page) {
if ( prop == &Views ) {
recompute();
} else if (prop == &Scale) {
updateChildren(Scale.getValue());
//resetPositions();
distributeProjections();
} else if (prop == &ScaleType) {
recompute();
} else if (prop == &AutoDistribute &&
AutoDistribute.getValue()) {
resetPositions();
recompute();
}
}
TechDraw::DrawViewCollection::onChanged(prop);
}
void DrawProjGroup::moveToCentre(void)
{
@ -247,6 +304,14 @@ App::DocumentObject * DrawProjGroup::getProjObj(const char *viewProjType) const
return 0;
}
DrawProjGroupItem* DrawProjGroup::getProjItem(const char *viewProjType) const
{
App::DocumentObject* docObj = getProjObj(viewProjType);
DrawProjGroupItem* result = static_cast<DrawProjGroupItem*>(docObj);
return result;
}
bool DrawProjGroup::checkViewProjType(const char *in)
{
if ( strcmp(in, "Front") == 0 ||
@ -288,9 +353,6 @@ App::DocumentObject * DrawProjGroup::addProjection(const char *viewProjType)
std::string FeatName = getDocument()->getUniqueObjectName("ProjItem");
auto docObj( getDocument()->addObject( "TechDraw::DrawProjGroupItem", //add to Document
FeatName.c_str() ) );
if( strcmp(viewProjType,"Front") == 0 ) {
Anchor.setValue(docObj);
}
view = static_cast<TechDraw::DrawProjGroupItem *>( docObj );
view->Source.setValue( Source.getValue() );
if (ScaleType.isValue("Automatic")) {
@ -301,7 +363,17 @@ App::DocumentObject * DrawProjGroup::addProjection(const char *viewProjType)
view->Scale.setValue( Scale.getValue() );
view->Type.setValue( viewProjType );
view->Label.setValue( viewProjType );
setViewOrientation( view, viewProjType );
if( strcmp(viewProjType,"Front") == 0 ) {
Anchor.setValue(docObj);
view->Direction.setValue(nameToStdDirection("Front")); //just (Base::Vector3d(0.0,-1.0,0.0))
view->recomputeFeature();
makeInitialMap(view);
//dumpMap();
} else {
//dumpMap();
view->Direction.setValue(m_viewDir[viewProjType]);
}
addView(view); //from DrawViewCollection - add to ProjGroup Views
moveToCentre();
@ -351,44 +423,6 @@ int DrawProjGroup::purgeProjections()
return Views.getValues().size();
}
void DrawProjGroup::setViewOrientation(DrawProjGroupItem *v, const char *projType) const
{
Base::Vector3d dir;
// Traditional orthographic
if(strcmp(projType, "Front") == 0) {
dir.Set(0, -1, 0);
} else if(strcmp(projType, "Rear") == 0) {
dir.Set(0, 1, 0);
} else if(strcmp(projType, "Right") == 0) {
dir.Set(1, 0, 0);
} else if(strcmp(projType, "Left") == 0) {
dir.Set(-1, 0, 0);
} else if(strcmp(projType, "Top") == 0) {
dir.Set(0, 0, 1);
} else if(strcmp(projType, "Bottom") == 0) {
dir.Set(0, 0, -1);
// Isometric
} else if(strcmp(projType, "FrontTopLeft") == 0) {
dir.Set(-1,-1,1);
dir.Normalize();
} else if(strcmp(projType, "FrontTopRight") == 0) {
dir.Set(1, -1, 1);
dir.Normalize();
} else if(strcmp(projType, "FrontBottomRight") == 0) {
dir.Set(1, -1, -1);
dir.Normalize();
} else if(strcmp(projType, "FrontBottomLeft") == 0) {
dir.Set(-1, -1, -1);
dir.Normalize();
} else {
throw Base::Exception("Unknown view type in DrawProjGroup::setViewOrientation()");
}
dir = viewOrientationMatrix.getValue() * dir; //multiply std dir by transform matrix
v->Direction.setValue(dir);
}
void DrawProjGroup::arrangeViewPointers(DrawProjGroupItem *viewPtrs[10]) const
{
for (int i=0; i<10; ++i) {
@ -570,58 +604,7 @@ void DrawProjGroup::resetPositions(void)
}
}
//TODO: Turn this into a command so it can be issued from python
//????: this sets the orientation for all views, not just Front???
void DrawProjGroup::setFrontViewOrientation(const Base::Matrix4D &newMat)
{
viewOrientationMatrix.setValue(newMat);
for( auto it : Views.getValues() ) {
auto view( dynamic_cast<DrawProjGroupItem *>(it) );
if( view ) {
setViewOrientation(view, view->Type.getValueAsString());
// TODO: Seems we should ensure that modifying the view triggers this automatically? IR
view->touch();
}
}
}
App::DocumentObjectExecReturn *DrawProjGroup::execute(void)
{
//if group hasn't been added to page yet, can't scale or distribute projItems
TechDraw::DrawPage *page = getPage();
if (!page) {
return DrawViewCollection::execute();
}
double newScale = Scale.getValue();
if (ScaleType.isValue("Automatic")) {
//Recalculate scale if Group is too big or too small!
if (!checkFit(page)) {
newScale = calculateAutomaticScale();
if(std::abs(Scale.getValue() - newScale) > FLT_EPSILON) {
resetPositions();
Scale.setValue(newScale);
}
}
} else if (ScaleType.isValue("Page")) {
newScale = page->Scale.getValue();
if(std::abs(Scale.getValue() - newScale) > FLT_EPSILON) {
resetPositions();
Scale.setValue(newScale);
}
} else if (ScaleType.isValue("Custom")) {
//don't have to do anything special
}
// recalculate positions for children
if (Views.getSize()) {
updateChildren(newScale);
//resetPositions();
distributeProjections();
}
return DrawViewCollection::execute();
}
void DrawProjGroup::updateChildren(double scale)
{
@ -686,8 +669,277 @@ App::Enumeration DrawProjGroup::usedProjectionType(void)
return ret;
}
bool DrawProjGroup::hasAnchor(void)
{
bool result = false;
App::DocumentObject* docObj = Anchor.getValue();
if (docObj != nullptr) {
result = true;
}
return result;
}
void DrawProjGroup::setAnchorDirection(const Base::Vector3d dir)
{
App::DocumentObject* docObj = Anchor.getValue();
DrawProjGroupItem* item = static_cast<DrawProjGroupItem*>(docObj);
item->Direction.setValue(dir);
}
Base::Vector3d DrawProjGroup::getAnchorDirection(void)
{
Base::Vector3d result;
App::DocumentObject* docObj = Anchor.getValue();
if (docObj != nullptr) {
DrawProjGroupItem* item = static_cast<DrawProjGroupItem*>(docObj);
result = item->Direction.getValue();
} else {
Base::Console().Log("ERROR - DPG::getAnchorDir - no Anchor!!\n");
}
return result;
}
//static
Base::Vector3d DrawProjGroup::nameToStdDirection(std::string name)
{
Base::Vector3d result;
//name to standard view direction
std::map<std::string,Base::Vector3d> stdViews = {
{ "Front", Base::Vector3d(0, -1, 0) },
{ "Rear", Base::Vector3d(0, 1, 0) },
{ "Right", Base::Vector3d(1, 0, 0) },
{ "Left", Base::Vector3d(-1, 0, 0) },
{ "Top", Base::Vector3d(0, 0, 1) },
{ "Bottom", Base::Vector3d(0, 0, -1) },
{ "FrontTopLeft", Base::Vector3d(-1,-1,1) },
{ "FrontTopRight", Base::Vector3d(1, -1, 1) },
{ "FrontBottomRight", Base::Vector3d(1, -1, -1) },
{ "FrontBottomLeft", Base::Vector3d(-1, -1, -1) } };
auto it = stdViews.find(name);
if (it != stdViews.end()) {
result = (*it).second;
}
return result;
}
//*************************************
//* view direction manipulation routines
//*************************************
//make map from anchor u,v,w
//std::map<std::string,Base::Vector3d> DrawProjGroup::makeInitialMap(TechDraw::DrawProjGroupItem* anchor)
void DrawProjGroup::makeInitialMap(TechDraw::DrawProjGroupItem* anchor)
{
m_viewDir = makeUnspunMap(anchor->Direction.getValue(),
anchor->getUDir(),
anchor->getVDir() * -1); //the infamous flipped Y
}
//! remake map from FRT
std::map<std::string,Base::Vector3d> DrawProjGroup::makeUnspunMap()
{
return makeUnspunMap(m_viewDir["Front"],
m_viewDir["Right"],
m_viewDir["Top"]);
}
//remake this everytime Anchor.Direction changes
std::map<std::string,Base::Vector3d> DrawProjGroup::makeUnspunMap(Base::Vector3d f, Base::Vector3d r, Base::Vector3d t)
{
std::map<std::string,Base::Vector3d> viewDir;
viewDir["Front"] = f;
viewDir["Right"] = r;
viewDir["Top"] = t;
viewDir["Rear"] = viewDir["Front"] * -1.0;
viewDir["Left"] = viewDir["Right"] * -1.0;
viewDir["Bottom"] = viewDir["Top"] * -1.0;
viewDir["FrontTopRight"] = viewDir["Right"] + viewDir["Front"] + viewDir["Top"];
viewDir["FrontTopLeft"] = viewDir["Left"] + viewDir["Front"] + viewDir["Top"];
viewDir["FrontBottomRight"] = viewDir["Right"] + viewDir["Front"] + viewDir["Bottom"];
viewDir["FrontBottomLeft"] = viewDir["Left"] + viewDir["Front"] + viewDir["Bottom"];
return viewDir;
}
void DrawProjGroup::dumpMap()
{
Base::Console().Message("TRACE - DPG::dumpMap - entries: %d\n",m_viewDir.size());
std::map<std::string, Base::Vector3d>::const_iterator it;
for (it = m_viewDir.begin(); it != m_viewDir.end(); it++)
{
Base::Console().Message("%s - %s\n",(it->first).c_str(), DrawUtil::formatVector(it->second).c_str());
}
}
void DrawProjGroup::updateSecondaryDirs()
{
for (auto& docObj: Views.getValues()) {
Base::Vector3d newDir;
DrawProjGroupItem* v = static_cast<DrawProjGroupItem*>(docObj);
ProjItemType t = static_cast<ProjItemType>(v->Type.getValue());
switch (t) {
case Front : {
newDir = m_viewDir["Front"];
break;
}
case Rear : {
newDir = m_viewDir["Rear"];
break;
}
case Left : {
newDir = m_viewDir["Left"];
break;
}
case Right : {
newDir = m_viewDir["Right"];
break;
}
case Top : {
newDir = m_viewDir["Top"];
break;
}
case Bottom : {
newDir = m_viewDir["Bottom"];
break;
}
case FrontTopLeft : {
newDir = m_viewDir["FrontTopLeft"];
break;
}
case FrontTopRight : {
newDir = m_viewDir["FrontTopRight"];
break;
}
case FrontBottomLeft : {
newDir = m_viewDir["FrontBottomLeft"];
break;
}
case FrontBottomRight : {
newDir = m_viewDir["FrontBottomRight"];
break;
}
default: {
//TARFU invalid secondary type
Base::Console().Message("ERROR - DPG::updateSecondaryDirs - invalid projection type\n");
newDir = v->Direction.getValue();
}
}
v->Direction.setValue(newDir);
}
}
void DrawProjGroup::rotateRight()
{
//Front -> Right -> Rear -> Left -> Front
Base::Vector3d f,r,t;
f = m_viewDir["Left"];
r = m_viewDir["Front"];
t = m_viewDir["Top"];
m_viewDir = makeUnspunMap(f,r,t);
updateSecondaryDirs();
}
void DrawProjGroup::rotateLeft()
{
//Front -> Left -> Rear -> Right -> Front
Base::Vector3d f,r,t;
f = m_viewDir["Right"];
r = m_viewDir["Rear"];
t = m_viewDir["Top"];
m_viewDir = makeUnspunMap(f,r,t);
updateSecondaryDirs();
}
void DrawProjGroup::rotateUp()
{
//Front -> Top -> Rear -> Bottom -> Front
Base::Vector3d f,r,t;
f = m_viewDir["Bottom"];
r = m_viewDir["Right"];
t = m_viewDir["Front"];
m_viewDir = makeUnspunMap(f,r,t);
updateSecondaryDirs();
}
void DrawProjGroup::rotateDown()
{
//Front -> Bottom -> Rear -> Top -> Front
Base::Vector3d f,r,t;
f = m_viewDir["Top"];
r = m_viewDir["Right"];
t = m_viewDir["Rear"];
m_viewDir = makeUnspunMap(f,r,t);
updateSecondaryDirs();
}
void DrawProjGroup::spinCW()
{
//Top -> Right -> Bottom -> Left -> Top
Base::Vector3d f,r,t;
f = m_viewDir["Front"];
t = m_viewDir["Left"];
r = m_viewDir["Top"];
m_viewDir = makeUnspunMap(f,r,t);
updateSecondaryDirs();
}
void DrawProjGroup::spinCCW()
{
//Top -> Left -> Bottom -> Right -> Top
Base::Vector3d f,r,t;
f = m_viewDir["Front"];
t = m_viewDir["Right"];
r = m_viewDir["Bottom"];
m_viewDir = makeUnspunMap(f,r,t);
updateSecondaryDirs();
}
//*************************************
//! rebuild view direction map from existing DPGI's if possible or from Anchor
void DrawProjGroup::onDocumentRestored()
{
Base::Vector3d f,r,t;
bool ffound = false;
bool rfound = false;
bool tfound = false;
for (auto& docObj: Views.getValues()) {
DrawProjGroupItem* v = static_cast<DrawProjGroupItem*>(docObj);
ProjItemType type = static_cast<ProjItemType>(v->Type.getValue());
switch (type) {
case Front : {
f = v->Direction.getValue();
ffound = true;
break;
}
case Right : {
r = v->Direction.getValue();
rfound = true;
break;
}
case Top : {
t = v->Direction.getValue();
tfound = true;
break;
}
default: {
break;
}
}
}
if (ffound && rfound && tfound) {
m_viewDir = makeUnspunMap(f,r,t);
} else {
App::DocumentObject* docObj = Anchor.getValue();
TechDraw::DrawProjGroupItem* view = static_cast<TechDraw::DrawProjGroupItem*>( docObj );
makeInitialMap(view);
Base::Console().Log("LOG: - DPG::restore - making map from Anchor\n");
}
//dumpMap();
DrawViewCollection::onDocumentRestored();
}

View File

@ -23,12 +23,14 @@
#ifndef _TECHDRAW_FEATUREVIEWGROUP_H_
#define _TECHDRAW_FEATUREVIEWGROUP_H_
#include <string>
# include <QRectF>
#include <App/DocumentObject.h>
#include <App/PropertyStandard.h>
#include <Base/BoundBox.h>
#include <Base/Matrix.h>
#include <Base/Vector3D.h>
#include "DrawViewCollection.h"
@ -58,9 +60,6 @@ public:
/// Default vertical spacing between adjacent views on Drawing, in mm
App::PropertyFloat spacingY;
/// Transforms Direction and XAxisDirection vectors in child views
App::PropertyMatrix viewOrientationMatrix;
App::PropertyLink Anchor; /// Anchor Element to align views to
Base::BoundBox3d getBoundingBox() const;
@ -71,6 +70,7 @@ public:
bool hasProjection(const char *viewProjType) const;
App::DocumentObject * getProjObj(const char *viewProjType) const;
DrawProjGroupItem* getProjItem(const char *viewProjType) const;
//! Adds a projection to the group
/*!
@ -88,11 +88,6 @@ public:
/// Automatically position child views
bool distributeProjections(void);
void resetPositions(void);
/// Changes child views' coordinate space
/*!
* Used to set the Direction and XAxisDirection in child views
*/
void setFrontViewOrientation(const Base::Matrix4D &newMat);
short mustExecute() const;
/** @name methods overide Feature */
@ -115,29 +110,25 @@ public:
/// Allowed projection types - either Document, First Angle or Third Angle
static const char* ProjectionTypeEnums[];
/// Sets Direction in v
/*!
* Applies viewOrientationMatrix to appropriate unit vectors depending on projType
*/
void setViewOrientation(DrawProjGroupItem *v, const char *projType) const;
/// Populates an array of DrawProjGroupItem*s arranged for drawing
/*!
* Setup array of pointers to the views that we're displaying,
* assuming front is in centre (index 4):
* <pre>
* [0] [1] [2]
* [3] [4] [5] [6]
* [7] [8] [9]
*
* Third Angle: FTL T FTRight
* L F Right Rear
* FBL B FBRight
*
* First Angle: FBRight B FBL
* Right F L Rear
* FTRight T FTL
* </pre>
*/
bool hasAnchor(void);
void setAnchorDirection(Base::Vector3d dir);
Base::Vector3d getAnchorDirection(void);
void makeInitialMap(TechDraw::DrawProjGroupItem* anchor);
std::map<std::string,Base::Vector3d> makeUnspunMap(Base::Vector3d f, Base::Vector3d r, Base::Vector3d t);
std::map<std::string,Base::Vector3d> makeUnspunMap(void);
void dumpMap();
void updateSecondaryDirs();
void rotateRight(void);
void rotateLeft(void);
void rotateUp(void);
void rotateDown(void);
void spinCW(void);
void spinCCW(void);
static Base::Vector3d nameToStdDirection(std::string name);
protected:
void onChanged(const App::Property* prop);
@ -174,6 +165,8 @@ protected:
/// Returns pointer to our page, or NULL if it couldn't be located
TechDraw::DrawPage * getPage(void) const;
void updateChildren(double scale);
std::map<std::string,Base::Vector3d> m_viewDir;
};

View File

@ -34,6 +34,7 @@
#include <Mod/TechDraw/App/DrawProjGroupItemPy.h> // generated from DrawProjGroupItemPy.xml
using namespace TechDraw;
const char* DrawProjGroupItem::TypeEnums[] = {"Front",

View File

@ -30,6 +30,18 @@
namespace TechDraw
{
enum ProjItemType{ Front,
Left,
Right,
Rear,
Top,
Bottom,
FrontTopLeft,
FrontTopRight,
FrontBottomLeft,
FrontBottomRight };
class DrawProjGroup;
class TechDrawExport DrawProjGroupItem : public TechDraw::DrawViewPart

View File

@ -71,6 +71,7 @@ PyObject* DrawProjGroupPy::getItemByLabel(PyObject* args)
return new DrawProjGroupItemPy(newProj);
}
//TODO: this is no longer required?
PyObject* DrawProjGroupPy::setViewOrientation(PyObject* args)
{
const char* projType;
@ -78,15 +79,15 @@ PyObject* DrawProjGroupPy::setViewOrientation(PyObject* args)
if (!PyArg_ParseTuple(args, "Os", &pcObj,&projType))
throw Py::Exception();
App::DocumentObject* obj = static_cast<App::DocumentObjectPy*>(pcObj)->getDocumentObjectPtr();
if (obj->getTypeId().isDerivedFrom(TechDraw::DrawProjGroupItem::getClassTypeId())) {
TechDraw::DrawProjGroupItem* view = static_cast<TechDraw::DrawProjGroupItem*>(obj);
TechDraw::DrawProjGroup* projGroup = getDrawProjGroupPtr();
projGroup->setViewOrientation( view, projType );
// App::DocumentObject* obj = static_cast<App::DocumentObjectPy*>(pcObj)->getDocumentObjectPtr();
// if (obj->getTypeId().isDerivedFrom(TechDraw::DrawProjGroupItem::getClassTypeId())) {
// TechDraw::DrawProjGroupItem* view = static_cast<TechDraw::DrawProjGroupItem*>(obj);
// TechDraw::DrawProjGroup* projGroup = getDrawProjGroupPtr();
// projGroup->setViewOrientation( view, projType );
} else {
Base::Console().Message("'%s' is not a DrawProjGroup Item, it will be ignored.\n", obj->Label.getValue());
}
// } else {
// Base::Console().Message("'%s' is not a DrawProjGroup Item, it will be ignored.\n", obj->Label.getValue());
// }
return Py_None;
}

View File

@ -103,7 +103,6 @@ DrawViewDetail::DrawViewDetail()
ADD_PROPERTY_TYPE(Reference ,("1"),dgroup,App::Prop_None,"An identifier for this detail");
getParameters();
}
DrawViewDetail::~DrawViewDetail()
@ -235,7 +234,7 @@ App::DocumentObjectExecReturn *DrawViewDetail::execute(void)
gp_Pnt inputCenter;
try {
inputCenter = TechDrawGeometry::findCentroid(detail,
inputCenter = TechDrawGeometry::findCentroid(tool,
Direction.getValue());
TopoDS_Shape mirroredShape = TechDrawGeometry::mirrorShape(detail,
inputCenter,

View File

@ -143,6 +143,7 @@ DrawViewPart::~DrawViewPart()
App::DocumentObjectExecReturn *DrawViewPart::execute(void)
{
//Base::Console().Message("TRACE - DVP::execute() - %s\n",getNameInDocument());
App::DocumentObject *link = Source.getValue();
if (!link) {
return new App::DocumentObjectExecReturn("FVP - No Source object linked");

View File

@ -74,6 +74,7 @@
#include "Geometry.h"
#include "GeometryObject.h"
#include "EdgeWalker.h"
#include "DrawUtil.h"
#include "DrawProjectSplit.h"
#include "DrawViewSection.h"
@ -449,6 +450,50 @@ bool DrawViewSection::isReallyInBox (const Base::Vector3d v, const Base::BoundBo
return true;
}
//! calculate the section Normal/Projection Direction given baseView projection direction and section name
/*static*/
Base::Vector3d DrawViewSection::getSectionVector (const Base::Vector3d baseViewDir, const std::string sectionName)
{
Base::Vector3d result;
Base::Vector3d stdX(1.0,0.0,0.0);
Base::Vector3d stdY(0.0,1.0,0.0);
Base::Vector3d stdZ(0.0,0.0,1.0);
Base::Vector3d view = baseViewDir;
view.Normalize();
Base::Vector3d left = view.Cross(stdZ);
left.Normalize(); //redundent?
Base::Vector3d down = view.Cross(left);
down.Normalize(); //redundent?
double dot = view.Dot(stdZ);
if (sectionName == "Up") {
result = down;
if (DrawUtil::fpCompare(fabs(dot),1.0)) {
result = (-1.0 * stdY);
}
} else if (sectionName == "Down") {
result = down * -1.0;
if (DrawUtil::fpCompare(fabs(dot),1.0)) {
result = stdY;
}
} else if (sectionName == "Left") {
result = left * -1.0;
if (DrawUtil::fpCompare(fabs(dot),1.0)) {
result = stdX;
}
} else if (sectionName == "Right") {
result = left;
if (DrawUtil::fpCompare(fabs(dot),1.0)) {
result = -1.0 * stdX;
}
} else {
Base::Console().Log("Error - DVS::getSectionVector - bad sectionName: %s\n",sectionName.c_str());
result = stdZ;
}
return result;
}
void DrawViewSection::getParameters()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()

View File

@ -84,6 +84,8 @@ public:
public:
std::vector<TechDrawGeometry::Face*> getFaceGeometry();
static Base::Vector3d getSectionVector (const Base::Vector3d baseViewDir, const std::string sectionName);
static const char* SectionDirEnums[];
protected:

View File

@ -481,16 +481,17 @@ void CmdTechDrawProjGroup::activated(int iMsg)
std::string multiViewName = getUniqueObjectName("cView");
std::string SourceName = (*shapes.begin())->getNameInDocument();
doCommand(Doc,"App.activeDocument().addObject('TechDraw::DrawProjGroup','%s')",multiViewName.c_str());
doCommand(Doc,"App.activeDocument().%s.addView(App.activeDocument().%s)",PageName.c_str(),multiViewName.c_str());
doCommand(Doc,"App.activeDocument().%s.Source = App.activeDocument().%s",multiViewName.c_str(),SourceName.c_str());
App::DocumentObject *docObj = getDocument()->getObject(multiViewName.c_str());
auto multiView( static_cast<TechDraw::DrawProjGroup *>(docObj) );
// set the anchor
std::string anchor = "Front";
doCommand(Doc,"App.activeDocument().%s.addProjection('%s')",multiViewName.c_str(),anchor.c_str());
// std::string anchor = "Front";
// doCommand(Doc,"App.activeDocument().%s.addProjection('%s')",multiViewName.c_str(),anchor.c_str());
// add the multiView to the page
doCommand(Doc,"App.activeDocument().%s.addView(App.activeDocument().%s)",PageName.c_str(),multiViewName.c_str());
// doCommand(Doc,"App.activeDocument().%s.addView(App.activeDocument().%s)",PageName.c_str(),multiViewName.c_str());
// create the rest of the desired views
Gui::Control().showDialog(new TaskDlgProjGroup(multiView,true));

View File

@ -180,19 +180,6 @@ MDIViewPage::MDIViewPage(ViewProviderPage *pageVp, Gui::Document* doc, QWidget*
MDIViewPage::~MDIViewPage()
{
// Safely remove graphicview items that have built up TEMP SOLUTION
for(auto it : deleteItems) {
auto qObjPtr( dynamic_cast<QObject *>(it) );
if (qObjPtr) {
qObjPtr->deleteLater();
} else {
delete it;
}
}
deleteItems.clear();
//m_view will be deleted by MDIViewPage as a Qt child
//delete m_view;
}
@ -403,7 +390,6 @@ void MDIViewPage::updateDrawing(bool forceUpdate)
Base::Console().Log("ERROR - MDIViewPage::updateDrawing - %s already removed from QGraphicsScene\n",
(*itGraphics)->getViewName());
}
deleteItems.append(*itGraphics); // delete in the destructor when completly safe. TEMP SOLUTION
}
itGraphics++;
}

View File

@ -23,9 +23,6 @@
#include "PreCompiled.h"
#ifndef _PreComp_
#include <assert.h>
//#include <QGraphicsScene>
//#include <QGraphicsSceneHoverEvent>
//#include <QMouseEvent>
#include <QPainter>
#include <QStyleOptionGraphicsItem>
#endif
@ -55,16 +52,18 @@ QGIMatting::QGIMatting() :
setFlag(QGraphicsItem::ItemIsSelectable, false);
setFlag(QGraphicsItem::ItemIsMovable, false);
m_mat = new QGraphicsPathItem(); //QGIPrimPath??
m_mat = new QGraphicsPathItem();
addToGroup(m_mat);
m_border = new QGraphicsPathItem();
addToGroup(m_border);
m_pen.setColor(Qt::white);
m_brush.setColor(Qt::white);
m_brush.setStyle(Qt::SolidPattern);
// m_pen.setColor(Qt::black);
// m_pen.setStyle(Qt::DashLine);
m_brush.setColor(Qt::white);
// m_brush.setColor(Qt::black);
m_brush.setStyle(Qt::SolidPattern);
// m_brush.setStyle(Qt::CrossPattern);
// m_brush.setStyle(Qt::NoBrush);
m_penB.setColor(Qt::black);
m_brushB.setStyle(Qt::NoBrush);
@ -77,29 +76,14 @@ QGIMatting::QGIMatting() :
setZValue(ZVALUE::MATTING);
}
void QGIMatting::centerAt(QPointF centerPos)
{
QRectF box = boundingRect();
double width = box.width();
double height = box.height();
double newX = centerPos.x() - width/2.;
double newY = centerPos.y() - height/2.;
setPos(newX,newY);
}
void QGIMatting::centerAt(double cX, double cY)
{
QRectF box = boundingRect();
double width = box.width();
double height = box.height();
double newX = cX - width/2.;
double newY = cY - height/2.;
setPos(newX,newY);
}
void QGIMatting::draw()
{
QRectF outline(-m_width/2.0,-m_height/2.0,m_width,m_height);
prepareGeometryChange();
double radiusFudge = 1.15; //keep slightly larger than fudge in App/DVDetail to prevent bleed through
double outerRadius = m_radius * radiusFudge;
m_width = outerRadius;
m_height = outerRadius;
QRectF outline(-m_width,-m_height,2.0 * m_width,2.0 * m_height);
QPainterPath ppOut;
ppOut.addRect(outline);
QPainterPath ppCut;
@ -107,13 +91,15 @@ void QGIMatting::draw()
QRectF roundCutout (-m_radius,-m_radius,2.0 * m_radius,2.0 * m_radius);
ppCut.addEllipse(roundCutout);
} else {
double squareSize = m_radius / 1.4142; //fit within radius
double squareSize = m_radius/ 1.4142; //fit just within radius
QRectF squareCutout (-squareSize,-squareSize,2.0 * squareSize,2.0 * squareSize);
ppCut.addRect(squareCutout);
}
ppOut.addPath(ppCut);
m_mat->setPath(ppOut);
m_border->setPath(ppCut);
m_mat->setZValue(ZVALUE::MATTING);
m_border->setZValue(ZVALUE::MATTING);
}
int QGIMatting::getHoleStyle()
@ -124,9 +110,19 @@ int QGIMatting::getHoleStyle()
return style;
}
//need this because QQGIG only updates BR when items added/deleted.
QRectF QGIMatting::boundingRect() const
{
QRectF result ;
result = childrenBoundingRect().adjusted(-1,-1,1,1);
return result;
}
void QGIMatting::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget) {
QStyleOptionGraphicsItem myOption(*option);
myOption.state &= ~QStyle::State_Selected;
//painter->drawRect(boundingRect().adjusted(-2.0,-2.0,2.0,2.0));
QGraphicsItemGroup::paint (painter, &myOption, widget);
}

View File

@ -49,8 +49,7 @@ public:
int type() const { return Type;}
virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
virtual void centerAt(QPointF centerPos);
virtual void centerAt(double cX, double cY);
virtual QRectF boundingRect() const;
virtual void setSize(double w, double h) {m_height = h; m_width = w;}
//virtual void setHoleStyle(int hs) {m_holeStyle = hs;}

View File

@ -329,6 +329,7 @@ void QGIView::drawCaption()
QRectF displayArea = customChildrenBoundingRect();
m_caption->setDefaultTextColor(m_colCurrent);
m_font.setFamily(getPrefFont());
m_font.setPointSize(getPrefFontSize()); //scene units (mm), not points
m_caption->setFont(m_font);
QString captionStr = QString::fromUtf8(getViewObject()->Caption.getValue());
m_caption->setPlainText(captionStr);
@ -361,6 +362,7 @@ void QGIView::drawBorder()
m_label->setDefaultTextColor(m_colCurrent);
m_font.setFamily(getPrefFont());
m_font.setPointSize(getPrefFontSize()); //scene units (mm), not points
m_label->setFont(m_font);
QString labelStr = QString::fromUtf8(getViewObject()->Label.getValue());
m_label->setPlainText(labelStr);

View File

@ -310,8 +310,8 @@ void QGIViewPart::updateView(bool update)
void QGIViewPart::draw() {
drawViewPart();
drawBorder();
drawMatting();
drawBorder();
}
void QGIViewPart::drawViewPart()
@ -492,6 +492,9 @@ void QGIViewPart::removeDecorations()
QGIDecoration* decor = dynamic_cast<QGIDecoration*>(c);
QGIMatting* mat = dynamic_cast<QGIMatting*>(c);
if (decor) {
removeFromGroup(decor);
scene()->removeItem(decor);
delete decor;
} else if (mat) {
removeFromGroup(mat);
scene()->removeItem(mat);
@ -622,11 +625,8 @@ void QGIViewPart::drawMatting()
double radius = dvd->Radius.getValue() * scale;
QGIMatting* mat = new QGIMatting();
addToGroup(mat);
mat->setPos(0.0,0.0);
mat->setRadius(radius);
QRectF displayArea = customChildrenBoundingRect();
mat->setSize(displayArea.width(),displayArea.height());
//mat->setHoleStyle(dvd->getMattingStyle());
mat->setPos(0.0,0.0);
mat->draw();
mat->show();
}

View File

@ -53,5 +53,11 @@
<file>icons/actions/section-down.svg</file>
<file>icons/actions/section-left.svg</file>
<file>icons/actions/section-right.svg</file>
<file>icons/arrow-right.svg</file>
<file>icons/arrow-left.svg</file>
<file>icons/arrow-up.svg</file>
<file>icons/arrow-down.svg</file>
<file>icons/arrow-ccw.svg</file>
<file>icons/arrow-cw.svg</file>
</qresource>
</RCC>

View File

@ -0,0 +1,230 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg6248"
sodipodi:version="0.32"
inkscape:version="0.48.1 r9760"
sodipodi:docname="view-rotate-left.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs6250">
<linearGradient
id="linearGradient3253">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253"
id="radialGradient3270"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)"
cx="10.328116"
cy="25.129232"
fx="10.328116"
fy="25.129232"
r="27.986705" />
<linearGradient
inkscape:collect="always"
id="linearGradient6816">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6818" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop6820" />
</linearGradient>
<linearGradient
id="linearGradient6781">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop6783" />
<stop
style="stop-color:#3465a4;stop-opacity:0;"
offset="1"
id="stop6785" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective6256" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6816"
id="radialGradient6822"
cx="33.369828"
cy="51.929391"
fx="33.369828"
fy="51.929391"
r="25.198714"
gradientTransform="matrix(1.1581633,0,0,0.6558985,-7.29237,16.126077)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3393"
id="linearGradient3399"
x1="1669.7314"
y1="1726.0585"
x2="2067.1702"
y2="1726.0585"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)" />
<linearGradient
id="linearGradient3393">
<stop
style="stop-color:#003ddd;stop-opacity:1;"
offset="0"
id="stop3395" />
<stop
style="stop-color:#639ef0;stop-opacity:1;"
offset="1"
id="stop3397" />
</linearGradient>
<linearGradient
y2="1726.0585"
x2="2067.1702"
y1="1726.0585"
x1="1669.7314"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)"
gradientUnits="userSpaceOnUse"
id="linearGradient3270"
xlink:href="#linearGradient3393"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253"
id="radialGradient3293"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)"
cx="10.328116"
cy="25.129232"
fx="10.328116"
fy="25.129232"
r="27.986705" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6"
id="radialGradient3270-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-73.012055,-80.803852)"
cx="83.590195"
cy="32.60199"
fx="83.590195"
fy="32.60199"
r="27.986706" />
<linearGradient
id="linearGradient3253-6">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7" />
</linearGradient>
<radialGradient
r="27.986706"
fy="25.129232"
fx="10.328116"
cy="25.129232"
cx="10.328116"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-2.1599239,-18.716253)"
gradientUnits="userSpaceOnUse"
id="radialGradient3337"
xlink:href="#linearGradient3253-6"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6-5"
id="radialGradient3270-0-1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-73.012055,-80.803852)"
cx="83.590195"
cy="32.60199"
fx="83.590195"
fy="32.60199"
r="27.986706" />
<linearGradient
id="linearGradient3253-6-5">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8-4" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7-9" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="19.843715"
inkscape:cy="32.297511"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1278"
inkscape:window-height="723"
inkscape:window-x="2"
inkscape:window-y="54"
inkscape:window-maximized="0" />
<metadata
id="metadata6253">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="opacity:0.525;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.07951307;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 56.76028,22.360887 C 49.477414,12.499951 36.263904,9.6341851 25.68422,15.000413 L 20.182888,7.5516576 8.328905,34.770245 37.830019,31.445717 32.042903,23.610013 c 5.788375,-2.083823 12.481522,-0.255822 16.325436,4.948805 4.694273,6.356002 3.34635,15.319498 -3.009652,20.013771 -5.510536,4.069847 -12.976826,3.600229 -17.925875,-0.739333 l -8.512862,6.287237 c 8.478061,8.931514 22.496324,10.370637 32.654528,2.868221 10.996126,-8.121271 13.307072,-23.6317 5.185802,-34.627827 z"
id="path3295-2"
inkscape:connector-curvature="0" />
<path
style="color:#000000;fill:url(#radialGradient3270-0);fill-opacity:1;fill-rule:nonzero;stroke:#004c5b;stroke-width:2.07951306999999996;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 51.959599,18.041333 C 44.676733,8.1803975 31.463223,5.3146312 20.883539,10.680859 L 15.382207,3.2321037 3.5282239,30.45069 33.029338,27.126162 27.242222,19.290459 c 5.788375,-2.083823 12.481522,-0.255822 16.325436,4.948804 4.694273,6.356002 3.34635,15.319498 -3.009652,20.013771 -5.510536,4.069847 -12.976826,3.600229 -17.925875,-0.739333 l -8.512862,6.287237 c 8.478061,8.931514 22.496324,10.370637 32.654528,2.868221 10.996126,-8.121271 13.307072,-23.6317 5.185802,-34.627826 z"
id="path3295"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -0,0 +1,242 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg6248"
sodipodi:version="0.32"
inkscape:version="0.48.1 r9760"
sodipodi:docname="view-rotate-right.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs6250">
<linearGradient
id="linearGradient3253">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient6816">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6818" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop6820" />
</linearGradient>
<linearGradient
id="linearGradient6781">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop6783" />
<stop
style="stop-color:#3465a4;stop-opacity:0;"
offset="1"
id="stop6785" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective6256" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6816"
id="radialGradient6822"
cx="33.369828"
cy="51.929391"
fx="33.369828"
fy="51.929391"
r="25.198714"
gradientTransform="matrix(1.1581633,0,0,0.6558985,-7.29237,16.126077)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3393"
id="linearGradient3399"
x1="1669.7314"
y1="1726.0585"
x2="2067.1702"
y2="1726.0585"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)" />
<linearGradient
id="linearGradient3393">
<stop
style="stop-color:#003ddd;stop-opacity:1;"
offset="0"
id="stop3395" />
<stop
style="stop-color:#639ef0;stop-opacity:1;"
offset="1"
id="stop3397" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6"
id="radialGradient3270-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5248767,0.58857909,0.29159851,-0.75546618,-132.2862,-41.872415)"
cx="96.579445"
cy="-3.6412485"
fx="96.579445"
fy="-3.6412485"
r="27.986706" />
<linearGradient
id="linearGradient3253-6">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7" />
</linearGradient>
<radialGradient
r="27.986706"
fy="25.129232"
fx="10.328116"
cy="25.129232"
cx="10.328116"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-2.1599239,-18.716253)"
gradientUnits="userSpaceOnUse"
id="radialGradient3337"
xlink:href="#linearGradient3253-6"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6-5"
id="radialGradient3270-0-1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-73.012055,-80.803852)"
cx="83.590195"
cy="32.60199"
fx="83.590195"
fy="32.60199"
r="27.986706" />
<linearGradient
id="linearGradient3253-6-5">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8-4" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7-9" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6-6"
id="radialGradient3270-0-6"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-145.06148,-79.720497)"
cx="83.590195"
cy="32.60199"
fx="83.590195"
fy="32.60199"
r="27.986706" />
<linearGradient
id="linearGradient3253-6-6">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8-2" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7-1" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6-3"
id="radialGradient3270-0-4"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5248767,0.58857909,0.29159851,-0.75546618,-132.2862,-41.872415)"
cx="96.579445"
cy="-3.6412485"
fx="96.579445"
fy="-3.6412485"
r="27.986706" />
<linearGradient
id="linearGradient3253-6-3">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8-9" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7-7" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.7781746"
inkscape:cx="28.910249"
inkscape:cy="33.443764"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1278"
inkscape:window-height="723"
inkscape:window-x="2"
inkscape:window-y="54"
inkscape:window-maximized="0" />
<metadata
id="metadata6253">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="opacity:0.525;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.07951307;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 13.300273,22.764586 C 20.58314,12.903651 33.79665,10.037884 44.376334,15.404112 L 49.877666,7.9553569 61.731649,35.173943 32.230535,31.849415 38.017651,24.013712 c -5.788375,-2.083823 -12.481522,-0.255822 -16.325436,4.948804 -4.694274,6.356002 -3.34635,15.319498 3.009652,20.013771 5.510536,4.069847 12.976826,3.600229 17.925875,-0.739333 l 8.512862,6.287237 C 42.662543,63.455705 28.64428,64.894828 18.486076,57.392412 7.4899493,49.271141 5.1790034,33.760712 13.300273,22.764586 z"
id="path3295-2"
inkscape:connector-curvature="0" />
<path
style="color:#000000;fill:url(#radialGradient3270-0);fill-opacity:1;fill-rule:nonzero;stroke:#004c5b;stroke-width:2.07951306999999996;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 8.3783278,18.041333 C 15.661194,8.1803975 28.874704,5.3146312 39.454388,10.680859 L 44.95572,3.2321037 56.809703,30.45069 27.308589,27.126162 33.095705,19.290459 c -5.788375,-2.083823 -12.481522,-0.255822 -16.325436,4.948804 -4.694273,6.356002 -3.34635,15.319498 3.009652,20.013771 5.510536,4.069847 12.976826,3.600229 17.925875,-0.739333 l 8.512862,6.287237 C 37.740597,58.732452 23.722334,60.171575 13.56413,52.669159 2.5680038,44.547888 0.25705785,29.037459 8.3783278,18.041333 z"
id="path3295"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg6248"
sodipodi:version="0.32"
inkscape:version="0.48.4 r9939"
sodipodi:docname="arrow-up.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs6250">
<linearGradient
id="linearGradient3253">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253"
id="radialGradient3270"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)"
cx="10.328116"
cy="25.129232"
fx="10.328116"
fy="25.129232"
r="27.986705" />
<linearGradient
inkscape:collect="always"
id="linearGradient6816">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6818" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop6820" />
</linearGradient>
<linearGradient
id="linearGradient6781">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop6783" />
<stop
style="stop-color:#3465a4;stop-opacity:0;"
offset="1"
id="stop6785" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective6256" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6816"
id="radialGradient6822"
cx="33.369828"
cy="51.929391"
fx="33.369828"
fy="51.929391"
r="25.198714"
gradientTransform="matrix(1.1581633,0,0,0.6558985,-7.29237,16.126077)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3393"
id="linearGradient3399"
x1="1669.7314"
y1="1726.0585"
x2="2067.1702"
y2="1726.0585"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)" />
<linearGradient
id="linearGradient3393">
<stop
style="stop-color:#003ddd;stop-opacity:1;"
offset="0"
id="stop3395" />
<stop
style="stop-color:#639ef0;stop-opacity:1;"
offset="1"
id="stop3397" />
</linearGradient>
<linearGradient
y2="1726.0585"
x2="2067.1702"
y1="1726.0585"
x1="1669.7314"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)"
gradientUnits="userSpaceOnUse"
id="linearGradient3270"
xlink:href="#linearGradient3393"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253"
id="radialGradient3293"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)"
cx="10.328116"
cy="25.129232"
fx="10.328116"
fy="25.129232"
r="27.986705" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6"
id="radialGradient3270-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0433407,-1.2166851,0.61472119,0.52714011,-62.710257,132.96324)"
cx="106.69199"
cy="-17.551352"
fx="106.69199"
fy="-17.551352"
r="27.986706" />
<linearGradient
id="linearGradient3253-6">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7" />
</linearGradient>
<radialGradient
r="27.986706"
fy="25.129232"
fx="10.328116"
cy="25.129232"
cx="10.328116"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-2.1599239,-18.716253)"
gradientUnits="userSpaceOnUse"
id="radialGradient3337"
xlink:href="#linearGradient3253-6"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6-5"
id="radialGradient3270-0-1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-73.012055,-80.803852)"
cx="83.590195"
cy="32.60199"
fx="83.590195"
fy="32.60199"
r="27.986706" />
<linearGradient
id="linearGradient3253-6-5">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8-4" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7-9" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="-3.4290123"
inkscape:cy="33.319519"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1278"
inkscape:window-height="691"
inkscape:window-x="2"
inkscape:window-y="25"
inkscape:window-maximized="0" />
<metadata
id="metadata6253">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
id="path3115"
d="m 26.316746,6.5370396 0.457708,23.0760594 c 0,0 -8.554432,0.347892 -8.903301,0.04679 L 31.089739,53.513869 44.310666,28.558209 36.838599,28.345326 36.696494,6.5653446 z"
style="opacity:0.51999996;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.07951307;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
style="color:#000000;fill:url(#radialGradient3270-0);fill-opacity:1;fill-rule:nonzero;stroke:#004c5b;stroke-width:2.07999992;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 27.044019,10.355222 -0.08775,22.348786 -9.085119,0.228609 15.036768,24.399434 13.220927,-24.95566 -8.744794,0.150753 -0.142105,-22.143617 z"
id="path3295"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="64"
height="64"
id="svg6248">
<defs
id="defs6250">
<linearGradient
id="linearGradient3253">
<stop
id="stop3255"
style="stop-color:#89d5f8;stop-opacity:1"
offset="0" />
<stop
id="stop3257"
style="stop-color:#00899e;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="10.328116"
cy="25.129232"
r="27.986706"
fx="10.328116"
fy="25.129232"
id="radialGradient3270"
xlink:href="#linearGradient3253"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)" />
<linearGradient
id="linearGradient6816">
<stop
id="stop6818"
style="stop-color:#000000;stop-opacity:1"
offset="0" />
<stop
id="stop6820"
style="stop-color:#000000;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient6781">
<stop
id="stop6783"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop6785"
style="stop-color:#3465a4;stop-opacity:0"
offset="1" />
</linearGradient>
<radialGradient
cx="33.369827"
cy="51.92939"
r="25.198713"
fx="33.369827"
fy="51.92939"
id="radialGradient6822"
xlink:href="#linearGradient6816"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1581633,0,0,0.6558985,-7.29237,16.126077)" />
<linearGradient
x1="1669.7314"
y1="1726.0585"
x2="2067.1702"
y2="1726.0585"
id="linearGradient3399"
xlink:href="#linearGradient3393"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)" />
<linearGradient
id="linearGradient3393">
<stop
id="stop3395"
style="stop-color:#003ddd;stop-opacity:1"
offset="0" />
<stop
id="stop3397"
style="stop-color:#639ef0;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="1669.7314"
y1="1726.0585"
x2="2067.1702"
y2="1726.0585"
id="linearGradient3270"
xlink:href="#linearGradient3393"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)" />
<radialGradient
cx="10.328116"
cy="25.129232"
r="27.986706"
fx="10.328116"
fy="25.129232"
id="radialGradient3293"
xlink:href="#linearGradient3253"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)" />
<radialGradient
cx="106.69199"
cy="-17.551352"
r="27.986706"
fx="106.69199"
fy="-17.551352"
id="radialGradient3270-0"
xlink:href="#linearGradient3253-6"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-67.119603,-63.644803)" />
<linearGradient
id="linearGradient3253-6">
<stop
id="stop3255-8"
style="stop-color:#89d5f8;stop-opacity:1"
offset="0" />
<stop
id="stop3257-7"
style="stop-color:#00899e;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="10.328116"
cy="25.129232"
r="27.986706"
fx="10.328116"
fy="25.129232"
id="radialGradient3337"
xlink:href="#linearGradient3253-6"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-2.1599239,-18.716253)" />
<radialGradient
cx="83.590195"
cy="32.60199"
r="27.986706"
fx="83.590195"
fy="32.60199"
id="radialGradient3270-0-1"
xlink:href="#linearGradient3253-6-5"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-73.012055,-80.803852)" />
<linearGradient
id="linearGradient3253-6-5">
<stop
id="stop3255-8-4"
style="stop-color:#89d5f8;stop-opacity:1"
offset="0" />
<stop
id="stop3257-7-9"
style="stop-color:#00899e;stop-opacity:1"
offset="1" />
</linearGradient>
</defs>
<metadata
id="metadata6253">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1">
<path
d="m 56.397506,30.109473 -23.07606,0.457708 c 0,0 -0.347892,-8.554432 -0.04679,-8.903301 L 9.4206763,34.882466 34.376336,48.103393 34.225583,39.358599 56.369201,39.216494 z"
id="path3115"
style="opacity:0.51999996;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.07951307;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
d="M 55.488415,26.109473 33.139628,26.021726 32.911019,16.936607 8.5115851,31.973375 33.467245,45.194302 33.316492,36.449508 55.46011,36.307403 z"
id="path3295"
style="color:#000000;fill:url(#radialGradient3270-0);fill-opacity:1;fill-rule:nonzero;stroke:#004c5b;stroke-width:2.07999992;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="64"
height="64"
id="svg6248">
<defs
id="defs6250">
<linearGradient
id="linearGradient3253">
<stop
id="stop3255"
style="stop-color:#89d5f8;stop-opacity:1"
offset="0" />
<stop
id="stop3257"
style="stop-color:#00899e;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="10.328116"
cy="25.129232"
r="27.986706"
fx="10.328116"
fy="25.129232"
id="radialGradient3270"
xlink:href="#linearGradient3253"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)" />
<linearGradient
id="linearGradient6816">
<stop
id="stop6818"
style="stop-color:#000000;stop-opacity:1"
offset="0" />
<stop
id="stop6820"
style="stop-color:#000000;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient6781">
<stop
id="stop6783"
style="stop-color:#ffffff;stop-opacity:1"
offset="0" />
<stop
id="stop6785"
style="stop-color:#3465a4;stop-opacity:0"
offset="1" />
</linearGradient>
<radialGradient
cx="33.369827"
cy="51.92939"
r="25.198713"
fx="33.369827"
fy="51.92939"
id="radialGradient6822"
xlink:href="#linearGradient6816"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1581633,0,0,0.6558985,-7.29237,16.126077)" />
<linearGradient
x1="1669.7314"
y1="1726.0585"
x2="2067.1702"
y2="1726.0585"
id="linearGradient3399"
xlink:href="#linearGradient3393"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)" />
<linearGradient
id="linearGradient3393">
<stop
id="stop3395"
style="stop-color:#003ddd;stop-opacity:1"
offset="0" />
<stop
id="stop3397"
style="stop-color:#639ef0;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="1669.7314"
y1="1726.0585"
x2="2067.1702"
y2="1726.0585"
id="linearGradient3270"
xlink:href="#linearGradient3393"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)" />
<radialGradient
cx="10.328116"
cy="25.129232"
r="27.986706"
fx="10.328116"
fy="25.129232"
id="radialGradient3293"
xlink:href="#linearGradient3253"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)" />
<radialGradient
cx="106.69199"
cy="-17.551352"
r="27.986706"
fx="106.69199"
fy="-17.551352"
id="radialGradient3270-0"
xlink:href="#linearGradient3253-6"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-1.2166851,1.0433407,0.52714011,0.61472119,131.1196,-63.644803)" />
<linearGradient
id="linearGradient3253-6">
<stop
id="stop3255-8"
style="stop-color:#89d5f8;stop-opacity:1"
offset="0" />
<stop
id="stop3257-7"
style="stop-color:#00899e;stop-opacity:1"
offset="1" />
</linearGradient>
<radialGradient
cx="10.328116"
cy="25.129232"
r="27.986706"
fx="10.328116"
fy="25.129232"
id="radialGradient3337"
xlink:href="#linearGradient3253-6"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-2.1599239,-18.716253)" />
<radialGradient
cx="83.590195"
cy="32.60199"
r="27.986706"
fx="83.590195"
fy="32.60199"
id="radialGradient3270-0-1"
xlink:href="#linearGradient3253-6-5"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-73.012055,-80.803852)" />
<linearGradient
id="linearGradient3253-6-5">
<stop
id="stop3255-8-4"
style="stop-color:#89d5f8;stop-opacity:1"
offset="0" />
<stop
id="stop3257-7-9"
style="stop-color:#00899e;stop-opacity:1"
offset="1" />
</linearGradient>
</defs>
<metadata
id="metadata6253">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1">
<path
d="m 7.6024941,30.109473 23.0760599,0.457708 c 0,0 0.347892,-8.554432 0.04679,-8.903301 l 23.85398,13.218586 -24.95566,13.220927 0.150753,-8.744794 -22.1436179,-0.142105 z"
id="path3115"
style="opacity:0.51999996;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.07951307;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
d="M 8.5115851,26.109473 30.860372,26.021726 31.088981,16.936607 55.488415,31.973375 30.532755,45.194302 30.683508,36.449508 8.5398901,36.307403 z"
id="path3295"
style="color:#000000;fill:url(#radialGradient3270-0);fill-opacity:1;fill-rule:nonzero;stroke:#004c5b;stroke-width:2.07999992;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg6248"
sodipodi:version="0.32"
inkscape:version="0.48.4 r9939"
sodipodi:docname="arrow-up.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs6250">
<linearGradient
id="linearGradient3253">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253"
id="radialGradient3270"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)"
cx="10.328116"
cy="25.129232"
fx="10.328116"
fy="25.129232"
r="27.986705" />
<linearGradient
inkscape:collect="always"
id="linearGradient6816">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop6818" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop6820" />
</linearGradient>
<linearGradient
id="linearGradient6781">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop6783" />
<stop
style="stop-color:#3465a4;stop-opacity:0;"
offset="1"
id="stop6785" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective6256" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6816"
id="radialGradient6822"
cx="33.369828"
cy="51.929391"
fx="33.369828"
fy="51.929391"
r="25.198714"
gradientTransform="matrix(1.1581633,0,0,0.6558985,-7.29237,16.126077)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3393"
id="linearGradient3399"
x1="1669.7314"
y1="1726.0585"
x2="2067.1702"
y2="1726.0585"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)" />
<linearGradient
id="linearGradient3393">
<stop
style="stop-color:#003ddd;stop-opacity:1;"
offset="0"
id="stop3395" />
<stop
style="stop-color:#639ef0;stop-opacity:1;"
offset="1"
id="stop3397" />
</linearGradient>
<linearGradient
y2="1726.0585"
x2="2067.1702"
y1="1726.0585"
x1="1669.7314"
gradientTransform="matrix(0.9135837,0,0,0.9135837,138.63723,130.60625)"
gradientUnits="userSpaceOnUse"
id="linearGradient3270"
xlink:href="#linearGradient3393"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253"
id="radialGradient3293"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-69.025653,-0.11788499)"
cx="10.328116"
cy="25.129232"
fx="10.328116"
fy="25.129232"
r="27.986705" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6"
id="radialGradient3270-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0433407,1.2166851,0.61472119,-0.52714011,-62.710257,-68.054145)"
cx="106.69199"
cy="-17.551352"
fx="106.69199"
fy="-17.551352"
r="27.986706" />
<linearGradient
id="linearGradient3253-6">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7" />
</linearGradient>
<radialGradient
r="27.986706"
fy="25.129232"
fx="10.328116"
cy="25.129232"
cx="10.328116"
gradientTransform="matrix(0.9781457,0.0053484,-0.00460223,0.8416912,-2.1599239,-18.716253)"
gradientUnits="userSpaceOnUse"
id="radialGradient3337"
xlink:href="#linearGradient3253-6"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3253-6-5"
id="radialGradient3270-0-1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.2166851,1.0433407,-0.52714011,0.61472119,-73.012055,-80.803852)"
cx="83.590195"
cy="32.60199"
fx="83.590195"
fy="32.60199"
r="27.986706" />
<linearGradient
id="linearGradient3253-6-5">
<stop
style="stop-color:#89d5f8;stop-opacity:1;"
offset="0"
id="stop3255-8-4" />
<stop
style="stop-color:#00899e;stop-opacity:1;"
offset="1"
id="stop3257-7-9" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="-3.4290123"
inkscape:cy="33.319519"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1278"
inkscape:window-height="691"
inkscape:window-x="2"
inkscape:window-y="25"
inkscape:window-maximized="0" />
<metadata
id="metadata6253">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
id="path3115"
d="m 26.316746,58.372051 0.457708,-23.076059 c 0,0 -8.554432,-0.347892 -8.903301,-0.04679 l 13.218586,-23.85398 13.220927,24.95566 -7.472067,0.212883 -0.142105,21.779981 z"
style="opacity:0.51999996;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.07951307;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
style="color:#000000;fill:url(#radialGradient3270-0);fill-opacity:1;fill-rule:nonzero;stroke:#004c5b;stroke-width:2.07999992;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 27.044019,54.553869 26.956272,32.205083 17.871153,31.976474 32.907921,7.5770396 46.128848,32.5327 37.384054,32.381947 37.241949,54.525564 z"
id="path3295"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -34,10 +34,15 @@
#include <Gui/Command.h>
#include <Gui/Control.h>
#include <Gui/Document.h>
#include <Gui/View3DInventor.h>
#include <Gui/View3DInventorViewer.h>
#include <Inventor/SbVec3f.h>
#include <Mod/Part/App/PartFeature.h>
#include <Mod/TechDraw/App/DrawPage.h>
#include <Mod/TechDraw/App/DrawUtil.h>
#include <Mod/TechDraw/App/DrawView.h>
#include <Mod/TechDraw/App/DrawViewPart.h>
@ -51,6 +56,7 @@
#include <Mod/TechDraw/Gui/ui_TaskProjGroup.h>
using namespace Gui;
using namespace TechDraw;
using namespace TechDrawGui;
//TODO: Look into this, seems we might be able to delete it now? IR
@ -89,6 +95,11 @@ TaskProjGroup::TaskProjGroup(TechDraw::DrawProjGroup* featView, bool mode) :
connect(ui->butLeftRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked(void)));
connect(ui->butCCWRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked(void)));
//3D button
connect(ui->but3D, SIGNAL(clicked()), this, SLOT(on3DClicked(void)));
//Reset button
connect(ui->butReset, SIGNAL(clicked()), this, SLOT(onResetClicked(void)));
// Slot for Scale Type
connect(ui->cmbScaleType, SIGNAL(currentIndexChanged(int)), this, SLOT(scaleTypeChanged(int)));
connect(ui->sbScaleNum, SIGNAL(valueChanged(int)), this, SLOT(scaleManuallyChanged(int)));
@ -102,6 +113,8 @@ TaskProjGroup::TaskProjGroup(TechDraw::DrawProjGroup* featView, bool mode) :
Gui::ViewProvider* vp = activeGui->getViewProvider(m_page);
ViewProviderPage* dvp = dynamic_cast<ViewProviderPage*>(vp);
m_mdi = dvp->getMDIViewPage();
setUiPrimary();
}
TaskProjGroup::~TaskProjGroup()
@ -142,31 +155,50 @@ void TaskProjGroup::rotateButtonClicked(void)
if ( multiView && ui ) {
const QObject *clicked = sender();
// Any translation/scale/etc applied here will be ignored, as
// DrawProjGroup::setFrontViewOrientation() only
// uses it to set Direction and XAxisDirection.
Base::Matrix4D m = multiView->viewOrientationMatrix.getValue();
// TODO: Construct these directly
Base::Matrix4D t;
//TODO: Consider changing the vectors around depending on whether we're in First or Third angle mode - might be more intuitive? IR
if ( clicked == ui->butTopRotate ) {
t.rotX(M_PI / -2);
} else if ( clicked == ui->butCWRotate ) {
t.rotY(M_PI / -2);
} else if ( clicked == ui->butRightRotate) {
t.rotZ(M_PI / 2);
if ( clicked == ui->butTopRotate ) { //change Front View Dir by 90
multiView->rotateUp();
} else if ( clicked == ui->butDownRotate) {
t.rotX(M_PI / 2);
multiView->rotateDown();
} else if ( clicked == ui->butRightRotate) {
multiView->rotateRight();
} else if ( clicked == ui->butLeftRotate) {
t.rotZ(M_PI / -2);
multiView->rotateLeft();
} else if ( clicked == ui->butCWRotate ) { //doesn't change Anchor view dir. changes projType of secondaries, not dir
multiView->spinCW();
} else if ( clicked == ui->butCCWRotate) {
t.rotY(M_PI / 2);
multiView->spinCCW();
}
m *= t;
setUiPrimary();
Gui::Command::updateActive();
}
}
multiView->setFrontViewOrientation(m);
void TaskProjGroup::on3DClicked(void)
{
Base::Vector3d dir3D = get3DViewDir();
TechDraw::DrawProjGroupItem* front = multiView->getProjItem("Front");
if (front) {
front->Direction.setValue(dir3D);
front->recomputeFeature();
setUiPrimary();
multiView->makeInitialMap(front);
multiView->updateSecondaryDirs();
Gui::Command::updateActive();
}
}
void TaskProjGroup::onResetClicked(void)
{
Base::Vector3d dir = multiView->nameToStdDirection("Front");
TechDraw::DrawProjGroupItem* front = multiView->getProjItem("Front");
if (front) {
front->Direction.setValue(dir);
front->recomputeFeature();
setUiPrimary();
multiView->makeInitialMap(front);
multiView->updateSecondaryDirs();
multiView->dumpMap();
Gui::Command::updateActive();
}
}
@ -375,8 +407,51 @@ void TaskProjGroup::setupViewCheckboxes(bool addConnections)
}
}
void TaskProjGroup::setUiPrimary()
{
Base::Vector3d frontDir = multiView->getAnchorDirection();
ui->lePrimary->setText(formatVector(frontDir));
}
Base::Vector3d TaskProjGroup::get3DViewDir()
{
Base::Vector3d viewDir(0.0,-1.0,0.0); //default to front
std::list<MDIView*> mdis = Gui::Application::Instance->activeDocument()->getMDIViews();
Gui::View3DInventor *view;
Gui::View3DInventorViewer *viewer;
for (auto& m: mdis) { //find the 3D viewer
view = dynamic_cast<Gui::View3DInventor*>(m);
if (view) {
viewer = view->getViewer();
break;
}
}
if (!viewer) {
Base::Console().Log("LOG - TaskProjGroup could not find a 3D viewer\n");
return viewDir;
}
SbVec3f dvec = viewer->getViewDirection();
viewDir = Base::Vector3d(dvec[0], dvec[1], dvec[2]);
viewDir = viewDir * -1; //Inventor coords are opposite projection direction coords
return viewDir;
}
QString TaskProjGroup::formatVector(Base::Vector3d v)
{
QString data = QString::fromLatin1("[%1 %2 %3]")
.arg(QLocale::system().toString(v.x, 'f', 2))
.arg(QLocale::system().toString(v.y, 'f', 2))
.arg(QLocale::system().toString(v.z, 'f', 2));
return data;
}
bool TaskProjGroup::accept()
{
Gui::Document* doc = Gui::Application::Instance->getDocument(multiView->getDocument());
if (!doc) return false;
Gui::Command::commitCommand();
Gui::Command::updateActive();
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
@ -386,6 +461,9 @@ bool TaskProjGroup::accept()
bool TaskProjGroup::reject()
{
Gui::Document* doc = Gui::Application::Instance->getDocument(multiView->getDocument());
if (!doc) return false;
if (getCreateMode()) {
std::string multiViewName = multiView->getNameInDocument();
std::string PageName = multiView->findParentPage()->getNameInDocument();

View File

@ -24,7 +24,10 @@
#ifndef GUI_TASKVIEW_TASKVIEWGROUP_H
#define GUI_TASKVIEW_TASKVIEWGROUP_H
#include <QString>
#include <Base/BoundBox.h>
#include <Base/Vector3D.h>
#include <Gui/TaskView/TaskView.h>
#include <Gui/TaskView/TaskDialog.h>
@ -72,6 +75,9 @@ protected Q_SLOTS:
/// Requests appropriate rotation of our DrawProjGroup
void rotateButtonClicked(void);
void on3DClicked(void);
void onResetClicked(void);
void projectionTypeChanged(int index);
void scaleTypeChanged(int index);
void scaleManuallyChanged(int i);
@ -85,6 +91,9 @@ protected:
* between checkboxes and viewToggled()
*/
void setupViewCheckboxes(bool addConnections = false);
Base::Vector3d get3DViewDir(void);
void setUiPrimary(void);
QString formatVector(Base::Vector3d v);
private:
//class Private;

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>342</width>
<height>431</height>
<width>371</width>
<height>491</height>
</rect>
</property>
<property name="sizePolicy">
@ -57,6 +57,9 @@
</item>
<item>
<widget class="QComboBox" name="projection">
<property name="toolTip">
<string>First or Third Angle</string>
</property>
<property name="editable">
<bool>false</bool>
</property>
@ -90,6 +93,9 @@
</item>
<item>
<widget class="QComboBox" name="cmbScaleType">
<property name="toolTip">
<string>Scale Page/Auto/Custom</string>
</property>
<item>
<property name="text">
<string>Page</string>
@ -133,6 +139,9 @@
</item>
<item>
<widget class="QSpinBox" name="sbScaleNum">
<property name="toolTip">
<string>Scale Numerator</string>
</property>
<property name="minimum">
<number>1</number>
</property>
@ -150,6 +159,9 @@
</item>
<item>
<widget class="QSpinBox" name="sbScaleDen">
<property name="toolTip">
<string>Scale Denominator</string>
</property>
<property name="minimum">
<number>1</number>
</property>
@ -174,90 +186,179 @@
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>View From</string>
<string>Adjust Primary Direction</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
<set>Qt::AlignCenter</set>
</property>
<property name="indent">
<number>0</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="2">
<widget class="QPushButton" name="butCWRotate">
<property name="toolTip">
<string>About 3D Y</string>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
<item row="1" column="1">
<widget class="QLineEdit" name="lePrimary">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Spin CW</string>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Primary View Direction</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="2">
<item row="1" column="2">
<widget class="QPushButton" name="butRightRotate">
<property name="toolTip">
<string>About 3D Z</string>
<string>Rotate right</string>
</property>
<property name="text">
<string>&gt;</string>
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/icons/arrow-right.svg</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="butCCWRotate">
<property name="toolTip">
<string>About 3D Y</string>
</property>
<property name="text">
<string>Spin CCW</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="0" column="1">
<widget class="QPushButton" name="butTopRotate">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>About 3D X</string>
<string>Rotate up</string>
</property>
<property name="text">
<string>/\</string>
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/icons/arrow-up.svg</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="pushButton_8">
<item row="1" column="0">
<widget class="QPushButton" name="butLeftRotate">
<property name="toolTip">
<string>Rotate left</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/icons/arrow-left.svg</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="but3D">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="toolTip">
<string>Set Primary Direction to match 3D</string>
</property>
<property name="text">
<string>Match 3D</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="butLeftRotate">
<item row="2" column="1">
<widget class="QPushButton" name="butDownRotate">
<property name="toolTip">
<string>About 3D Y</string>
<string>Rotate down</string>
</property>
<property name="text">
<string>&lt;</string>
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/icons/arrow-down.svg</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="butDownRotate">
<item row="2" column="0">
<widget class="QPushButton" name="butReset">
<property name="toolTip">
<string>About 3D X</string>
<string>Set Primary Direction to 3D Front</string>
</property>
<property name="text">
<string>\/</string>
<string>3D Front</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
@ -265,6 +366,9 @@
<property name="text">
<string>Secondary Projections</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
@ -276,6 +380,16 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Bottom</string>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator {
width: 24px;
height: 24px;
}
</string>
</property>
<property name="text">
<string/>
</property>
@ -299,6 +413,16 @@
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Primary</string>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator {
width: 24px;
height: 24px;
}
</string>
</property>
<property name="text">
<string/>
</property>
@ -309,6 +433,16 @@
</item>
<item row="3" column="3">
<widget class="QCheckBox" name="chkView5">
<property name="toolTip">
<string>Right</string>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator {
width: 24px;
height: 24px;
}
</string>
</property>
<property name="text">
<string/>
</property>
@ -329,6 +463,16 @@
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="chkView3">
<property name="toolTip">
<string>Left</string>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator {
width: 24px;
height: 24px;
}
</string>
</property>
<property name="text">
<string/>
</property>
@ -336,6 +480,16 @@
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="chkView7">
<property name="toolTip">
<string>LeftFrontBottom</string>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator {
width: 24px;
height: 24px;
}
</string>
</property>
<property name="text">
<string/>
</property>
@ -343,6 +497,16 @@
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="chkView1">
<property name="toolTip">
<string>Top</string>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator {
width: 24px;
height: 24px;
}
</string>
</property>
<property name="text">
<string/>
</property>
@ -350,6 +514,16 @@
</item>
<item row="5" column="3">
<widget class="QCheckBox" name="chkView9">
<property name="toolTip">
<string>RightFrontBottom</string>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator {
width: 24px;
height: 24px;
}
</string>
</property>
<property name="text">
<string/>
</property>
@ -357,6 +531,16 @@
</item>
<item row="2" column="3">
<widget class="QCheckBox" name="chkView2">
<property name="toolTip">
<string>RightFrontTop</string>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator {
width: 24px;
height: 24px;
}
</string>
</property>
<property name="text">
<string/>
</property>
@ -364,6 +548,16 @@
</item>
<item row="3" column="4">
<widget class="QCheckBox" name="chkView6">
<property name="toolTip">
<string>Rear</string>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator {
width: 24px;
height: 24px;
}
</string>
</property>
<property name="text">
<string/>
</property>
@ -371,20 +565,111 @@
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="chkView0">
<property name="toolTip">
<string>LeftFrontTop</string>
</property>
<property name="styleSheet">
<string notr="true">QCheckBox::indicator {
width: 24px;
height: 24px;
}
</string>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="butCWRotate">
<property name="toolTip">
<string>Spin CW</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/icons/arrow-cw.svg</normalon>
</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butCCWRotate">
<property name="toolTip">
<string>Spin CCW</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/icons/arrow-ccw.svg</normalon>
</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../../../../../Documents/CAD/DrawingModule/Resources/TechDraw.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -43,11 +43,13 @@
#include <Mod/Part/App/PartFeature.h>
#include <Mod/TechDraw/App/DrawPage.h>
#include <Mod/TechDraw/App/DrawUtil.h>
#include "TaskSectionView.h"
#include <Mod/TechDraw/Gui/ui_TaskSectionView.h>
using namespace Gui;
using namespace TechDraw;
using namespace TechDrawGui;
void _printVect(char* label, Base::Vector3d v);
@ -119,61 +121,26 @@ void TaskSectionView::resetValues()
bool TaskSectionView::calcValues()
{
bool result = true;
Base::Vector3d stdX(1.0,0.0,0.0);
Base::Vector3d stdY(0.0,1.0,0.0);
Base::Vector3d stdZ(0.0,0.0,1.0);
Base::Vector3d view = m_base->Direction.getValue();
sectionDir = "unset";
if (ui->pb_Up->isChecked()) {
sectionDir = "Up";
sectionProjDir = view;
sectionNormal = Base::Vector3d(view.x,view.z,-view.y);
if (view == stdZ) {
sectionProjDir = (-1.0 * stdY);
sectionNormal = (-1.0 * stdY);
} else if (view == (-1.0 * stdZ)) {
sectionProjDir = (-1.0 * stdY);
sectionNormal = (-1.0 * stdY);
}
sectionProjDir = DrawViewSection::getSectionVector(view,sectionDir);
} else if (ui->pb_Down->isChecked()) {
sectionDir = "Down";
sectionProjDir = view;
sectionNormal = Base::Vector3d(-view.x,-view.z,view.y);
if (view == stdZ) {
sectionProjDir = stdY;
sectionNormal = stdY;
} else if (view == (-1.0 * stdZ)) {
sectionProjDir = stdY;
sectionNormal = stdY;
}
sectionProjDir = DrawViewSection::getSectionVector(view,sectionDir);
} else if (ui->pb_Left->isChecked()) {
sectionDir = "Left";
sectionProjDir = Base::Vector3d(-view.y,view.x,view.z);
sectionNormal = Base::Vector3d(-view.y,view.x,0.0);
if (view == stdZ) {
sectionProjDir = stdX;
sectionNormal = stdX;
} else if (view == (-1.0 * stdZ)) {
sectionProjDir = stdX;
sectionNormal = stdX;
}
sectionProjDir = DrawViewSection::getSectionVector(view,sectionDir);
} else if (ui->pb_Right->isChecked()) {
sectionDir = "Right";
sectionProjDir = Base::Vector3d(view.y,-view.x,view.z);
sectionNormal = Base::Vector3d(view.y,-view.x,0.0);
if (view == stdZ) {
sectionProjDir = -1.0 * stdX;
sectionNormal = -1.0 * stdX;
} else if (view == (-1.0 * stdZ)) {
sectionProjDir = -1.0 * stdX;
sectionNormal = -1.0 * stdX;
}
sectionProjDir = DrawViewSection::getSectionVector(view,sectionDir);
} else {
Base::Console().Message("Select a direction\n");
result = false;
}
sectionNormal = sectionProjDir;
if (result) {
ui->leNormal->setText(formatVector(sectionNormal));
ui->leProjDir->setText(formatVector(sectionProjDir));

View File

@ -76,7 +76,6 @@ std::vector<std::string> ViewProviderViewSection::getDisplayModes(void) const
void ViewProviderViewSection::updateData(const App::Property* prop)
{
Base::Console().Log("ViewProviderViewSection::updateData - Update View: %s\n",prop->getName());
if (prop == &(getViewObject()->ShowCutSurface) ||
prop == &(getViewObject()->CutSurfaceColor) ) {
// redraw QGIVP

View File

@ -234,7 +234,29 @@ class DocumentBasicCases(unittest.TestCase):
self.Doc.removeObject(obj.Name)
del obj
def testExtensionBugViewProvider(self):
class Layer():
def __init__(self, obj):
obj.addExtension("App::GroupExtensionPython", self)
class LayerViewProvider():
def __init__(self, obj):
obj.addExtension("Gui::ViewProviderGroupExtensionPython", self)
obj.Proxy = self
obj = self.Doc.addObject("App::FeaturePython","Layer")
Layer(obj)
self.failUnless(obj.hasExtension("App::GroupExtension"))
if FreeCAD.GuiUp:
LayerViewProvider(obj.ViewObject)
self.failUnless(obj.ViewObject.hasExtension("Gui::ViewProviderGroupExtension"))
self.failUnless(obj.ViewObject.hasExtension("Gui::ViewProviderGroupExtensionPython"))
self.Doc.removeObject(obj.Name)
del obj
def tearDown(self):
#closing doc
FreeCAD.closeDocument("CreateTest")