primitive bug fixes, add cylinder and sphere

This commit is contained in:
Stefan Tröger
2015-05-18 22:07:55 +02:00
parent 07099e1163
commit 27d46a6593
25 changed files with 2423 additions and 89 deletions

View File

@@ -68,9 +68,10 @@ public:
virtual PyObject* getPyObject(void);
virtual std::vector<PyObject *> getPySubObjects(const std::vector<std::string>&) const;
TopLoc_Location getLocation() const;
protected:
void onChanged(const App::Property* prop);
TopLoc_Location getLocation() const;
/**
* Build a history of changes
* MakeShape: The operation that created the changes, e.g. BRepAlgoAPI_Common

View File

@@ -108,7 +108,13 @@ PyMODINIT_FUNC init_PartDesign()
PartDesign::Box ::init();
PartDesign::AdditiveBox ::init();
PartDesign::SubtractiveBox ::init();
PartDesign::Cylinder ::init();
PartDesign::AdditiveCylinder ::init();
PartDesign::SubtractiveCylinder::init();
PartDesign::Sphere ::init();
PartDesign::AdditiveSphere ::init();
PartDesign::SubtractiveSphere ::init();
PartDesign::Point ::initHints();
PartDesign::Line ::initHints();
PartDesign::Plane ::initHints();

View File

@@ -0,0 +1,193 @@
/***************************************************************************
* Copyright (c) 2015 Stefan Tröger <stefantroeger@gmx.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include "DatumCS.h"
#include "DatumPoint.h"
#include "DatumPlane.h"
#include <App/Plane.h>
#include <App/Part.h>
#include <gp_Pln.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <QObject>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
using namespace PartDesign;
// Note: We don't distinguish between e.g. datum lines and edges here
#define PLANE QObject::tr("DPLANE")
#define CYLINDER QObject::tr("DCYLINDER")
#define LINE QObject::tr("DLINE")
#define POINT QObject::tr("DPOINT")
#define ANGLE QObject::tr("Angle")
#define CS QObject::tr("DCOORDINATESYSTEM")
std::map<std::multiset<QString>, std::set<QString> > CoordinateSystem::hints = std::map<std::multiset<QString>, std::set<QString> >();
void CoordinateSystem::initHints()
{
std::set<QString> DONE;
DONE.insert(QObject::tr("Done"));
std::multiset<QString> key;
std::set<QString> value;
key.insert(POINT);
hints[key] = DONE;
key.clear(); value.clear();
key.insert(PLANE);
hints[key] = DONE;
}
// ============================================================================
PROPERTY_SOURCE(PartDesign::CoordinateSystem, Part::Datum)
CoordinateSystem::CoordinateSystem()
{
// Create a shape, which will be used by the Sketcher. Them main function is to avoid a dependency of
// Sketcher on the PartDesign module
BRepBuilderAPI_MakeFace builder(gp_Pln(gp_Pnt(0,0,0), gp_Dir(0,0,1)));
if (!builder.IsDone())
return;
Shape.setValue(builder.Shape());
References.touch();
}
CoordinateSystem::~CoordinateSystem()
{
}
void CoordinateSystem::onChanged(const App::Property *prop)
{
if ((prop == &References) || (prop == &Offset) || (prop == &Offset2) || (prop == &Offset3)) {
Base::Placement plm;
const std::vector<App::DocumentObject*>& refs = References.getValues();
const std::vector<std::string>& subrefs = References.getSubValues();
if (refs.size() != subrefs.size())
return;
refTypes.clear();
for (int r = 0; r < refs.size(); r++)
refTypes.insert(getRefType(refs[r], subrefs[r]));
std::set<QString> hint = getHint();
if (refs.size() != 0 && !(hint.find(QObject::tr("Done")) != hint.end()))
return; // incomplete references
//build the placement from the references
bool plane = false;
Base::Vector3d pl_base, pl_normal;
int count = 0;
for(App::DocumentObject* obj : refs) {
if (obj->getTypeId().isDerivedFrom(PartDesign::Plane::getClassTypeId())) {
PartDesign::Plane* p = static_cast<PartDesign::Plane*>(obj);
if(!plane) {
pl_base = p->getBasePoint();
pl_normal = p->getNormal();
plane=true;
}
} else if (obj->getTypeId().isDerivedFrom(App::Plane::getClassTypeId())) {
PartDesign::Plane* p = static_cast<PartDesign::Plane*>(obj);
if(!plane) {
pl_base = Base::Vector3d(0,0,0);
if (strcmp(p->getNameInDocument(), App::Part::BaseplaneTypes[0]) == 0)
pl_normal = Base::Vector3d(0,0,1);
else if (strcmp(p->getNameInDocument(), App::Part::BaseplaneTypes[2]) == 0)
pl_normal = Base::Vector3d(1,0,0);
else if (strcmp(p->getNameInDocument(), App::Part::BaseplaneTypes[1]) == 0)
pl_normal = Base::Vector3d(0,1,0);
plane=true;
}
}
count++;
};
if(plane) {
plm = Base::Placement(pl_base, Base::Rotation(Base::Vector3d(0,0,1), pl_normal));
}
//add the offsets
Base::Vector3d o1;
plm.multVec(Offset.getValue()*Base::Vector3d(1,0,0), o1);
Base::Vector3d o2;
plm.multVec(Offset2.getValue()*Base::Vector3d(0,1,0), o2);
Base::Vector3d o3;
plm.multVec(Offset3.getValue()*Base::Vector3d(0,0,1), o3);
plm.move(o1+o2+o3);
Placement.setValue(plm);
}
Part::Datum::onChanged(prop);
}
const std::set<QString> CoordinateSystem::getHint() const
{
if (hints.find(refTypes) != hints.end())
return hints[refTypes];
else
return std::set<QString>();
}
const int CoordinateSystem::offsetsAllowed() const
{
return 3;
}
Base::Vector3d CoordinateSystem::getXAxis()
{
Base::Rotation rot = Placement.getValue().getRotation();
Base::Vector3d normal;
rot.multVec(Base::Vector3d(1,0,0), normal);
return normal;
}
Base::Vector3d CoordinateSystem::getYAxis()
{
Base::Rotation rot = Placement.getValue().getRotation();
Base::Vector3d normal;
rot.multVec(Base::Vector3d(0,1,0), normal);
return normal;
}
Base::Vector3d CoordinateSystem::getZAxis()
{
Base::Rotation rot = Placement.getValue().getRotation();
Base::Vector3d normal;
rot.multVec(Base::Vector3d(0,0,1), normal);
return normal;
}

View File

@@ -0,0 +1,65 @@
/***************************************************************************
* Copyright (c) 2015 Stefan Tröger <stefantroeger@gmx.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef PARTDESIGN_DATUMCS_H
#define PARTDESIGN_DATUMCS_H
#include <QString>
#include <App/PropertyLinks.h>
#include <Mod/Part/App/DatumFeature.h>
namespace PartDesign
{
class PartDesignExport CoordinateSystem : public Part::Datum
{
PROPERTY_HEADER(PartDesign::CoordinateSystem);
public:
CoordinateSystem();
virtual ~CoordinateSystem();
const char* getViewProviderName(void) const {
return "PartDesignGui::ViewProviderDatumCoordinateSystem";
}
static void initHints();
const std::set<QString> getHint() const;
const int offsetsAllowed() const;
Base::Vector3d getXAxis();
Base::Vector3d getYAxis();
Base::Vector3d getZAxis();
protected:
virtual void onChanged(const App::Property* prop);
private:
// Hints on what further references are required/possible on this feature for a given set of references
static std::map<std::multiset<QString>, std::set<QString> > hints;
};
} //namespace PartDesign
#endif // PARTDESIGN_DATUMCS_H

View File

@@ -28,6 +28,7 @@
#include "FeaturePrimitive.h"
#include "DatumPoint.h"
#include "DatumCS.h"
#include <Mod/Part/App/modelRefine.h>
#include <Base/Exception.h>
#include <App/Document.h>
@@ -36,6 +37,9 @@
#include <BRepBuilderAPI_GTransform.hxx>
#include <BRepAlgoAPI_Fuse.hxx>
#include <BRepAlgoAPI_Cut.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepPrimAPI_MakeCylinder.hxx>
#include <BRepPrimAPI_MakeSphere.hxx>
#include <QObject>
using namespace PartDesign;
@@ -67,13 +71,18 @@ App::DocumentObjectExecReturn* FeaturePrimitive::execute(const TopoDS_Shape& pri
{
try {
//transform the primitive in the correct coordinance
//BRepBuilderAPI_GTransform mkTrf(primitiveShape, getLocation().Transformation());
//const TopoDS_Shape primitiveShape = mkTrf.Shape();
App::DocumentObject* cs = CoordinateSystem.getValue();
if(cs && cs->getTypeId() == PartDesign::CoordinateSystem::getClassTypeId())
Placement.setValue(static_cast<PartDesign::CoordinateSystem*>(cs)->Placement.getValue());
else
Placement.setValue(Base::Placement());
//if we have no base we just add the standart primitive shape
TopoDS_Shape base;
try{
base = getBaseShape();
//if we have a base shape we need to make sure that it does not get our transformation to
BRepBuilderAPI_Transform trsf(getBaseShape(), getLocation().Transformation().Inverted(), true);
base = trsf.Shape();
}
catch(const Base::Exception&) {
@@ -128,47 +137,7 @@ App::DocumentObjectExecReturn* FeaturePrimitive::execute(const TopoDS_Shape& pri
}
void FeaturePrimitive::onChanged(const App::Property* prop)
{/*
if ((prop == &CoordinateSystem)) {
std::multiset<QString> refTypes;
std::vector<App::DocumentObject*> refs = References.getValues();
std::vector<std::string> refnames = References.getSubValues();
if (refs.size() != refnames.size())
return;
for (int r = 0; r < refs.size(); r++)
refTypes.insert(getRefType(refs[r], refnames[r]));
std::set<QString> hint;
if (hints.find(refTypes) != hints.end())
hint = hints[refTypes];
if (!((hint.size() == 1) && (hint.find(QObject::tr("Done")) != hint.end())))
return; // incomplete references
std::pair<Base::Vector3d, bool> origin = {Base::Vector3d(), false};
std::pair<Base::Vector3d, bool> dirX = {Base::Vector3d(), false};
std::pair<Base::Vector3d, bool> dirY = {Base::Vector3d(), false};
for (int i = 0; i < refs.size(); i++) {
if (refs[i]->getTypeId().isDerivedFrom(PartDesign::Point::getClassTypeId())) {
Base::Vector3d point = static_cast<PartDesign::Point*>(refs[i])->getPoint();
if (!origin.second)
origin = {point, true};
else if(!dirX.second) {
if((point-dirX.first).Sqr() < Precision::Confusion())
return;
dirX = {point, true};
}
else if(!dirY.second) {
if((origin.first-dirX.first).Sqr() < Precision::Confusion())
return;
dirY = {point, true};
}
}
}
} */
{
FeatureAddSub::onChanged(prop);
}
@@ -222,4 +191,97 @@ short int Box::mustExecute() const
PROPERTY_SOURCE(PartDesign::AdditiveBox, PartDesign::Box)
PROPERTY_SOURCE(PartDesign::SubtractiveBox, PartDesign::Box)
PROPERTY_SOURCE(PartDesign::Cylinder, PartDesign::FeaturePrimitive)
Cylinder::Cylinder()
{
ADD_PROPERTY_TYPE(Radius,(10.0f),"Cylinder",App::Prop_None,"The radius of the cylinder");
ADD_PROPERTY_TYPE(Angle,(10.0f),"Cylinder",App::Prop_None,"The closing angel of the cylinder ");
ADD_PROPERTY_TYPE(Height,(10.0f),"Cylinder",App::Prop_None,"The height of the cylinder");
primitiveType = FeaturePrimitive::Cylinder;
}
App::DocumentObjectExecReturn* Cylinder::execute(void)
{
// Build a cylinder
if (Radius.getValue() < Precision::Confusion())
return new App::DocumentObjectExecReturn("Radius of cylinder too small");
if (Height.getValue() < Precision::Confusion())
return new App::DocumentObjectExecReturn("Height of cylinder too small");
try {
BRepPrimAPI_MakeCylinder mkCylr(Radius.getValue(),
Height.getValue(),
Angle.getValue()/180.0f*M_PI);
return FeaturePrimitive::execute(mkCylr.Shape());
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
return new App::DocumentObjectExecReturn(e->GetMessageString());
}
return App::DocumentObject::StdReturn;
}
short int Cylinder::mustExecute() const
{
if ( Radius.isTouched() ||
Height.isTouched() ||
Angle.isTouched() )
return 1;
return FeaturePrimitive::mustExecute();
}
PROPERTY_SOURCE(PartDesign::AdditiveCylinder, PartDesign::Cylinder)
PROPERTY_SOURCE(PartDesign::SubtractiveCylinder, PartDesign::Cylinder)
PROPERTY_SOURCE(PartDesign::Sphere, PartDesign::FeaturePrimitive)
Sphere::Sphere()
{
ADD_PROPERTY_TYPE(Radius,(5.0),"Sphere",App::Prop_None,"The radius of the sphere");
ADD_PROPERTY_TYPE(Angle1,(-90.0f),"Sphere",App::Prop_None,"The angle of the sphere");
ADD_PROPERTY_TYPE(Angle2,(90.0f),"Sphere",App::Prop_None,"The angle of the sphere");
ADD_PROPERTY_TYPE(Angle3,(360.0f),"Sphere",App::Prop_None,"The angle of the sphere");
primitiveType = FeaturePrimitive::Sphere;
}
App::DocumentObjectExecReturn* Sphere::execute(void)
{
// Build a sphere
if (Radius.getValue() < Precision::Confusion())
return new App::DocumentObjectExecReturn("Radius of sphere too small");
try {
BRepPrimAPI_MakeSphere mkSphere(Radius.getValue(),
Angle1.getValue()/180.0f*M_PI,
Angle2.getValue()/180.0f*M_PI,
Angle3.getValue()/180.0f*M_PI);
return FeaturePrimitive::execute(mkSphere.Shape());
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
return new App::DocumentObjectExecReturn(e->GetMessageString());
}
return App::DocumentObject::StdReturn;
}
short int Sphere::mustExecute() const
{
if ( Radius.isTouched() ||
Angle1.isTouched() ||
Angle2.isTouched() ||
Angle3.isTouched())
return 1;
return FeaturePrimitive::mustExecute();
}
PROPERTY_SOURCE(PartDesign::AdditiveSphere, PartDesign::Sphere)
PROPERTY_SOURCE(PartDesign::SubtractiveSphere, PartDesign::Sphere)
}

