Surface: Fix Blend Curve icon name

and remove unused BlendSurface code
This commit is contained in:
tomate44
2023-05-29 10:53:01 +02:00
parent 4a90f6e386
commit 6d1e88db07
5 changed files with 4 additions and 259 deletions

View File

@@ -32,7 +32,7 @@ namespace SurfaceGui
QIcon ViewProviderBlendCurve::getIcon() const
{
return Gui::BitmapFactory().pixmap("BlendCurve");
return Gui::BitmapFactory().pixmap("Surface_BlendCurve");
}
}//namespace SurfaceGui

View File

@@ -209,38 +209,7 @@ bool CmdSurfaceCurveOnMesh::isActive()
}
//===========================================================================
// CmdBlendSurface THIS IS THE BLEND SURFACE COMMAND
//===========================================================================
DEF_STD_CMD_A(CmdBlendSurface)
CmdBlendSurface::CmdBlendSurface()
: Command("Surface_BlendSurface")
{
sAppModule = "Surface";
sGroup = QT_TR_NOOP("Surface");
sMenuText = QT_TR_NOOP("Blend Surface");
sToolTipText = QT_TR_NOOP("This is the blend Surface feature");
sStatusTip = sToolTipText;
sWhatsThis = "BlendSurface";
sPixmap = "BlendSurface";
}
void CmdBlendSurface::activated(int)
{
}
bool CmdBlendSurface::isActive()
{
return true;
}
//===========================================================================
// CmdBlendCurve THIS IS THE BLEND CURVE COMMAND
// CmdBlendCurve : Blend Curve Command
//===========================================================================
DEF_STD_CMD_A(CmdBlendCurve)
@@ -253,43 +222,16 @@ CmdBlendCurve::CmdBlendCurve()
sToolTipText = QT_TR_NOOP("Join two edges with high continuity");
sStatusTip = sToolTipText;
sWhatsThis = "BlendCurve";
sPixmap = "BlendCurve";
sPixmap = "Surface_BlendCurve";
}
void CmdBlendCurve::activated(int)
{
// To do add pickpoints to parameters
std::string docName = App::GetApplication().getActiveDocument()->getName();
std::string objName[2];
std::string edge[2];
std::string featName = getUniqueObjectName("BlendCurve");
std::vector<Gui::SelectionObject> sel = getSelection().getSelectionEx(0, Part::Feature::getClassTypeId());
//std::vector<Base::Vector3d> pickedPoints = sel[0].getPickedPoints();
//App::DocumentObject *obj1 = sel[0].getObject();
//App::DocumentObject *obj2 = sel[1].getObject();
//std::vector<std::string> edge1SubName = sel[0].getSubNames();
//std::vector<std::string> edge2SubName = sel[1].getSubNames();
//TopoDS_Shape edge1 = static_cast<Part::Feature *>(obj1)
// ->Shape.getShape()
// .getSubShape(edge1SubName[0].c_str());
//if (edge1.IsNull() || edge1.ShapeType() != TopAbs_EDGE)
// return;
//TopoDS_Shape edge2 = static_cast<Part::Feature *>(obj2)
// ->Shape.getShape()
// .getSubShape(edge2SubName[0].c_str());
//if (edge2.IsNull() || edge2.ShapeType() != TopAbs_EDGE)
// return;
//const TopoDS_Edge &e1 = TopoDS::Edge(edge1);
//BRepAdaptor_Curve adapt1(e1);
//gp_Pnt pnt1(pickedPoints[0].x, pickedPoints[0].y, pickedPoints[0].z);
//GeomAdaptor_Curve geomCurve = adapt1.Curve();
//GeomAPI_ProjectPointOnCurve geomAPI(pnt1, geomCurve.Curve());
//double par = geomAPI.LowerDistanceParameter();
//edge2.Curve.closestParameter(vec, par)
objName[0] = sel[0].getFeatName();
edge[0] = sel[0].getSubNames()[0];
@@ -316,10 +258,6 @@ bool CmdBlendCurve::isActive()
return edgeFilter.match();
}
DEF_STD_CMD_A(CmdSurfaceExtendFace)
CmdSurfaceExtendFace::CmdSurfaceExtendFace()
@@ -403,5 +341,4 @@ void CreateSurfaceCommands()
rcCmdMgr.addCommand(new CmdSurfaceExtendFace());
rcCmdMgr.addCommand(new CmdSurfaceCurveOnMesh());
rcCmdMgr.addCommand(new CmdBlendCurve());
rcCmdMgr.addCommand(new CmdBlendSurface());
}

View File

@@ -4,7 +4,7 @@
<file>icons/Surface_BSplineSurface.svg</file>
<file>icons/Surface_CurveOnMesh.svg</file>
<file>icons/Surface_Cut.svg</file>
<file>icons/BlendCurve.svg</file>
<file>icons/Surface_BlendCurve.svg</file>
<file>icons/Surface_ExtendFace.svg</file>
<file>icons/Surface_Filling.svg</file>
<file>icons/Surface_GeomFillSurface.svg</file>
@@ -12,7 +12,6 @@
<file>icons/Surface_Sewing.svg</file>
<file>icons/Surface_Surface.svg</file>
<file>icons/Surface_Workbench.svg</file>
<file>icons/BlendSurface.svg</file>
</qresource>
</RCC>

