Merge remote-tracking branch 'upstream/main' into UI-TaskPanels-cleanup-1

This commit is contained in:
marcuspollio
2024-05-21 10:36:10 +12:00
228 changed files with 12191 additions and 26009 deletions

View File

@@ -40,7 +40,17 @@ using namespace PartDesign;
PROPERTY_SOURCE(PartDesign::Body, Part::BodyBase)
Body::Body() {
_GroupTouched.setStatus(App::Property::Output,true);
ADD_PROPERTY_TYPE(AllowCompound, (false), "Experimental", App::Prop_None, "Allow multiple solids in Body (experimental)");
_GroupTouched.setStatus(App::Property::Output, true);
static Base::Reference<ParameterGrp> hGrp = App::GetApplication()
.GetUserParameter()
.GetGroup("BaseApp/Preferences/Mod/PartDesign");
auto allowCompoundDefaultValue = hGrp->GetBool("AllowCompoundDefault", false);
ADD_PROPERTY(AllowCompound, (allowCompoundDefaultValue));
}
/*
@@ -428,7 +438,7 @@ void Body::onSettingDocument() {
Part::BodyBase::onSettingDocument();
}
void Body::onChanged (const App::Property* prop) {
void Body::onChanged(const App::Property* prop) {
// we neither load a project nor perform undo/redo
if (!this->isRestoring()
&& this->getDocument()
@@ -438,7 +448,6 @@ void Body::onChanged (const App::Property* prop) {
auto first = Group.getValues().empty() ? nullptr : Group.getValues().front();
if (BaseFeature.getValue()) {
//setup the FeatureBase if needed
if (!first || !first->isDerivedFrom(FeatureBase::getClassTypeId())) {
bf = static_cast<FeatureBase*>(getDocument()->addObject("PartDesign::FeatureBase", "BaseFeature"));
@@ -452,17 +461,26 @@ void Body::onChanged (const App::Property* prop) {
}
}
if (bf && (bf->BaseFeature.getValue() != BaseFeature.getValue()))
if (bf && (bf->BaseFeature.getValue() != BaseFeature.getValue())) {
bf->BaseFeature.setValue(BaseFeature.getValue());
}
}
else if( prop == &Group ) {
else if (prop == &Group) {
//if the FeatureBase was deleted we set the BaseFeature link to nullptr
if (BaseFeature.getValue() &&
(Group.getValues().empty() || !Group.getValues().front()->isDerivedFrom(FeatureBase::getClassTypeId()))) {
BaseFeature.setValue(nullptr);
}
}
else if (prop == &AllowCompound) {
// As disallowing compounds can break the model we need to recompute the whole tree.
// This will inform user about first place where there is more than one solid.
if (!AllowCompound.getValue()) {
for (auto feature : getFullModel()) {
feature->enforceRecompute();
}
}
}
}
Part::BodyBase::onChanged(prop);

View File

@@ -41,6 +41,7 @@ class PartDesignExport Body : public Part::BodyBase
PROPERTY_HEADER_WITH_OVERRIDE(PartDesign::Body);
public:
App::PropertyBool AllowCompound;
/// True if this body feature is active or was active when the document was last closed
//App::PropertyBool IsActive;

View File

@@ -61,7 +61,9 @@ Feature::Feature()
BaseFeature.setStatus(App::Property::Hidden, true);
App::SuppressibleExtension::initExtension(this);
Suppressed.setStatus(App::Property::Status::Hidden, true); //Todo: remove when TNP fixed
#ifndef FC_USE_TNP_FIX
Suppressed.setStatus(App::Property::Status::Hidden, true);
#endif
}
App::DocumentObjectExecReturn* Feature::recompute()
@@ -91,10 +93,17 @@ short Feature::mustExecute() const
// TODO: Toponaming April 2024 Deprecated in favor of TopoShape method. Remove when possible.
TopoDS_Shape Feature::getSolid(const TopoDS_Shape& shape)
{
if (shape.IsNull())
if (shape.IsNull()) {
Standard_Failure::Raise("Shape is null");
}
// If single solid rule is not enforced we simply return the shape as is
if (singleSolidRuleMode() != Feature::SingleSolidRuleMode::Enforced) {
return shape;
}
TopExp_Explorer xp;
xp.Init(shape,TopAbs_SOLID);
xp.Init(shape, TopAbs_SOLID);
if (xp.More()) {
return xp.Current();
}
@@ -107,12 +116,19 @@ TopoShape Feature::getSolid(const TopoShape& shape)
if (shape.isNull()) {
throw Part::NullShapeException("Null shape");
}
// If single solid rule is not enforced we simply return the shape as is
if (singleSolidRuleMode() != Feature::SingleSolidRuleMode::Enforced) {
return shape;
}
int count = shape.countSubShapes(TopAbs_SOLID);
if(count) {
auto res = shape.getSubTopoShape(TopAbs_SOLID,1);
if (count) {
auto res = shape.getSubTopoShape(TopAbs_SOLID, 1);
res.fixSolidOrientation();
return res;
}
return shape;
}
@@ -151,7 +167,31 @@ int Feature::countSolids(const TopoDS_Shape& shape, TopAbs_ShapeEnum type)
return result;
}
bool Feature::isSingleSolidRuleSatisfied(const TopoDS_Shape& shape, TopAbs_ShapeEnum type)
{
if (singleSolidRuleMode() == Feature::SingleSolidRuleMode::Disabled) {
return true;
}
int solidCount = countSolids(shape, type);
return solidCount <= 1;
}
Feature::SingleSolidRuleMode Feature::singleSolidRuleMode()
{
auto body = getFeatureBody();
// When the feature is not part of an body (which should not happen) let's stay with the default
if (!body) {
return SingleSolidRuleMode::Enforced;
}
auto areCompoundSolidsAllowed = body->AllowCompound.getValue();
return areCompoundSolidsAllowed ? SingleSolidRuleMode::Disabled : SingleSolidRuleMode::Enforced;
}
const gp_Pnt Feature::getPointFromFace(const TopoDS_Face& f)
{

View File

@@ -52,6 +52,8 @@ class PartDesignExport Feature : public Part::Feature, public App::SuppressibleE
public:
Feature();
enum SingleSolidRuleMode { Disabled = 0, Enforced = 1 };
/// Base feature which this feature will be fused into or cut out of
App::PropertyLink BaseFeature;
App::PropertyLinkHidden _Body;
@@ -96,10 +98,16 @@ protected:
* Get a solid of the given shape. If no solid is found an exception is raised.
*/
// TODO: Toponaming April 2024 Deprecated in favor of TopoShape method. Remove when possible.
static TopoDS_Shape getSolid(const TopoDS_Shape&);
TopoDS_Shape getSolid(const TopoDS_Shape&);
TopoShape getSolid(const TopoShape&);
static int countSolids(const TopoDS_Shape&, TopAbs_ShapeEnum type = TopAbs_SOLID);
/**
* Checks if the single-solid body rule is fulfilled.
*/
bool isSingleSolidRuleSatisfied(const TopoDS_Shape&, TopAbs_ShapeEnum type = TopAbs_SOLID);
SingleSolidRuleMode singleSolidRuleMode();
/// Grab any point from the given face
static const gp_Pnt getPointFromFace(const TopoDS_Face& f);
/// Make a shape from a base plane (convenience method)

View File

@@ -153,8 +153,7 @@ App::DocumentObjectExecReturn *Boolean::execute()
result = refineShapeIfActive(result);
int solidCount = countSolids(result);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(result)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}

View File

@@ -270,10 +270,11 @@ App::DocumentObjectExecReturn *Chamfer::execute()
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is invalid"));
}
}
int solidCount = countSolids(shape);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(shape)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}
shape = refineShapeIfActive(shape);
this->Shape.setValue(getSolid(shape));
return App::DocumentObject::StdReturn;

View File

@@ -318,8 +318,7 @@ App::DocumentObjectExecReturn *Draft::execute()
if (shape.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is null"));
int solidCount = countSolids(shape);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(shape)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}

View File

@@ -193,8 +193,7 @@ App::DocumentObjectExecReturn *Fillet::execute()
}
}
int solidCount = countSolids(shape);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(shape)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}

View File

@@ -188,8 +188,7 @@ App::DocumentObjectExecReturn *Groove::execute()
TopoDS_Shape subshape = refineShapeIfActive(mkCut.Shape());
this->AddSubShape.setValue(subshape);
int resultCount = countSolids(result);
if (resultCount > 1) {
if (!isSingleSolidRuleSatisfied(result)) {
return new App::DocumentObjectExecReturn("Groove: Result has multiple solids. This is not supported at this time.");
}
@@ -221,8 +220,7 @@ App::DocumentObjectExecReturn *Groove::execute()
solRes = refineShapeIfActive(solRes);
this->Shape.setValue(getSolid(solRes));
int solidCount = countSolids(solRes);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(solRes)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}
}

View File

@@ -251,10 +251,10 @@ App::DocumentObjectExecReturn* Helix::execute()
if (getAddSubType() == FeatureAddSub::Subtractive)
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: There is nothing to subtract"));
int solidCount = countSolids(result);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(result)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result has multiple solids"));
}
Shape.setValue(getSolid(result));
return App::DocumentObject::StdReturn;
}
@@ -271,8 +271,8 @@ App::DocumentObjectExecReturn* Helix::execute()
if (boolOp.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result is not a solid"));
int solidCount = countSolids(boolOp);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(boolOp)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result has multiple solids"));
}
@@ -301,8 +301,7 @@ App::DocumentObjectExecReturn* Helix::execute()
if (boolOp.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result is not a solid"));
int solidCount = countSolids(boolOp);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(boolOp)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Error: Result has multiple solids"));
}

View File

@@ -1900,10 +1900,7 @@ App::DocumentObjectExecReturn* Hole::execute()
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid"));
base = refineShapeIfActive(base);
int solidCount = countSolids(base.getShape());
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(base.getShape())) {
return new App::DocumentObjectExecReturn(
QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}

View File

@@ -288,13 +288,15 @@ App::DocumentObjectExecReturn *Loft::execute()
BRepAlgoAPI_Fuse mkFuse(base, result);
if (!mkFuse.IsDone())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Loft: Adding the loft failed"));
// we have to get the solids (fuse sometimes creates compounds)
TopoDS_Shape boolOp = this->getSolid(mkFuse.Shape());
// lets check if the result is a solid
if (boolOp.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid"));
int solidCount = countSolids(boolOp);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(boolOp)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}
@@ -306,13 +308,15 @@ App::DocumentObjectExecReturn *Loft::execute()
BRepAlgoAPI_Cut mkCut(base, result);
if (!mkCut.IsDone())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Loft: Subtracting the loft failed"));
// we have to get the solids (fuse sometimes creates compounds)
TopoDS_Shape boolOp = this->getSolid(mkCut.Shape());
// lets check if the result is a solid
if (boolOp.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid"));
int solidCount = countSolids(boolOp);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(boolOp)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}

View File

@@ -235,8 +235,7 @@ App::DocumentObjectExecReturn *Pad::execute()
if (solRes.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid"));
int solidCount = countSolids(result);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(result)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}
@@ -244,8 +243,7 @@ App::DocumentObjectExecReturn *Pad::execute()
this->Shape.setValue(getSolid(solRes));
}
else {
int solidCount = countSolids(prism);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(prism)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}

View File

@@ -398,8 +398,7 @@ App::DocumentObjectExecReturn *Pipe::execute()
if (boolOp.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid"));
int solidCount = countSolids(boolOp);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(boolOp)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception",
"Result has multiple solids: that is not currently supported."));
}
@@ -418,8 +417,7 @@ App::DocumentObjectExecReturn *Pipe::execute()
if (boolOp.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid"));
int solidCount = countSolids(boolOp);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(boolOp)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception",
"Result has multiple solids: that is not currently supported."));
}

View File

@@ -194,8 +194,7 @@ App::DocumentObjectExecReturn *Pocket::execute()
TopoDS_Shape result = refineShapeIfActive(mkCut.Shape());
this->AddSubShape.setValue(result);
int prismCount = countSolids(prism);
if (prismCount > 1) {
if (!isSingleSolidRuleSatisfied(result)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}
@@ -229,8 +228,7 @@ App::DocumentObjectExecReturn *Pocket::execute()
if (solRes.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid"));
int solidCount = countSolids(result);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(result)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}

View File

@@ -145,12 +145,12 @@ App::DocumentObjectExecReturn* FeaturePrimitive::execute(const TopoDS_Shape& pri
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Adding the primitive failed"));
// we have to get the solids (fuse sometimes creates compounds)
boolOp = this->getSolid(mkFuse.Shape());
// lets check if the result is a solid
if (boolOp.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid"));
int solidCount = countSolids(boolOp);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(boolOp)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}
}
@@ -165,8 +165,7 @@ App::DocumentObjectExecReturn* FeaturePrimitive::execute(const TopoDS_Shape& pri
if (boolOp.IsNull())
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Resulting shape is not a solid"));
int solidCount = countSolids(boolOp);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(boolOp)) {
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Result has multiple solids: that is not currently supported."));
}
}

View File

@@ -327,8 +327,7 @@ App::DocumentObjectExecReturn *Transformed::execute()
support = refineShapeIfActive(support);
int solidCount = countSolids(support);
if (solidCount > 1) {
if (!isSingleSolidRuleSatisfied(support)) {
Base::Console().Warning("Transformed: Result has multiple solids. Only keeping the first.\n");
}

View File

@@ -2394,6 +2394,65 @@ bool CmdPartDesignBoolean::isActive()
return false;
}
// Command group for datums =============================================
class CmdPartDesignCompDatums: public Gui::GroupCommand
{
public:
CmdPartDesignCompDatums()
: GroupCommand("PartDesign_CompDatums")
{
sAppModule = "PartDesign";
sGroup = "PartDesign";
sMenuText = QT_TR_NOOP("Create datum");
sToolTipText = QT_TR_NOOP("Create a datum object or local coordinate system");
sWhatsThis = "PartDesign_CompDatums";
sStatusTip = sToolTipText;
eType = ForEdit;
setCheckable(false);
addCommand("PartDesign_Plane");
addCommand("PartDesign_Line");
addCommand("PartDesign_Point");
addCommand("PartDesign_CoordinateSystem");
}
const char* className() const override
{
return "CmdPartDesignCompDatums";
}
};
// Command group for datums =============================================
class CmdPartDesignCompSketches: public Gui::GroupCommand
{
public:
CmdPartDesignCompSketches()
: GroupCommand("PartDesign_CompSketches")
{
sAppModule = "PartDesign";
sGroup = "PartDesign";
sMenuText = QT_TR_NOOP("Create datum");
sToolTipText = QT_TR_NOOP("Create a datum object or local coordinate system");
sWhatsThis = "PartDesign_CompDatums";
sStatusTip = sToolTipText;
eType = ForEdit;
setCheckable(false);
setRememberLast(false);
addCommand("PartDesign_NewSketch");
addCommand("Sketcher_MapSketch");
addCommand("Sketcher_EditSketch");
}
const char* className() const override
{
return "CmdPartDesignCompSketches";
}
};
//===========================================================================
// Initialization
@@ -2437,4 +2496,6 @@ void CreatePartDesignCommands()
rcCmdMgr.addCommand(new CmdPartDesignMultiTransform());
rcCmdMgr.addCommand(new CmdPartDesignBoolean());
rcCmdMgr.addCommand(new CmdPartDesignCompDatums());
rcCmdMgr.addCommand(new CmdPartDesignCompSketches());
}

View File

@@ -14,8 +14,6 @@
<file>icons/PartDesign_BaseFeature.svg</file>
<file>icons/PartDesign_Body.svg</file>
<file alias="icons/PartDesign_Body_Create_New.svg">icons/PartDesign_Body.svg</file>
<file>icons/PartDesign_Body_old.svg</file>
<file>icons/PartDesign_Body_Tree.svg</file>
<file>icons/PartDesign_Boolean.svg</file>
<file>icons/PartDesign_Chamfer.svg</file>
<file>icons/PartDesign_Clone.svg</file>
@@ -26,7 +24,6 @@
<file>icons/PartDesign_Groove.svg</file>
<file>icons/PartDesign_Hole.svg</file>
<file>icons/PartDesign_InternalExternalGear.svg</file>
<file>icons/PartDesign_InvoluteGear.svg</file>
<file>icons/PartDesign_Line.svg</file>
<file>icons/PartDesign_LinearPattern.svg</file>
<file>icons/PartDesign_Migrate.svg</file>
@@ -59,7 +56,5 @@
<file>icons/PartDesign_SubtractiveWedge.svg</file>
<file>icons/PartDesign_Thickness.svg</file>
<file>icons/PartDesignWorkbench.svg</file>
<file>icons/Tree_PartDesign_Pad.svg</file>
<file>icons/Tree_PartDesign_Revolution.svg</file>
</qresource>
</RCC>

View File

@@ -1,322 +0,0 @@
<?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="64"
height="64"
id="svg3559"
version="1.1"
inkscape:version="0.91+devel+osxmenu r12922"
sodipodi:docname="Part_v08a.svg"
viewBox="0 0 64 64">
<defs
id="defs3561">
<linearGradient
inkscape:collect="always"
id="linearGradient4393">
<stop
style="stop-color:#204a87;stop-opacity:1"
offset="0"
id="stop4395" />
<stop
style="stop-color:#3465a4;stop-opacity:1"
offset="1"
id="stop4397" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4383">
<stop
style="stop-color:#3465a4;stop-opacity:1"
offset="0"
id="stop4385" />
<stop
style="stop-color:#729fcf;stop-opacity:1"
offset="1"
id="stop4387" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4383"
id="linearGradient4389"
x1="20.243532"
y1="37.588112"
x2="17.243532"
y2="27.588112"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-1.243533,-2.588112)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4393"
id="linearGradient4399"
x1="48.714352"
y1="45.585785"
x2="44.714352"
y2="34.585785"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(1.2856487,1.4142136)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4383-3"
id="linearGradient4389-0"
x1="27.243532"
y1="54.588112"
x2="21.243532"
y2="30.588112"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-1.243533,-2.588112)" />
<linearGradient
inkscape:collect="always"
id="linearGradient4383-3">
<stop
style="stop-color:#3465a4;stop-opacity:1"
offset="0"
id="stop4385-1" />
<stop
style="stop-color:#729fcf;stop-opacity:1"
offset="1"
id="stop4387-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4393-9"
id="linearGradient4399-7"
x1="48.714352"
y1="45.585785"
x2="40.714352"
y2="24.585787"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(1.2856487,1.4142136)" />
<linearGradient
inkscape:collect="always"
id="linearGradient4393-9">
<stop
style="stop-color:#204a87;stop-opacity:1"
offset="0"
id="stop4395-8" />
<stop
style="stop-color:#3465a4;stop-opacity:1"
offset="1"
id="stop4397-1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4393"
id="linearGradient69042"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-12.714351,-17.585786)"
x1="48.714352"
y1="45.585785"
x2="44.714352"
y2="34.585785" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4383"
id="linearGradient69056"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-1.243533,-2.588112)"
x1="27.243532"
y1="54.588112"
x2="17.243532"
y2="27.588112" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="10.941048"
inkscape:cx="31.005637"
inkscape:cy="29.259294"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1680"
inkscape:window-height="939"
inkscape:window-x="0"
inkscape:window-y="23"
inkscape:window-maximized="0"
inkscape:snap-global="true">
<inkscape:grid
type="xygrid"
id="grid3007"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata3564">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title>Path-Stock</dc:title>
<dc:date>2015-07-04</dc:date>
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier>FreeCAD/src/Mod/Path/Gui/Resources/icons/Path-Stock.svg</dc:identifier>
<dc:rights>
<cc:Agent>
<dc:title>FreeCAD LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<cc:license>https://www.gnu.org/copyleft/lesser.html</cc:license>
<dc:contributor>
<cc:Agent>
<dc:title>[agryson] Alexander Gryson</dc:title>
</cc:Agent>
</dc:contributor>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="fill:url(#linearGradient69056);fill-opacity:1;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d="m 9,49 0,-28 14,5 0,14 14,5 0,14 z"
id="path4381"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:url(#linearGradient4399);fill-opacity:1;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d="M 37,59 37,45 55,28 55,41 Z"
id="path4391"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
d="M 9,21 29,5 42,10 23,26 Z"
id="path4403"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none"
d="M 11.008035,47.60627 11,24 l 10,4 0,13 14,5 0.0081,10.184812 z"
id="path4381-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none"
d="M 39.005041,54.16825 39,46 53,33 l 0.0021,7.176847 z"
id="path4391-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path69038"
d="M 23,40 42,23 55,28 37,45 Z"
style="fill:#729fcf;fill-opacity:1;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path69040"
d="M 23,40 23,26 42,10 42,23 Z"
style="fill:url(#linearGradient69042);fill-opacity:1;fill-rule:nonzero;stroke:#0b1521;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none" />
<path
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path69044"
d="m 25,36 0,-9 15,-13 0,8 z"
style="fill:none;stroke:#3465a4;stroke-width:2;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="temporal"
style="display:none;opacity:0.58800001"
sodipodi:insensitive="true">
<path
inkscape:connector-curvature="0"
id="path68967"
d="M 9,35 9,49"
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
sodipodi:nodetypes="cc" />
<path
inkscape:connector-curvature="0"
id="path68971"
d="M 9,35 37,45"
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="cc"
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 55,28 0,13"
id="path68973"
inkscape:connector-curvature="0" />
<path
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 37,45 55,28"
id="path68977"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path68983"
d="M 23,40 23,26"
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path68985"
d="m 29,5 13,5"
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 23,26 42,10"
id="path68989"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 19,13 29,5"
id="path68993"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 55,15 -9,8"
id="path68997"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path69030"
d="M 42,23 42,10"
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 42,23 14,5"
id="path69034"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path69036"
d="M 23,40 42,23"
style="fill:#ef2929;fill-rule:evenodd;stroke:#ef2929;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 45 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -66,7 +66,7 @@ ViewProviderBody::ViewProviderBody()
ADD_PROPERTY(DisplayModeBody,((long)0));
DisplayModeBody.setEnums(BodyModeEnum);
sPixmap = "PartDesign_Body_Tree.svg";
sPixmap = "PartDesign_Body.svg";
Gui::ViewProviderOriginGroupExtension::initExtension(this);
}

View File

@@ -36,7 +36,7 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderPad,PartDesignGui::ViewProviderSketch
ViewProviderPad::ViewProviderPad()
{
sPixmap = "Tree_PartDesign_Pad.svg";
sPixmap = "PartDesign_Pad.svg";
}
ViewProviderPad::~ViewProviderPad() = default;

View File

@@ -36,7 +36,7 @@ PROPERTY_SOURCE(PartDesignGui::ViewProviderRevolution,PartDesignGui::ViewProvide
ViewProviderRevolution::ViewProviderRevolution()
{
sPixmap = "Tree_PartDesign_Revolution.svg";
sPixmap = "PartDesign_Revolution.svg";
}
ViewProviderRevolution::~ViewProviderRevolution() = default;

View File

@@ -53,9 +53,9 @@ namespace sp = std::placeholders;
qApp->translate("Workbench", "Shaft design wizard");
qApp->translate("Gui::TaskView::TaskWatcherCommands", "Face tools");
qApp->translate("Gui::TaskView::TaskWatcherCommands", "Edge tools");
qApp->translate("Gui::TaskView::TaskWatcherCommands", "Boolean tools");
qApp->translate("Gui::TaskView::TaskWatcherCommands", "Helper tools");
qApp->translate("Gui::TaskView::TaskWatcherCommands", "Modeling tools");
qApp->translate("Gui::TaskView::TaskWatcherCommands", "Start boolean");
qApp->translate("Gui::TaskView::TaskWatcherCommands", "Start part");
qApp->translate("Gui::TaskView::TaskWatcherCommands", "Sketch tools");
qApp->translate("Gui::TaskView::TaskWatcherCommands", "Create Geometry");
//
qApp->translate("Workbench", "Measure");
@@ -279,7 +279,7 @@ void Workbench::activated()
"SELECT Part::Feature SUBELEMENT Vertex COUNT 1..",
Vertex,
"Vertex tools",
"PartDesign_Body"
"Part_Box_Parametric"
));
const char* Edge[] = {
@@ -294,7 +294,7 @@ void Workbench::activated()
"SELECT Part::Feature SUBELEMENT Edge COUNT 1..",
Edge,
"Edge tools",
"PartDesign_Body"
"Part_Box_Parametric"
));
const char* Face[] = {
@@ -312,7 +312,7 @@ void Workbench::activated()
"SELECT Part::Feature SUBELEMENT Face COUNT 1",
Face,
"Face tools",
"PartDesign_Body"
"Part_Box_Parametric"
));
const char* Body[] = {
@@ -321,8 +321,8 @@ void Workbench::activated()
Watcher.push_back(new Gui::TaskView::TaskWatcherCommands(
"SELECT PartDesign::Body COUNT 1",
Body,
"Helper tools",
"PartDesign_Body"
"Start Body",
"Part_Box_Parametric"
));
const char* Body2[] = {
@@ -331,8 +331,8 @@ void Workbench::activated()
Watcher.push_back(new Gui::TaskView::TaskWatcherCommands(
"SELECT PartDesign::Body COUNT 1..",
Body2,
"Boolean tools",
"PartDesign_Body"
"Start Boolean",
"Part_Box_Parametric"
));
const char* Plane1[] = {
@@ -345,8 +345,8 @@ void Workbench::activated()
Watcher.push_back(new Gui::TaskView::TaskWatcherCommands(
"SELECT App::Plane COUNT 1",
Plane1,
"Helper tools",
"PartDesign_Body"
"Start Part",
"Part_Box_Parametric"
));
const char* Plane2[] = {
"PartDesign_NewSketch",
@@ -358,8 +358,8 @@ void Workbench::activated()
Watcher.push_back(new Gui::TaskView::TaskWatcherCommands(
"SELECT PartDesign::Plane COUNT 1",
Plane2,
"Helper tools",
"PartDesign_Body"
"Start Part",
"Part_Box_Parametric"
));
const char* Line[] = {
@@ -370,8 +370,8 @@ void Workbench::activated()
Watcher.push_back(new Gui::TaskView::TaskWatcherCommands(
"SELECT PartDesign::Line COUNT 1",
Line,
"Helper tools",
"PartDesign_Body"
"Start Part",
"Part_Box_Parametric"
));
const char* Point[] = {
@@ -383,8 +383,8 @@ void Workbench::activated()
Watcher.push_back(new Gui::TaskView::TaskWatcherCommands(
"SELECT PartDesign::Point COUNT 1",
Point,
"Helper tools",
"PartDesign_Body"
"Start Part",
"Part_Box_Parametric"
));
const char* NoSel[] = {
@@ -392,8 +392,8 @@ void Workbench::activated()
nullptr};
Watcher.push_back(new Gui::TaskView::TaskWatcherCommandsEmptySelection(
NoSel,
"Helper tools",
"PartDesign_Body"
"Start Part",
"Part_Box_Parametric"
));
const char* Faces[] = {
@@ -406,7 +406,7 @@ void Workbench::activated()
"SELECT Part::Feature SUBELEMENT Face COUNT 2..",
Faces,
"Face tools",
"PartDesign_Body"
"Part_Box_Parametric"
));
const char* Sketch[] = {
@@ -426,8 +426,8 @@ void Workbench::activated()
Watcher.push_back(new Gui::TaskView::TaskWatcherCommands(
"SELECT Sketcher::SketchObject COUNT 1",
Sketch,
"Modeling tools",
"PartDesign_Body"
"Sketch tools",
"Part_Box_Parametric"
));
const char* Transformed[] = {
@@ -551,7 +551,6 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "Separator"
<< datums
<< "PartDesign_CoordinateSystem"
<< "PartDesign_ShapeBinder"
<< "PartDesign_SubShapeBinder"
<< "PartDesign_Clone"
<< "Separator"
@@ -567,6 +566,8 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "Separator"
<< "PartDesign_Boolean"
<< "Separator"
<< "Part_CheckGeometry"
<< "Separator"
<< "PartDesign_Migrate"
<< "PartDesign_Sprocket";
@@ -604,18 +605,12 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
part->setCommand("Part Design Helper");
*part << "PartDesign_Body"
<< "PartDesign_NewSketch"
<< "Sketcher_EditSketch"
<< "Sketcher_MapSketch"
<< "PartDesign_CompSketches"
<< "Sketcher_ValidateSketch"
<< "Separator"
<< "PartDesign_Point"
<< "PartDesign_Line"
<< "PartDesign_Plane"
<< "PartDesign_CoordinateSystem"
<< "PartDesign_ShapeBinder"
<< "Part_CheckGeometry"
<< "PartDesign_SubShapeBinder"
<< "PartDesign_Clone";
<< "PartDesign_Clone"
<< "PartDesign_CompDatums";
part = new Gui::ToolBarItem(root);
part->setCommand("Part Design Modeling");
@@ -635,18 +630,24 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
<< "PartDesign_SubtractiveHelix"
<< "PartDesign_CompPrimitiveSubtractive"
<< "Separator"
<< "PartDesign_Mirrored"
<< "PartDesign_LinearPattern"
<< "PartDesign_PolarPattern"
// << "PartDesign_Scaled"
<< "PartDesign_MultiTransform"
<< "Separator"
<< "PartDesign_Fillet"
<< "PartDesign_Boolean";
part = new Gui::ToolBarItem(root);
part->setCommand("Part Design Dressup");
*part << "PartDesign_Fillet"
<< "PartDesign_Chamfer"
<< "PartDesign_Draft"
<< "PartDesign_Thickness"
<< "Separator"
<< "PartDesign_Boolean";
<< "PartDesign_Thickness";
part = new Gui::ToolBarItem(root);
part->setCommand("Part Design Patterns");
*part << "PartDesign_Mirrored"
<< "PartDesign_LinearPattern"
<< "PartDesign_PolarPattern"
// << "PartDesign_Scaled"
<< "PartDesign_MultiTransform";
return root;
}