View File

@@ -97,6 +97,85 @@ class PartDesignExport SubtractiveBox : public Box {
}
};
class PartDesignExport Cylinder : public PartDesign::FeaturePrimitive {
PROPERTY_HEADER(PartDesign::Cylinder);
public:
Cylinder();
App::PropertyLength Radius;
App::PropertyLength Height;
App::PropertyAngle Angle;
/** @name methods override feature */
//@{
/// recalculate the Feature
App::DocumentObjectExecReturn *execute(void);
short mustExecute() const;
protected:
};
class PartDesignExport AdditiveCylinder : public Cylinder {
PROPERTY_HEADER(PartDesign::AdditiveCylinder);
AdditiveCylinder() {
addSubType = FeatureAddSub::Additive;
}
};
class PartDesignExport SubtractiveCylinder : public Cylinder {
PROPERTY_HEADER(PartDesign::SubtractiveCylinder);
SubtractiveCylinder() {
addSubType = FeatureAddSub::Subtractive;
}
};
class PartDesignExport Sphere : public PartDesign::FeaturePrimitive {
PROPERTY_HEADER(PartDesign::Sphere);
public:
Sphere();
App::PropertyLength Radius;
App::PropertyAngle Angle1;
App::PropertyAngle Angle2;
App::PropertyAngle Angle3;
/** @name methods override feature */
//@{
/// recalculate the Feature
App::DocumentObjectExecReturn *execute(void);
short mustExecute() const;
protected:
};
class PartDesignExport AdditiveSphere : public Sphere {
PROPERTY_HEADER(PartDesign::AdditiveSphere);
AdditiveSphere() {
addSubType = FeatureAddSub::Additive;
}
};
class PartDesignExport SubtractiveSphere : public Sphere {
PROPERTY_HEADER(PartDesign::SubtractiveSphere);
SubtractiveSphere() {
addSubType = FeatureAddSub::Subtractive;
}
};
} //namespace PartDesign

View File

@@ -58,27 +58,51 @@ void CmdPrimtiveCompAdditive::activated(int iMsg)
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */true);
if (!pcActiveBody) return;
std::string FeatName;
std::string CSName = getUniqueObjectName("CoordinateSystem");;
if(iMsg == 0) {
std::string FeatName = getUniqueObjectName("Box");
std::string CSName = getUniqueObjectName("CoordinateSystem");
FeatName = getUniqueObjectName("Box");
Gui::Command::openCommand("Make additive box");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject(\'PartDesign::AdditiveBox\',\'%s\')",
FeatName.c_str());
Gui::Command::doCommand(Doc,"App.ActiveDocument.%s.addFeature(App.activeDocument().%s)"
,pcActiveBody->getNameInDocument(), FeatName.c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject(\'PartDesign::CoordinateSystem\',\'%s\')",
CSName.c_str());
Gui::Command::doCommand(Doc,"App.ActiveDocument.%s.addFeature(App.activeDocument().%s)"
,pcActiveBody->getNameInDocument(), CSName.c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.CoordinateSystem=(App.ActiveDocument.%s)",
FeatName.c_str(), CSName.c_str());
Gui::Command::updateActive();
Gui::Command::doCommand(Gui, "Gui.activeDocument().hide(\'%s\')", CSName.c_str());
Gui::Command::doCommand(Gui, "Gui.activeDocument().setEdit(\'%s\')", FeatName.c_str());
}
else if(iMsg == 1) {
FeatName = getUniqueObjectName("Cylinder");
Gui::Command::openCommand("Make additive cylinder");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject(\'PartDesign::AdditiveCylinder\',\'%s\')",
FeatName.c_str());
}
else if(iMsg == 3) {
FeatName = getUniqueObjectName("Sphere");
Gui::Command::openCommand("Make additive sphere");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject(\'PartDesign::AdditiveSphere\',\'%s\')",
FeatName.c_str());
}
Gui::Command::doCommand(Doc,"App.ActiveDocument.%s.addFeature(App.activeDocument().%s)"
,pcActiveBody->getNameInDocument(), FeatName.c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject(\'PartDesign::CoordinateSystem\',\'%s\')",
CSName.c_str());
Gui::Command::doCommand(Doc,"App.ActiveDocument.%s.addFeature(App.activeDocument().%s)"
,pcActiveBody->getNameInDocument(), CSName.c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.CoordinateSystem=(App.ActiveDocument.%s)",
FeatName.c_str(), CSName.c_str());
Gui::Command::updateActive();
if (isActiveObjectValid() && (pcActiveBody != NULL)) {
App::DocumentObject* prevSolidFeature = pcActiveBody->getPrevSolidFeature(NULL, false);
if (prevSolidFeature != NULL && strcmp(prevSolidFeature->getNameInDocument(), FeatName.c_str())!=0)
doCommand(Gui,"Gui.activeDocument().hide(\"%s\")", prevSolidFeature->getNameInDocument());
}
Gui::Command::doCommand(Gui, "Gui.activeDocument().hide(\'%s\')", CSName.c_str());
Gui::Command::doCommand(Gui, "Gui.activeDocument().setEdit(\'%s\')", FeatName.c_str());
}
Gui::Action * CmdPrimtiveCompAdditive::createAction(void)
@@ -88,9 +112,11 @@ Gui::Action * CmdPrimtiveCompAdditive::createAction(void)
applyCommandData(this->className(), pcAction);
QAction* p1 = pcAction->addAction(QString());
p1->setIcon(Gui::BitmapFactory().pixmap("Part_Box"));
p1->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Box"));
QAction* p2 = pcAction->addAction(QString());
p2->setIcon(Gui::BitmapFactory().pixmap("Part_Cylinder"));
p2->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Cylinder"));
QAction* p3 = pcAction->addAction(QString());
p3->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Additive_Sphere"));
_pcAction = pcAction;
languageChange();
@@ -112,13 +138,17 @@ void CmdPrimtiveCompAdditive::languageChange()
QList<QAction*> a = pcAction->actions();
QAction* arc1 = a[0];
arc1->setText(QApplication::translate("CmdSketcherCompCreateArc","Center and end points"));
arc1->setToolTip(QApplication::translate("Sketcher_CreateArc","Create an arc by its center and by its end points"));
arc1->setStatusTip(QApplication::translate("Sketcher_CreateArc","Create an arc by its center and by its end points"));
arc1->setText(QApplication::translate("CmdPrimtiveCompAdditive","Additive Box"));
arc1->setToolTip(QApplication::translate("PartDesign_CompPrimitiveAdditive","Create an additive box by its with, height and length"));
arc1->setStatusTip(arc1->toolTip());
QAction* arc2 = a[1];
arc2->setText(QApplication::translate("CmdSketcherCompCreateArc","End points and rim point"));
arc2->setToolTip(QApplication::translate("Sketcher_Create3PointArc","Create an arc by its end points and a point along the arc"));
arc2->setStatusTip(QApplication::translate("Sketcher_Create3PointArc","Create an arc by its end points and a point along the arc"));
arc2->setText(QApplication::translate("CmdPrimtiveCompAdditive","Additive Cylinder"));
arc2->setToolTip(QApplication::translate("PartDesign_CompPrimitiveAdditive","Create an additive cylinder by its radius, height and angle"));
arc2->setStatusTip(arc2->toolTip());
QAction* arc3 = a[2];
arc3->setText(QApplication::translate("CmdPrimtiveCompAdditive","Additive Sphere"));
arc3->setToolTip(QApplication::translate("PartDesign_CompPrimitiveAdditive","Create an additive sphere by its radius and varius angles"));
arc3->setStatusTip(arc3->toolTip());
}
bool CmdPrimtiveCompAdditive::isActive(void)
@@ -148,18 +178,51 @@ void CmdPrimtiveCompSubtractive::activated(int iMsg)
PartDesign::Body *pcActiveBody = PartDesignGui::getBody();
if (!pcActiveBody) return;
std::string FeatName;
std::string CSName = getUniqueObjectName("CoordinateSystem");
if(iMsg == 0) {
std::string FeatName = getUniqueObjectName("Box");
FeatName = getUniqueObjectName("Box");
Gui::Command::openCommand("Make subtractive box");
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().addObject(\'PartDesign::SubtractiveBox\',\'%s\')",
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject(\'PartDesign::SubtractiveBox\',\'%s\')",
FeatName.c_str());
Gui::Command::doCommand(Doc,"App.activeDocument().%s.addFeature(App.activeDocument().%s)"
,pcActiveBody->getNameInDocument(), FeatName.c_str());
Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().setEdit(\'%s\')", FeatName.c_str());
Gui::Command::updateActive();
}
else if(iMsg == 1) {
FeatName = getUniqueObjectName("Cylinder");
Gui::Command::openCommand("Make subtractive cylinder");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject(\'PartDesign::SubtractiveCylinder\',\'%s\')",
FeatName.c_str());
}
else if(iMsg == 2) {
FeatName = getUniqueObjectName("Sphere");
Gui::Command::openCommand("Make subtractive sphere");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject(\'PartDesign::SubtractiveSphere\',\'%s\')",
FeatName.c_str());
}
Gui::Command::doCommand(Doc,"App.ActiveDocument.%s.addFeature(App.activeDocument().%s)"
,pcActiveBody->getNameInDocument(), FeatName.c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.addObject(\'PartDesign::CoordinateSystem\',\'%s\')",
CSName.c_str());
Gui::Command::doCommand(Doc,"App.ActiveDocument.%s.addFeature(App.activeDocument().%s)"
,pcActiveBody->getNameInDocument(), CSName.c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.CoordinateSystem=(App.ActiveDocument.%s)",
FeatName.c_str(), CSName.c_str());
Gui::Command::updateActive();
if (isActiveObjectValid() && (pcActiveBody != NULL)) {
App::DocumentObject* prevSolidFeature = pcActiveBody->getPrevSolidFeature(NULL, false);
if (prevSolidFeature != NULL && strcmp(prevSolidFeature->getNameInDocument(), FeatName.c_str())!=0)
doCommand(Gui,"Gui.activeDocument().hide(\"%s\")", prevSolidFeature->getNameInDocument());
}
Gui::Command::doCommand(Gui, "Gui.activeDocument().hide(\'%s\')", CSName.c_str());
Gui::Command::doCommand(Gui, "Gui.activeDocument().setEdit(\'%s\')", FeatName.c_str());
}
Gui::Action * CmdPrimtiveCompSubtractive::createAction(void)
@@ -169,9 +232,11 @@ Gui::Action * CmdPrimtiveCompSubtractive::createAction(void)
applyCommandData(this->className(), pcAction);
QAction* p1 = pcAction->addAction(QString());
p1->setIcon(Gui::BitmapFactory().pixmap("Part_Box"));
p1->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Box"));
QAction* p2 = pcAction->addAction(QString());
p2->setIcon(Gui::BitmapFactory().pixmap("Part_Cylinder"));
p2->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Cylinder"));
QAction* p3 = pcAction->addAction(QString());
p3->setIcon(Gui::BitmapFactory().pixmap("PartDesign_Subtractive_Sphere"));
_pcAction = pcAction;
languageChange();
@@ -193,13 +258,17 @@ void CmdPrimtiveCompSubtractive::languageChange()
QList<QAction*> a = pcAction->actions();
QAction* arc1 = a[0];
arc1->setText(QApplication::translate("CmdSketcherCompCreateArc","Center and end points"));
arc1->setToolTip(QApplication::translate("Sketcher_CreateArc","Create an arc by its center and by its end points"));
arc1->setStatusTip(QApplication::translate("Sketcher_CreateArc","Create an arc by its center and by its end points"));
arc1->setText(QApplication::translate("CmdPrimtiveCompSubtractive","Subtractive Box"));
arc1->setToolTip(QApplication::translate("PartDesign_CompPrimitiveSubtractive","Create an subtractive box by its with, height and length"));
arc1->setStatusTip(arc1->toolTip());
QAction* arc2 = a[1];
arc2->setText(QApplication::translate("CmdSketcherCompCreateArc","End points and rim point"));
arc2->setToolTip(QApplication::translate("Sketcher_Create3PointArc","Create an arc by its end points and a point along the arc"));
arc2->setStatusTip(QApplication::translate("Sketcher_Create3PointArc","Create an arc by its end points and a point along the arc"));
arc2->setText(QApplication::translate("CmdPrimtiveCompSubtractive","Subtractive Cylinder"));
arc2->setToolTip(QApplication::translate("PartDesign_CompPrimitiveSubtractive","Create an subtractive cylinder by its radius, height and angle"));
arc2->setStatusTip(arc2->toolTip());
QAction* arc3 = a[2];
arc3->setText(QApplication::translate("CmdPrimtiveCompSubtractive","Subtractive Sphere"));
arc3->setToolTip(QApplication::translate("PartDesign_CompPrimitiveSubtractive","Create an subtractive sphere by its radius and varius angles"));
arc3->setStatusTip(arc3->toolTip());
}
bool CmdPrimtiveCompSubtractive::isActive(void)

View File

@@ -18,6 +18,7 @@
<file>icons/PartDesign_Plane.svg</file>
<file>icons/PartDesign_Line.svg</file>
<file>icons/PartDesign_Point.svg</file>
<file>icons/PartDesign_CoordinateSystem.svg</file>
<file>icons/PartDesign_MoveTip.svg</file>
<file>icons/Tree_PartDesign_Pad.svg</file>
<file>icons/Tree_PartDesign_Revolution.svg</file>
@@ -26,6 +27,12 @@
<file>icons/PartDesignWorkbench.svg</file>
<file>icons/PartDesign_Body_Create_New.svg</file>
<file>icons/PartDesign_Body_Tree.svg</file>
<file>icons/PartDesign_Additive_Box.svg</file>
<file>icons/PartDesign_Additive_Cylinder.svg</file>
<file>icons/PartDesign_Additive_Sphere.svg</file>
<file>icons/PartDesign_Subtractive_Box.svg</file>
<file>icons/PartDesign_Subtractive_Cylinder.svg</file>
<file>icons/PartDesign_Subtractive_Sphere.svg</file>
<file>translations/PartDesign_af.qm</file>
<file>translations/PartDesign_de.qm</file>
<file>translations/PartDesign_fi.qm</file>

View File

@@ -0,0 +1,240 @@
<?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="svg2860"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="PartDesign_Additive_Box.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs2862">
<linearGradient
id="linearGradient4387">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop4389" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop4391" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3692"
cx="45.883327"
cy="28.869568"
fx="45.883327"
fy="28.869568"
r="19.467436"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-0.23443224,0.23443198)" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3703"
gradientUnits="userSpaceOnUse"
cx="131.48187"
cy="93.557289"
fx="131.48187"
fy="93.557289"
r="19.467436"
gradientTransform="matrix(0.52711064,1.8158874,-1.4534843,0.42191331,203.23405,-187.6583)" />
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377-3"
id="radialGradient3705"
gradientUnits="userSpaceOnUse"
cx="147.05713"
cy="83.989143"
fx="147.05713"
fy="83.989143"
r="19.467436"
gradientTransform="matrix(1.2966028,0.17711231,-0.14092861,1.0317094,-32.689929,-29.109274)" />
<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="perspective2868" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377-3"
id="radialGradient3692-5"
cx="45.883327"
cy="28.869568"
fx="45.883327"
fy="28.869568"
r="19.467436"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-0.23443224,0.23443198)" />
<linearGradient
id="linearGradient3377-3">
<stop
id="stop3379-8"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381-3"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
r="19.467436"
fy="28.869568"
fx="45.883327"
cy="28.869568"
cx="45.883327"
gradientTransform="translate(-128.45417,-32.981052)"
gradientUnits="userSpaceOnUse"
id="radialGradient4514"
xlink:href="#linearGradient3377-3"
inkscape:collect="always" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="12.796875"
inkscape:cx="20.200244"
inkscape:cy="32.078144"
inkscape:current-layer="g3618"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1848"
inkscape:window-height="1043"
inkscape:window-x="66"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata2865">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<g
id="g3618"
transform="translate(-129.7515,-68.681262)"
style="stroke-width:3.5;stroke-miterlimit:4;stroke-dasharray:none">
<path
style="opacity:0.66523604999999997;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 164.25407,125.89934 L 185.75844,120.53301 L 191.3165,115.1667 L 181.45756,113.73568 L 164.25407,125.89934 z"
id="path3546" />
<path
style="fill:url(#radialGradient3705);fill-opacity:1.0;fill-rule:evenodd;stroke:#000137;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:round;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 152.10078,76.596441 -19.03297,8.195083 30.80814,4.305159 0.19104,35.694947 16.96935,-8.87116 -0.36186,-36.182158 z"
id="rect3522"
sodipodi:nodetypes="ccccccc"
inkscape:connector-curvature="0" />
<path
style="fill:url(#radialGradient3703);fill-opacity:1.0;fill-rule:evenodd;stroke:#000137;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:round;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 132.97421,84.998317 31.07248,3.365615 0,36.477188 -31.04569,-3.58004 z"
id="rect3520"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<path
style="fill:url(#radialGradient3692);fill-opacity:1;fill-rule:evenodd;stroke:#000137;stroke-width:3.50000000000000000;stroke-linecap:round;stroke-linejoin:round;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 163.96908,88.56518 16.33526,-8.33065"
id="path3536"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
<path
style="fill:none;stroke:#ff2600;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 34.383394,19.614164 -0.07815,36.41514"
id="path4461"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#ff2600;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="M 2.9694752,52.590964 33.52381,56.107448"
id="path4463"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:type="arc"
style="fill:#ff2600;fill-opacity:1;stroke:#ff2600;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(1.0687187,0,0,1.1301706,-4.3751737,-4.7242675)" />
<path
sodipodi:type="arc"
style="fill:#ff2600;fill-opacity:1;stroke:#ff2600;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-9"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(0.97719968,0,0,0.96509721,15.833048,25.924713)" />
<path
sodipodi:type="arc"
style="fill:#ff2600;fill-opacity:1;stroke:#ff2600;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-1"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(0.90401886,0,0,0.99180088,-29.837032,30.772485)" />
<path
sodipodi:type="arc"
style="fill:#ff2600;fill-opacity:1;stroke:#ff2600;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-0"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(1.0557539,0,0,1.0545369,-4.0207812,33.03595)" />
<path
style="fill:url(#radialGradient4514);fill-opacity:1;fill-rule:evenodd;stroke:#ff2600;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;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 35.749342,55.349696 51.381305,47.253478"
id="path3536-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,201 @@
<?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="svg2821"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="PartDesign_Additive_Cylinder.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs2823">
<linearGradient
id="linearGradient4570">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop4572" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop4574" />
</linearGradient>
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</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="perspective2829" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3916"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.1551663,0.76788714,-0.33130654,0.92986767,-73.829288,-60.39429)"
cx="83.883064"
cy="85.367226"
fx="83.883064"
fy="85.367226"
r="19.467436" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="linearGradient3918"
x1="3.7985361"
y1="24.309412"
x2="34.318169"
y2="36.343601"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1487642,0,0,1.1433951,-0.23152358,0.05575265)" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="12.375"
inkscape:cx="19.79798"
inkscape:cy="32"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1848"
inkscape:window-height="1043"
inkscape:window-x="66"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-global="false" />
<metadata
id="metadata2826">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
sodipodi:type="arc"
style="opacity:0.66523605;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.07586193;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="path3756"
sodipodi:cx="96.428574"
sodipodi:cy="83.5"
sodipodi:rx="21.44079"
sodipodi:ry="6.423224"
d="m 117.86936,83.5 a 21.44079,6.423224 0 1 1 -42.881577,0 21.44079,6.423224 0 1 1 42.881577,0 z"
transform="matrix(1.0308229,-0.17319398,0.14805389,1.0283492,-71.354532,-15.927364)" />
<path
inkscape:connector-curvature="0"
style="fill:url(#linearGradient3918);fill-opacity:1.0;fill-rule:evenodd;stroke:#000137;stroke-width:2.29231977;stroke-linecap:butt;stroke-linejoin:round;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 3.6611991,11.938199 c -0.2418594,10.329317 0.1218597,26.357798 -0.04623,36.557417 0.024343,3.307294 3.141333,8.567217 21.3755179,11.371405 12.277883,0.946988 23.31862,-2.532524 23.31862,-5.615432 l 0.236992,-36.517817 z"
id="path3727"
sodipodi:nodetypes="cccccc" />
<path
sodipodi:type="arc"
style="fill:url(#radialGradient3916);fill-opacity:1.0;fill-rule:evenodd;stroke:#000137;stroke-width:2.20000005;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="path3725"
sodipodi:cx="96.428574"
sodipodi:cy="83.5"
sodipodi:rx="21.506716"
sodipodi:ry="7.1544566"
d="m 117.93529,83.5 a 21.506716,7.1544566 0 1 1 -43.013432,0 21.506716,7.1544566 0 1 1 43.013432,0 z"
transform="matrix(1.030359,0.13397331,-0.32038103,1.3540116,-46.462631,-111.69758)" />
<g
id="g3976"
transform="matrix(1.1487642,0,0,1.1433951,-0.23152359,0.05575265)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4461"
d="m 42.529915,16.195361 0.07814,28.991453"
style="fill:none;stroke:#ff2600;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
transform="matrix(1.0687187,0,0,1.1301706,3.7322736,21.362036)"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 0 1 -2.305251,2.461539 2.3052504,2.4615386 0 0 1 -2.30525,-2.461539 2.3052504,2.4615386 0 0 1 2.30525,-2.461538 2.3052504,2.4615386 0 0 1 2.305251,2.461538 z"
sodipodi:ry="2.4615386"
sodipodi:rx="2.3052504"
sodipodi:cy="21.84127"
sodipodi:cx="36.376068"
id="path4465-6"
style="fill:#ff2600;fill-opacity:1;stroke:#ff2600;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
sodipodi:type="arc" />
<path
transform="matrix(1.0687187,0,0,1.1301706,3.5369146,-8.9969369)"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 0 1 -2.305251,2.461539 2.3052504,2.4615386 0 0 1 -2.30525,-2.461539 2.3052504,2.4615386 0 0 1 2.30525,-2.461538 2.3052504,2.4615386 0 0 1 2.305251,2.461538 z"
sodipodi:ry="2.4615386"
sodipodi:rx="2.3052504"
sodipodi:cy="21.84127"
sodipodi:cx="36.376068"
id="path4465-3"
style="fill:#ff2600;fill-opacity:1;stroke:#ff2600;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
sodipodi:type="arc" />
</g>
<g
id="g3970"
transform="matrix(1.1487642,0,0,1.1433951,-0.23152359,0.05575265)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4461-2"
d="M 25.45513,11.66154 5.3720901,9.087585"
style="fill:none;stroke:#ff2600;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
transform="matrix(-0.00558562,1.0687041,-1.1301552,-0.0059068,30.415599,-29.897617)"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 0 1 -2.305251,2.461539 2.3052504,2.4615386 0 0 1 -2.30525,-2.461539 2.3052504,2.4615386 0 0 1 2.30525,-2.461538 2.3052504,2.4615386 0 0 1 2.305251,2.461538 z"
sodipodi:ry="2.4615386"
sodipodi:rx="2.3052504"
sodipodi:cy="21.84127"
sodipodi:cx="36.376068"
id="path4465-6-7"
style="fill:#ff2600;fill-opacity:1;stroke:#ff2600;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
sodipodi:type="arc" />
<g
transform="translate(0.23443224,-48.527472)"
id="g3963">
<path
sodipodi:type="arc"
style="fill:#ff2600;fill-opacity:1;stroke:#ff2600;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-3-0"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 0 1 -2.305251,2.461539 2.3052504,2.4615386 0 0 1 -2.30525,-2.461539 2.3052504,2.4615386 0 0 1 2.30525,-2.461538 2.3052504,2.4615386 0 0 1 2.305251,2.461538 z"
transform="matrix(-0.00558562,1.0687041,-1.1301552,-0.0059068,48.897278,21.406355)" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@@ -0,0 +1,171 @@
<?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="svg2784"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="PartDesign_Additive_Sphere.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs2786">
<linearGradient
id="linearGradient3777">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop3779" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop3781" />
</linearGradient>
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3692"
cx="45.883327"
cy="28.869568"
fx="45.883327"
fy="28.869568"
r="19.467436"
gradientUnits="userSpaceOnUse" />
<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="perspective2792" />
<radialGradient
r="19.467436"
fy="28.869568"
fx="45.883327"
cy="28.869568"
cx="45.883327"
gradientTransform="translate(-135.72159,-55.525617)"
gradientUnits="userSpaceOnUse"
id="radialGradient4514"
xlink:href="#linearGradient3377-3"
inkscape:collect="always" />
<linearGradient
id="linearGradient3377-3">
<stop
id="stop3379-8"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381-3"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="12.796875"
inkscape:cx="20.200244"
inkscape:cy="32"
inkscape:current-layer="g3564"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1848"
inkscape:window-height="1043"
inkscape:window-x="66"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata2789">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<g
id="g3564"
transform="translate(-0.8153068,-67.540042)">
<path
transform="matrix(1.2482835,0,0,0.4121139,-28.969888,102.91872)"
d="M 71.785715,34.571426 A 18.571428,18.571428 0 0 1 53.214287,53.142855 18.571428,18.571428 0 0 1 34.642859,34.571426 18.571428,18.571428 0 0 1 53.214287,15.999998 18.571428,18.571428 0 0 1 71.785715,34.571426 Z"
sodipodi:ry="18.571428"
sodipodi:rx="18.571428"
sodipodi:cy="34.571426"
sodipodi:cx="53.214287"
id="path3694"
style="opacity:0.66523605;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
<path
transform="matrix(1.2276699,0,0,1.2276699,-36.802054,58.263192)"
d="M 71.785715,34.571426 A 18.571428,18.571428 0 0 1 53.214287,53.142855 18.571428,18.571428 0 0 1 34.642859,34.571426 18.571428,18.571428 0 0 1 53.214287,15.999998 18.571428,18.571428 0 0 1 71.785715,34.571426 Z"
sodipodi:ry="18.571428"
sodipodi:rx="18.571428"
sodipodi:cy="34.571426"
sodipodi:cx="53.214287"
id="path3696"
style="opacity:1;fill:url(#radialGradient3692);fill-opacity:1.0;fill-rule:evenodd;stroke:#000137;stroke-width:1.79201269;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
</g>
<path
sodipodi:type="arc"
style="fill:#ff2600;fill-opacity:1;stroke:#ff2600;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-9"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(0.97719968,0,0,0.96509721,11.925845,1.2702567)" />
<path
sodipodi:type="arc"
style="fill:#ff2600;fill-opacity:1;stroke:#ff2600;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-0"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(1.0557539,0,0,1.0545369,-11.444469,9.6317992)" />
<path
style="fill:url(#radialGradient4514);fill-opacity:1;fill-rule:evenodd;stroke:#ff2600;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;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.778645,32.101834 47.630389,22.208303"
id="path3536-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -0,0 +1,193 @@
<?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="svg3052"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="PartDesign_CoordinateSystem.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs3054">
<linearGradient
id="linearGradient4032">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop4034" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop4036" />
</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="perspective3060" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3705"
gradientUnits="userSpaceOnUse"
cx="148.88333"
cy="81.869568"
fx="148.88333"
fy="81.869568"
r="19.467436"
gradientTransform="matrix(1.6244669,-0.05136783,0.04345521,0.9993132,-102.99033,7.7040438)" />
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#4bff54;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#00b800;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3206"
id="radialGradient3703"
gradientUnits="userSpaceOnUse"
cx="135.38333"
cy="97.369568"
fx="135.38333"
fy="97.369568"
r="19.467436"
gradientTransform="matrix(0.87904684,0.2250379,-0.41709097,2.0016728,56.73751,-127.99883)" />
<linearGradient
id="linearGradient3199">
<stop
id="stop3201"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3203"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3692"
cx="45.883327"
cy="28.869568"
fx="45.883327"
fy="28.869568"
r="19.467436"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3206">
<stop
id="stop3208"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3210"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4032"
id="radialGradient4030"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.260164,-0.05136783,0.03370995,0.9993132,-43.139781,7.2044077)"
cx="148.88333"
cy="81.869568"
fx="148.88333"
fy="81.869568"
r="19.467436" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="12.328125"
inkscape:cx="7.5031683"
inkscape:cy="30.03062"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1848"
inkscape:window-height="1043"
inkscape:window-x="66"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata3057">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4193"
d="M 25.577483,7.3776468 25.717821,40.262404"
style="fill:none;stroke:#0034ff;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<ellipse
id="path4195"
style="fill:#ff0900;fill-opacity:1;fill-rule:nonzero;stroke:#ff0900;stroke-width:1.04872465;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
cx="25.457537"
cy="6.5019011"
rx="3.9230394"
ry="3.9230397" />
<path
style="fill:none;stroke:#0034ff;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 57.244948,38.06677 23.46482,38.206996"
id="path4197"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<ellipse
style="fill:#ff0900;fill-opacity:1;fill-rule:nonzero;stroke:#ff0900;stroke-width:1.04872465;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3078"
cx="56.36248"
cy="37.731304"
rx="3.9230394"
ry="3.9230397" />
<path
style="fill:none;stroke:#0034ff;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 7.6204507,57.969975 26.503763,37.203664"
id="path4199"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<ellipse
style="fill:#ff0900;fill-opacity:1;fill-rule:nonzero;stroke:#ff0900;stroke-width:1.10121942;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3078-5"
cx="7.8555155"
cy="57.847908"
rx="4.0590229"
ry="4.180696" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -0,0 +1,271 @@
<?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="svg2860"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="PartDesign_Subtractive_Box.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs2862">
<linearGradient
id="linearGradient4196">
<stop
id="stop4198"
offset="0"
style="stop-color:#ff0200;stop-opacity:1" />
<stop
id="stop4200"
offset="1"
style="stop-color:#940900;stop-opacity:1" />
</linearGradient>
<linearGradient
id="linearGradient4190">
<stop
style="stop-color:#ff001a;stop-opacity:1"
offset="0"
id="stop4192" />
<stop
style="stop-color:#bf1005;stop-opacity:1"
offset="1"
id="stop4194" />
</linearGradient>
<linearGradient
id="linearGradient4168">
<stop
id="stop4170"
offset="0"
style="stop-color:#ff9a2b;stop-opacity:1" />
<stop
id="stop4172"
offset="1"
style="stop-color:#ff2200;stop-opacity:1" />
</linearGradient>
<linearGradient
id="linearGradient4160">
<stop
style="stop-color:#faff2b;stop-opacity:1;"
offset="0"
id="stop4162" />
<stop
style="stop-color:#ff5f00;stop-opacity:1"
offset="1"
id="stop4164" />
</linearGradient>
<linearGradient
id="linearGradient4387">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop4389" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop4391" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3692"
cx="45.883327"
cy="28.869568"
fx="45.883327"
fy="28.869568"
r="19.467436"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-0.23443224,0.23443198)" />
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4196"
id="radialGradient3705"
gradientUnits="userSpaceOnUse"
cx="151.6907"
cy="82.814987"
fx="151.6907"
fy="82.814987"
r="19.467436"
gradientTransform="matrix(1.2966028,0.17711231,-0.14092861,1.0317094,-32.689929,-29.109274)" />
<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="perspective2868" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377-3"
id="radialGradient3692-5"
cx="45.883327"
cy="28.869568"
fx="45.883327"
fy="28.869568"
r="19.467436"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-0.23443224,0.23443198)" />
<linearGradient
id="linearGradient3377-3">
<stop
id="stop3379-8"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381-3"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4196"
id="linearGradient4166"
x1="143.02397"
y1="104.37271"
x2="165.79669"
y2="104.91972"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="12.796875"
inkscape:cx="11.526251"
inkscape:cy="35.282051"
inkscape:current-layer="g3618"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1848"
inkscape:window-height="1043"
inkscape:window-x="66"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata2865">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<g
id="g3618"
transform="translate(-129.7515,-68.681262)"
style="stroke-width:3.5;stroke-miterlimit:4;stroke-dasharray:none">
<path
style="opacity:0.66523604999999997;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 164.25407,125.89934 L 185.75844,120.53301 L 191.3165,115.1667 L 181.45756,113.73568 L 164.25407,125.89934 z"
id="path3546" />
<path
style="fill:url(#radialGradient3705);fill-opacity:1;fill-rule:evenodd;stroke:#000137;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:round;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 152.10078,76.596441 -19.03297,8.195083 30.80814,4.305159 0.19104,35.694947 16.96935,-8.87116 -0.36186,-36.182158 z"
id="rect3522"
sodipodi:nodetypes="ccccccc"
inkscape:connector-curvature="0" />
<path
style="fill:url(#linearGradient4166);fill-opacity:1;fill-rule:evenodd;stroke:#000137;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:round;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 132.97421,84.998317 31.07248,3.365615 0,36.477188 -31.04569,-3.58004 z"
id="rect3520"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<path
style="fill:url(#radialGradient3692);fill-opacity:1;fill-rule:evenodd;stroke:#000137;stroke-width:3.50000000000000000;stroke-linecap:round;stroke-linejoin:round;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 163.96908,88.56518 16.33526,-8.33065"
id="path3536"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
<path
style="fill:#000bff;stroke:#1700ff;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1"
d="m 34.383394,19.614164 -0.07815,36.41514"
id="path4461"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:#000bff;stroke:#1700ff;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1"
d="M 2.9694752,52.590964 33.52381,56.107448"
id="path4463"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:type="arc"
style="fill:#000bff;fill-opacity:1;stroke:#1700ff;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(1.0687187,0,0,1.1301706,-4.3751737,-4.7242675)" />
<path
sodipodi:type="arc"
style="fill:#000bff;fill-opacity:1;stroke:#1700ff;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-9"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(0.97719968,0,0,0.96509721,15.833048,25.924713)" />
<path
sodipodi:type="arc"
style="fill:#000bff;fill-opacity:1;stroke:#1700ff;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-1"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(0.90401886,0,0,0.99180088,-29.837032,30.772485)" />
<path
sodipodi:type="arc"
style="fill:#000bff;fill-opacity:1;stroke:#1700ff;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-0"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(1.0557539,0,0,1.0545369,-4.0207812,33.03595)" />
<path
style="fill:#000bff;fill-opacity:1;fill-rule:evenodd;stroke:#1700ff;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;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 35.749342,55.349696 51.381305,47.253478"
id="path3536-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,215 @@
<?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="svg2821"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="PartDesign_Subtractive_Cylinder.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs2823">
<linearGradient
id="linearGradient4154">
<stop
style="stop-color:#ff1d00;stop-opacity:1"
offset="0"
id="stop4156" />
<stop
style="stop-color:#930009;stop-opacity:1"
offset="1"
id="stop4158" />
</linearGradient>
<linearGradient
id="linearGradient4570">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop4572" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop4574" />
</linearGradient>
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</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="perspective2829" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4154"
id="radialGradient3916"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.424885,0.23314504,-0.06488685,0.97684007,-31.04618,-16.986969)"
cx="88.338531"
cy="81.558777"
fx="88.338531"
fy="81.558777"
r="19.467436" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4154"
id="linearGradient3918"
x1="3.7985361"
y1="24.309412"
x2="44.306946"
y2="40.654705"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1487642,0,0,1.1433951,-0.23152358,0.05575265)" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="12.375"
inkscape:cx="7.5959598"
inkscape:cy="32.080808"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1848"
inkscape:window-height="1043"
inkscape:window-x="66"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-global="false" />
<metadata
id="metadata2826">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
sodipodi:type="arc"
style="opacity:0.66523605;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.07586193;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="path3756"
sodipodi:cx="96.428574"
sodipodi:cy="83.5"
sodipodi:rx="21.44079"
sodipodi:ry="6.423224"
d="m 117.86936,83.5 a 21.44079,6.423224 0 1 1 -42.881577,0 21.44079,6.423224 0 1 1 42.881577,0 z"
transform="matrix(1.0308229,-0.17319398,0.14805389,1.0283492,-71.354532,-15.927364)" />
<path
inkscape:connector-curvature="0"
style="fill:url(#linearGradient3918);fill-opacity:1;fill-rule:evenodd;stroke:#000137;stroke-width:2.29231977;stroke-linecap:butt;stroke-linejoin:round;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 3.6611991,11.938199 c -0.2418594,10.329317 0.1218597,26.357798 -0.04623,36.557417 0.024343,3.307294 3.141333,8.567217 21.3755179,11.371405 12.277883,0.946988 23.31862,-2.532524 23.31862,-5.615432 l 0.236992,-36.517817 z"
id="path3727"
sodipodi:nodetypes="cccccc" />
<path
sodipodi:type="arc"
style="fill:url(#radialGradient3916);fill-opacity:1;fill-rule:evenodd;stroke:#000137;stroke-width:2.20000005;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="path3725"
sodipodi:cx="96.428574"
sodipodi:cy="83.5"
sodipodi:rx="21.506716"
sodipodi:ry="7.1544566"
d="m 117.93529,83.5 a 21.506716,7.1544566 0 1 1 -43.013432,0 21.506716,7.1544566 0 1 1 43.013432,0 z"
transform="matrix(1.030359,0.13397331,-0.32038103,1.3540116,-46.462631,-111.69758)" />
<g
id="g3976"
transform="matrix(1.1487642,0,0,1.1433951,-0.23152359,0.05575265)"
style="stroke:#161ef6;stroke-opacity:1;fill:#0d25ed;fill-opacity:1">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4461"
d="m 42.529915,16.195361 0.07814,28.991453"
style="fill:#0d25ed;stroke:#161ef6;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1" />
<path
transform="matrix(1.0687187,0,0,1.1301706,3.7322736,21.362036)"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 0 1 -2.305251,2.461539 2.3052504,2.4615386 0 0 1 -2.30525,-2.461539 2.3052504,2.4615386 0 0 1 2.30525,-2.461538 2.3052504,2.4615386 0 0 1 2.305251,2.461538 z"
sodipodi:ry="2.4615386"
sodipodi:rx="2.3052504"
sodipodi:cy="21.84127"
sodipodi:cx="36.376068"
id="path4465-6"
style="fill:#0d25ed;fill-opacity:1;stroke:#161ef6;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
sodipodi:type="arc" />
<path
transform="matrix(1.0687187,0,0,1.1301706,3.5369146,-8.9969369)"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 0 1 -2.305251,2.461539 2.3052504,2.4615386 0 0 1 -2.30525,-2.461539 2.3052504,2.4615386 0 0 1 2.30525,-2.461538 2.3052504,2.4615386 0 0 1 2.305251,2.461538 z"
sodipodi:ry="2.4615386"
sodipodi:rx="2.3052504"
sodipodi:cy="21.84127"
sodipodi:cx="36.376068"
id="path4465-3"
style="fill:#0d25ed;fill-opacity:1;stroke:#161ef6;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
sodipodi:type="arc" />
</g>
<g
id="g3970"
transform="matrix(1.1487642,0,0,1.1433951,-0.23152359,0.05575265)"
style="stroke:#161ef6;stroke-opacity:1;fill:#0d25ed;fill-opacity:1">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4461-2"
d="M 25.45513,11.66154 5.3720901,9.087585"
style="fill:#0d25ed;stroke:#161ef6;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1" />
<path
transform="matrix(-0.00558562,1.0687041,-1.1301552,-0.0059068,30.415599,-29.897617)"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 0 1 -2.305251,2.461539 2.3052504,2.4615386 0 0 1 -2.30525,-2.461539 2.3052504,2.4615386 0 0 1 2.30525,-2.461538 2.3052504,2.4615386 0 0 1 2.305251,2.461538 z"
sodipodi:ry="2.4615386"
sodipodi:rx="2.3052504"
sodipodi:cy="21.84127"
sodipodi:cx="36.376068"
id="path4465-6-7"
style="fill:#0d25ed;fill-opacity:1;stroke:#161ef6;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
sodipodi:type="arc" />
<g
transform="translate(0.23443224,-48.527472)"
id="g3963"
style="stroke:#161ef6;stroke-opacity:1;fill:#0d25ed;fill-opacity:1">
<path
sodipodi:type="arc"
style="fill:#0d25ed;fill-opacity:1;stroke:#161ef6;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-3-0"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 0 1 -2.305251,2.461539 2.3052504,2.4615386 0 0 1 -2.30525,-2.461539 2.3052504,2.4615386 0 0 1 2.30525,-2.461538 2.3052504,2.4615386 0 0 1 2.305251,2.461538 z"
transform="matrix(-0.00558562,1.0687041,-1.1301552,-0.0059068,48.897278,21.406355)" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -0,0 +1,161 @@
<?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="svg2784"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="PartDesign_Subtractive_Sphere.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs2786">
<linearGradient
id="linearGradient3777">
<stop
style="stop-color:#71b2f8;stop-opacity:1;"
offset="0"
id="stop3779" />
<stop
style="stop-color:#002795;stop-opacity:1;"
offset="1"
id="stop3781" />
</linearGradient>
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377-3"
id="radialGradient3692"
cx="45.94698"
cy="32.243141"
fx="45.94698"
fy="32.243141"
r="19.467436"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.80054921,-0.00653937,0.00816833,0.99996664,8.9007888,0.30153983)" />
<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="perspective2792" />
<linearGradient
id="linearGradient3377-3">
<stop
id="stop3379-8"
offset="0"
style="stop-color:#ff3400;stop-opacity:1" />
<stop
id="stop3381-3"
offset="1"
style="stop-color:#a00004;stop-opacity:1" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="12.796875"
inkscape:cx="8.4004882"
inkscape:cy="32.078144"
inkscape:current-layer="g3564"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1848"
inkscape:window-height="1043"
inkscape:window-x="66"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata2789">
<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 />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<g
id="g3564"
transform="translate(-0.8153068,-67.540042)">
<path
transform="matrix(1.2482835,0,0,0.4121139,-28.969888,102.91872)"
d="M 71.785715,34.571426 A 18.571428,18.571428 0 0 1 53.214287,53.142855 18.571428,18.571428 0 0 1 34.642859,34.571426 18.571428,18.571428 0 0 1 53.214287,15.999998 18.571428,18.571428 0 0 1 71.785715,34.571426 Z"
sodipodi:ry="18.571428"
sodipodi:rx="18.571428"
sodipodi:cy="34.571426"
sodipodi:cx="53.214287"
id="path3694"
style="opacity:0.66523605;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
<path
transform="matrix(1.2276699,0,0,1.2276699,-36.802054,58.263192)"
d="M 71.785715,34.571426 A 18.571428,18.571428 0 0 1 53.214287,53.142855 18.571428,18.571428 0 0 1 34.642859,34.571426 18.571428,18.571428 0 0 1 53.214287,15.999998 18.571428,18.571428 0 0 1 71.785715,34.571426 Z"
sodipodi:ry="18.571428"
sodipodi:rx="18.571428"
sodipodi:cy="34.571426"
sodipodi:cx="53.214287"
id="path3696"
style="opacity:1;fill:url(#radialGradient3692);fill-opacity:1;fill-rule:evenodd;stroke:#000137;stroke-width:1.79201269;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
</g>
<path
sodipodi:type="arc"
style="fill:#0d17ef;fill-opacity:1;stroke:#0013ff;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-9"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(0.97719968,0,0,0.96509721,11.925845,1.2702567)" />
<path
sodipodi:type="arc"
style="fill:#0d17ef;fill-opacity:1;stroke:#0013ff;stroke-width:2.20000005;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
id="path4465-0"
sodipodi:cx="36.376068"
sodipodi:cy="21.84127"
sodipodi:rx="2.3052504"
sodipodi:ry="2.4615386"
d="m 38.681319,21.84127 a 2.3052504,2.4615386 0 1 1 -4.610501,0 2.3052504,2.4615386 0 1 1 4.610501,0 z"
transform="matrix(1.0557539,0,0,1.0545369,-11.444469,9.6317992)" />
<path
style="fill:#0d17ef;fill-opacity:1;fill-rule:evenodd;stroke:#0013ff;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;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.778645,32.101834 47.630389,22.208303"
id="path3536-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -0,0 +1,99 @@
/***************************************************************************
* Copyright (c) 2015 Stefan Tröger <stefantroeger@gmx.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <sstream>
# include <QRegExp>
# include <QTextStream>
# include <QMessageBox>
# include <Precision.hxx>
#endif
#include "TaskPrimitiveParameters.h"
#include "ViewProviderDatumCS.h"
#include <Mod/PartDesign/App/FeaturePrimitive.h>
#include <Mod/PartDesign/App/DatumCS.h>
#include <Mod/Part/Gui/DlgPrimitives.h>
#include <Mod/Part/App/DatumFeature.h>
#include <Gui/Application.h>
#include <Gui/Document.h>
#include <Gui/Command.h>
using namespace PartDesignGui;
TaskPrimitiveParameters::TaskPrimitiveParameters(ViewProviderPrimitive* PrimitiveView)
{
assert(PrimitiveView);
PartDesign::FeaturePrimitive* prm = static_cast<PartDesign::FeaturePrimitive*>(PrimitiveView->getObject());
cs = static_cast<PartDesign::CoordinateSystem*>(prm->CoordinateSystem.getValue());
//if no coordinate system exist we need to add one, it is highly important that it exists!
if(!cs) {
std::string CSName = App::GetApplication().getActiveDocument()->getUniqueObjectName("CoordinateSystem");
cs = static_cast<PartDesign::CoordinateSystem*>(
App::GetApplication().getActiveDocument()->addObject("PartDesign::CoordinateSystem", CSName.c_str()));
prm->CoordinateSystem.setValue(cs);
}
ViewProviderDatumCoordinateSystem* vp = static_cast<ViewProviderDatumCoordinateSystem*>(
Gui::Application::Instance->activeDocument()->getViewProvider(cs));
assert(vp);
cs_visibility = vp->isVisible();
vp->Visibility.setValue(true);
parameter = new TaskDatumParameters(vp);
Content.push_back(parameter);
}
TaskPrimitiveParameters::~TaskPrimitiveParameters()
{
ViewProviderDatumCoordinateSystem* vp = static_cast<ViewProviderDatumCoordinateSystem*>(
Gui::Application::Instance->activeDocument()->getViewProvider(cs));
vp->setVisible(cs_visibility);
}
bool TaskPrimitiveParameters::accept()
{
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()");
return true;
}
bool TaskPrimitiveParameters::reject() {
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()");
return true;
}
QDialogButtonBox::StandardButtons TaskPrimitiveParameters::getStandardButtons(void) const {
return Gui::TaskView::TaskDialog::getStandardButtons();
}
#include "moc_TaskPrimitiveParameters.cpp"

View File

@@ -0,0 +1,73 @@
/***************************************************************************
* Copyright (c) 2015 Stefan Tröger <stefeantroeger@gmx.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef GUI_TASKVIEW_TaskPrimitiveParameters_H
#define GUI_TASKVIEW_TaskPrimitiveParameters_H
#include <Gui/TaskView/TaskView.h>
#include <Gui/Selection.h>
#include <Gui/TaskView/TaskDialog.h>
#include "TaskSketchBasedParameters.h"
#include "ViewProviderPrimitive.h"
#include "TaskDatumParameters.h"
#include <Mod/PartDesign/App/DatumCS.h>
#include <Mod/Part/Gui/DlgPrimitives.h>
class Ui_TaskPrimitiveParameters;
namespace App {
class Property;
}
namespace Gui {
class ViewProvider;
}
namespace PartDesignGui {
class TaskPrimitiveParameters : public Gui::TaskView::TaskDialog
{
Q_OBJECT
public:
TaskPrimitiveParameters(ViewProviderPrimitive *PrimitiveView);
~TaskPrimitiveParameters();
protected:
virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const;
virtual bool accept();
virtual bool reject();
private:
PartGui::DlgPrimitives* widget;
TaskDatumParameters* parameter;
PartDesign::CoordinateSystem* cs;
bool cs_visibility;
};
} //namespace PartDesignGui
#endif // GUI_TASKVIEW_TASKAPPERANCE_H

View File

@@ -0,0 +1,144 @@
/***************************************************************************
* Copyright (c) 2015 Stefan Tröger <stefantroeger@gmx.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoMaterial.h>
# include <Inventor/nodes/SoCoordinate3.h>
# include <Inventor/nodes/SoLineSet.h>
# include <TopoDS_Vertex.hxx>
# include <TopoDS.hxx>
# include <BRep_Tool.hxx>
# include <gp_Pnt.hxx>
# include <Precision.hxx>
# include <Geom_Plane.hxx>
# include <Geom_Line.hxx>
# include <GeomAPI_IntCS.hxx>
#endif
#include "ViewProviderDatumCS.h"
#include "TaskDatumParameters.h"
#include "Workbench.h"
#include <Mod/PartDesign/App/DatumCS.h>
#include <Mod/Part/Gui/SoBrepFaceSet.h>
#include <Mod/Part/Gui/SoBrepEdgeSet.h>
#include <Mod/Part/Gui/SoBrepPointSet.h>
#include <Gui/Control.h>
#include <Gui/Command.h>
#include <Gui/Application.h>
#include <Mod/PartDesign/App/Body.h>
#include <Mod/PartDesign/App/FeaturePrimitive.h>
using namespace PartDesignGui;
PROPERTY_SOURCE(PartDesignGui::ViewProviderDatumCoordinateSystem,PartDesignGui::ViewProviderDatum)
ViewProviderDatumCoordinateSystem::ViewProviderDatumCoordinateSystem()
{
sPixmap = "PartDesign_CoordinateSystem.svg";
SoMaterial* material = new SoMaterial();
material->diffuseColor.setValue(0.9f, 0.9f, 0.13f);
material->transparency.setValue(0.5f);
pShapeSep->addChild(material);
}
ViewProviderDatumCoordinateSystem::~ViewProviderDatumCoordinateSystem()
{
}
void ViewProviderDatumCoordinateSystem::updateData(const App::Property* prop)
{
if (strcmp(prop->getName(),"Placement") == 0) {
Base::Vector3d base(0,0,0);
Base::Vector3d dir(0,0,1);
Base::Vector3d x, y, z;
getPointForDirection(Base::Vector3d(1,0,0), x);
getPointForDirection(Base::Vector3d(0,1,0), y);
getPointForDirection(Base::Vector3d(0,0,1), z);
// Display the line
PartGui::SoBrepEdgeSet* lineSet;
SoCoordinate3* coord;
if (pShapeSep->getNumChildren() == 1) {
coord = new SoCoordinate3();
coord->point.setNum(4);
coord->point.set1Value(0, base.x, base.y, base.z);
coord->point.set1Value(1, x.x, x.y, x.z);
coord->point.set1Value(2, y.x, y.y, y.z);
coord->point.set1Value(3, z.x, z.y, z.z);
pShapeSep->addChild(coord);
lineSet = new PartGui::SoBrepEdgeSet();
lineSet->coordIndex.setNum(6);
lineSet->coordIndex.set1Value(0, 0);
lineSet->coordIndex.set1Value(1, 1);
lineSet->coordIndex.set1Value(2, 0);
lineSet->coordIndex.set1Value(3, 2);
lineSet->coordIndex.set1Value(4, 0);
lineSet->coordIndex.set1Value(5, 3);
pShapeSep->addChild(lineSet);
} else {
coord = static_cast<SoCoordinate3*>(pShapeSep->getChild(1));
coord->point.set1Value(0, base.x, base.y, base.z);
coord->point.set1Value(1, x.x, x.y, x.z);
coord->point.set1Value(2, y.x, y.y, y.z);
coord->point.set1Value(3, z.x, z.y, z.z);
}
}
ViewProviderDatum::updateData(prop);
}
void ViewProviderDatumCoordinateSystem::getPointForDirection(Base::Vector3d dir, Base::Vector3d& p) {
// Gets called whenever a property of the attached object changes
PartDesign::CoordinateSystem* pcDatum = static_cast<PartDesign::CoordinateSystem*>(this->getObject());
Base::Placement plm = pcDatum->Placement.getValue();
plm.invert();
Base::Vector3d base(0,0,0);
// Get limits of the line from bounding box of the body
PartDesign::Body* body = static_cast<PartDesign::Body*>(Part::BodyBase::findBodyOf(this->getObject()));
if (body == NULL)
return;
Base::BoundBox3d bbox = body->getBoundBox();
bbox = bbox.Transformed(plm.toMatrix());
bbox.Enlarge(0.1 * bbox.CalcDiagonalLength());
if (bbox.IsInBox(base)) {
bbox.IntersectionPoint(base, dir, p, Precision::Confusion());
} else {
Base::Vector3d p2;
if(!bbox.IntersectWithLine(base, dir, p, p2)) {
p = dir*bbox.CalcDiagonalLength();
}
}
}

View File

@@ -0,0 +1,50 @@
/***************************************************************************
* Copyright (c) 2015 Stefan Tröger <stefantroeger@gmx.net> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef PARTGUI_ViewProviderDatumCoordinateSystem_H
#define PARTGUI_ViewProviderDatumCoordinateSystem_H
#include "Gui/ViewProviderGeometryObject.h"
#include "ViewProviderDatum.h"
namespace PartDesignGui {
class PartDesignGuiExport ViewProviderDatumCoordinateSystem : public PartDesignGui::ViewProviderDatum
{
PROPERTY_HEADER(PartDesignGui::ViewProviderDatumCoordinateSystem);
public:
/// Constructor
ViewProviderDatumCoordinateSystem();
virtual ~ViewProviderDatumCoordinateSystem();
virtual void updateData(const App::Property*);
private:
void getPointForDirection(Base::Vector3d Dir, Base::Vector3d& p);
};
} // namespace PartDesignGui
#endif // PARTGUI_ViewProviderDatumCoordinateSystem_H

View File

@@ -55,6 +55,8 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderDatumLine,PartDesignGui::ViewProvider
ViewProviderDatumLine::ViewProviderDatumLine()
{
sPixmap = "PartDesign_Line.svg";
SoMaterial* material = new SoMaterial();
material->diffuseColor.setValue(0.9f, 0.9f, 0.13f);
material->transparency.setValue(0.2f);

View File

@@ -56,6 +56,8 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderDatumPlane,PartDesignGui::ViewProvide
ViewProviderDatumPlane::ViewProviderDatumPlane()
{
sPixmap = "PartDesign_Plane.svg";
SoMaterial* material = new SoMaterial();
material->diffuseColor.setValue(0.9f, 0.9f, 0.13f);
material->transparency.setValue(0.5f);

View File

@@ -41,6 +41,8 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderDatumPoint,PartDesignGui::ViewProvide
ViewProviderDatumPoint::ViewProviderDatumPoint()
{
sPixmap = "PartDesign_Point.svg";
SoMFVec3f v;
v.setNum(1);
v.set1Value(0, 0,0,0);

View File

@@ -34,6 +34,7 @@
#include <Gui/Control.h>
#include <Gui/Command.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Base/Console.h>
@@ -43,7 +44,7 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderPrimitive,PartDesignGui::ViewProvider
ViewProviderPrimitive::ViewProviderPrimitive()
{
sPixmap = "Part_Box.svg";
}
ViewProviderPrimitive::~ViewProviderPrimitive()
@@ -94,10 +95,35 @@ bool ViewProviderPrimitive::setEdit(int ModNum)
std::vector< App::DocumentObject* > ViewProviderPrimitive::claimChildren(void) const {
// Base::Console().Message("claim children\n");
std::vector< App::DocumentObject* > vec;
vec.push_back(static_cast<PartDesign::FeaturePrimitive*>(getObject())->CoordinateSystem.getValue());
return vec;
}
QIcon ViewProviderPrimitive::getIcon(void) const {
QString str = QString::fromAscii("PartDesign_");
auto* prim = static_cast<PartDesign::FeaturePrimitive*>(getObject());
if(prim->getAddSubType() == PartDesign::FeatureAddSub::Additive)
str += QString::fromAscii("Additive_");
else
str += QString::fromAscii("Subtractive_");
switch(prim->getPrimitiveType()) {
case PartDesign::FeaturePrimitive::Box:
str += QString::fromAscii("Box");
break;
case PartDesign::FeaturePrimitive::Cylinder:
str += QString::fromAscii("Cylinder");
break;
case PartDesign::FeaturePrimitive::Sphere:
str += QString::fromAscii("Sphere");
break;
}
str += QString::fromAscii(".svg");
return Gui::BitmapFactory().pixmap(str.toStdString().c_str());
}

View File

@@ -42,7 +42,8 @@ public:
virtual std::vector< App::DocumentObject* > claimChildren(void) const;
protected:
virtual bool setEdit(int ModNum);
virtual QIcon getIcon(void) const;
virtual bool setEdit(int ModNum);
};
} // namespace PartDesignGui

View File

@@ -742,12 +742,13 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
<< "PartDesign_Line"
<< "PartDesign_Point"
<< "Separator"
<< "PartDesign_CompPrimitiveAdditive"
<< "PartDesign_CompPrimitiveSubtractive"
<< "Separator"
<< "PartDesign_Pad"
<< "PartDesign_Pocket"
<< "PartDesign_Revolution"
<< "PartDesign_Groove"
<< "PartDesign_CompPrimitiveAdditive"
<< "PartDesign_CompPrimitiveSubtractive"
<< "PartDesign_Fillet"
<< "PartDesign_Chamfer"
<< "PartDesign_Draft"