View File

@@ -1,191 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
id="svg2985"
height="64px"
width="64px">
<title
id="title889">Surface_Sewing</title>
<defs
id="defs2987">
<linearGradient
id="linearGradient4387">
<stop
id="stop4389"
offset="0"
style="stop-color:#71b2f8;stop-opacity:1;" />
<stop
id="stop4391"
offset="1"
style="stop-color:#002795;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient6321">
<stop
id="stop6323"
offset="0"
style="stop-color:#71b2f8;stop-opacity:1;" />
<stop
id="stop6325"
offset="1"
style="stop-color:#002795;stop-opacity:1;" />
</linearGradient>
<radialGradient
gradientTransform="translate(-0.23443224,0.23443198)"
gradientUnits="userSpaceOnUse"
r="19.467436"
fy="28.869568"
fx="45.883327"
cy="28.869568"
cx="45.883327"
id="radialGradient3692"
xlink:href="#linearGradient3377" />
<linearGradient
id="linearGradient3377">
<stop
style="stop-color:#faff2b;stop-opacity:1;"
offset="0"
id="stop3379" />
<stop
style="stop-color:#ffaa00;stop-opacity:1;"
offset="1"
id="stop3381" />
</linearGradient>
<linearGradient
id="linearGradient3377-3">
<stop
style="stop-color:#faff2b;stop-opacity:1;"
offset="0"
id="stop3379-8" />
<stop
style="stop-color:#ffaa00;stop-opacity:1;"
offset="1"
id="stop3381-3" />
</linearGradient>
<radialGradient
r="19.467436"
fy="28.869568"
fx="45.883327"
cy="28.869568"
cx="45.883327"
gradientTransform="matrix(0.67067175,0,0,0.64145918,-63.380792,0.83845403)"
gradientUnits="userSpaceOnUse"
id="radialGradient6412"
xlink:href="#linearGradient3377-3" />
<linearGradient
id="linearGradient3036">
<stop
style="stop-color:#ef2929;stop-opacity:1"
offset="0"
id="stop3038" />
<stop
style="stop-color:#a40000;stop-opacity:1"
offset="1"
id="stop3040" />
</linearGradient>
<linearGradient
gradientTransform="matrix(0.96812402,0,0,0.96755864,-0.72057496,-2.6783592)"
xlink:href="#linearGradient1189"
id="linearGradient2095"
x1="47"
y1="9"
x2="7"
y2="28"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient1189">
<stop
style="stop-color:#204a87;stop-opacity:1"
offset="0"
id="stop1185" />
<stop
style="stop-color:#729fcf;stop-opacity:1"
offset="1"
id="stop1187" />
</linearGradient>
</defs>
<metadata
id="metadata2990">
<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>Surface_Sewing</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>[bitacovir]</dc:title>
</cc:Agent>
</dc:creator>
<dc:title>Part_Shape_from_Mesh</dc:title>
<dc:date>2020/10/03</dc:date>
<dc:relation>http://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 />
<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 />
</cc:Agent>
</dc:contributor>
<dc:subject>
<rdf:Bag>
<rdf:li>surface</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:description />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1">
<path
style="display:inline;fill:url(#linearGradient2095);fill-opacity:1;stroke:#0b1521;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 3.1519208,24.413282 17.899691,60.320494 c 14.52186,-34.832109 31.154371,7.93994 42.771854,-25.924611 L 38.972508,3.1269928 C 30.809307,30.407148 17.749067,-0.16084869 3.1519208,24.413282 Z"
id="path3820-1-9" />
<path
id="path3820-1-9-6"
d="M 5.3492197,24.626663 18.113409,55.643482 C 32.677175,26.678261 49.470489,63.641047 58.406281,34.501823 L 39.63819,7.4361573 C 30.967406,29.589343 16.774125,4.5857267 5.3492197,24.626663 Z"
style="display:inline;fill:none;fill-opacity:1;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#0b1521;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 10.982526,42.149889 C 22.049849,14.305576 38.645757,44.184548 50.089385,20.093327"
id="path1219-0" />
<path
id="path882"
d="m 27.670296,26.630997 c 10.9647,1.930433 15.10812,2.91774 20.11825,-7.524843"
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path859"
d="m 38.193663,21.887236 9.330416,13.952023"
style="fill:none;stroke:#0b1521;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 31.751036,32.387618 C 22.26124,30.47478 16.502839,32.473328 13.131071,43.29124"
id="path882-9" />
<path
style="fill:none;stroke:#0b1521;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 13.709416,25.210411 21.313357,40.45729"
id="path859-1" />
<path
style="fill:none;stroke:#0b1521;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 25.62034,22.195278 7.9739,14.506961"
id="path859-0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB