Added Surface module
I have added Nate's SurfaceTools module with the name changed to Surface in all files and filenames.
This commit is contained in:
@@ -244,6 +244,7 @@ OPTION(BUILD_TEST "Build the FreeCAD test module" ON)
|
||||
OPTION(BUILD_TECHDRAW "Build the FreeCAD Technical Drawing module" ON)
|
||||
OPTION(BUILD_TUX "Build the FreeCAD Tux module" ON)
|
||||
OPTION(BUILD_WEB "Build the FreeCAD web module" ON)
|
||||
OPTION(BUILD_SURFACE "Build the FreeCAD surface module" ON)
|
||||
OPTION(BUILD_VR "Build the FreeCAD Oculus Rift support (need Oculus SDK 4.x or higher)" OFF)
|
||||
|
||||
if(MSVC)
|
||||
|
||||
@@ -70,6 +70,10 @@ if(BUILD_WEB)
|
||||
add_subdirectory(Web)
|
||||
endif(BUILD_WEB)
|
||||
|
||||
if(BUILD_SURFACE)
|
||||
add_subdirectory(Surface)
|
||||
endif(BUILD_SURFACE)
|
||||
|
||||
if(BUILD_START)
|
||||
add_subdirectory(Start)
|
||||
endif(BUILD_START)
|
||||
|
||||
73
src/Mod/Surface/App/AppSurface.cpp
Normal file
73
src/Mod/Surface/App/AppSurface.cpp
Normal file
@@ -0,0 +1,73 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 <Python.h>
|
||||
#endif
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include "FeatureFilling.h"
|
||||
#include "FeatureSewing.h"
|
||||
#include "FeatureCut.h"
|
||||
#include "FeatureBezSurf.h"
|
||||
#include "FeatureBSplineSurf.h"
|
||||
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Base/Parameter.h>
|
||||
|
||||
|
||||
/* registration table */
|
||||
extern struct PyMethodDef Surface_methods[];
|
||||
|
||||
PyDoc_STRVAR(module_Surface_doc,
|
||||
"This module is the Surface module.");
|
||||
|
||||
|
||||
/* Python entry */
|
||||
extern "C" {
|
||||
void SurfaceExport initSurface() {
|
||||
|
||||
try {
|
||||
Base::Interpreter().runString("import Part");
|
||||
}
|
||||
catch(const Base::Exception& e) {
|
||||
PyErr_SetString(PyExc_ImportError, e.what());
|
||||
return;
|
||||
}
|
||||
|
||||
// ADD YOUR CODE HERE
|
||||
//
|
||||
//
|
||||
(void) Py_InitModule3("Surface", Surface_methods, module_Surface_doc); /* mod name, table ptr */
|
||||
Base::Console().Log("Loading Surface module... done\n");
|
||||
|
||||
// Add types to module
|
||||
Surface::Filling ::init();
|
||||
Surface::Sewing ::init();
|
||||
Surface::Cut ::init();
|
||||
Surface::BezSurf ::init();
|
||||
Surface::BSplineSurf ::init();
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
38
src/Mod/Surface/App/AppSurfacePy.cpp
Normal file
38
src/Mod/Surface/App/AppSurfacePy.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller Nathan.A.Mill[at]gmail.com *
|
||||
* *
|
||||
* 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 <Python.h>
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/PyObjectBase.h>
|
||||
#include <Base/Exception.h>
|
||||
|
||||
|
||||
/* registration table */
|
||||
struct PyMethodDef Surface_methods[] = {
|
||||
{NULL, NULL} /* end of table marker */
|
||||
};
|
||||
51
src/Mod/Surface/App/CMakeLists.txt
Normal file
51
src/Mod/Surface/App/CMakeLists.txt
Normal file
@@ -0,0 +1,51 @@
|
||||
if(MSVC)
|
||||
add_definitions(-DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
|
||||
else(MSVC)
|
||||
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
|
||||
endif(MSVC)
|
||||
|
||||
include_directories(
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${OCC_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${XERCESC_INCLUDE_DIR}
|
||||
${QT_QTCORE_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(Surface_LIBS
|
||||
FreeCADApp
|
||||
Part
|
||||
)
|
||||
|
||||
SET(Surface_SRCS
|
||||
AppSurface.cpp
|
||||
AppSurfacePy.cpp
|
||||
PreCompiled.cpp
|
||||
PreCompiled.h
|
||||
FeatureFilling.h
|
||||
FeatureFilling.cpp
|
||||
FeatureSewing.h
|
||||
FeatureSewing.cpp
|
||||
FeatureCut.h
|
||||
FeatureCut.cpp
|
||||
FeatureBezSurf.h
|
||||
FeatureBezSurf.cpp
|
||||
FeatureBSplineSurf.h
|
||||
FeatureBSplineSurf.cpp
|
||||
)
|
||||
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
add_library(Surface SHARED ${Surface_SRCS})
|
||||
target_link_libraries(Surface ${Surface_LIBS})
|
||||
|
||||
|
||||
fc_target_copy_resource(Surface
|
||||
${CMAKE_SOURCE_DIR}/src/Mod/Surface
|
||||
${CMAKE_BINARY_DIR}/Mod/Surface
|
||||
Init.py)
|
||||
|
||||
SET_BIN_DIR(Surface Surface /Mod/Surface)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Surface)
|
||||
|
||||
install(TARGETS Surface DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
234
src/Mod/Surface/App/FeatureBSplineSurf.cpp
Normal file
234
src/Mod/Surface/App/FeatureBSplineSurf.cpp
Normal file
@@ -0,0 +1,234 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 <BRepBuilderAPI_MakeFace.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#endif
|
||||
|
||||
#include "FeatureBSplineSurf.h"
|
||||
#include <GeomFill.hxx>
|
||||
#include <GeomFill_BSplineCurves.hxx>
|
||||
#include <ShapeFix_Wire.hxx>
|
||||
#include <ShapeExtend_WireData.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepBuilderAPI_MakeFace.hxx>
|
||||
#include <BRepBuilderAPI_MakeWire.hxx>
|
||||
#include <Base/Tools.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
|
||||
using namespace Surface;
|
||||
|
||||
PROPERTY_SOURCE(Surface::BSplineSurf, Part::Feature)
|
||||
|
||||
//Initial values
|
||||
|
||||
BSplineSurf::BSplineSurf()
|
||||
{
|
||||
ADD_PROPERTY(aBSplineList,(0,"Geom_BSplineCurve"));
|
||||
ADD_PROPERTY(filltype,(1));
|
||||
|
||||
}
|
||||
|
||||
//Structures
|
||||
|
||||
struct crvs{
|
||||
|
||||
Handle_Geom_BSplineCurve C1;
|
||||
Handle_Geom_BSplineCurve C2;
|
||||
Handle_Geom_BSplineCurve C3;
|
||||
Handle_Geom_BSplineCurve C4;
|
||||
|
||||
};
|
||||
|
||||
//Functions
|
||||
|
||||
void getCurves(GeomFill_BSplineCurves& aBuilder,TopoDS_Wire& aWire, const App::PropertyLinkSubList& anEdge, GeomFill_FillingStyle fstyle);
|
||||
//bool orderCurves(crvs& Cs, int size);
|
||||
|
||||
//Check if any components of the surface have been modified
|
||||
|
||||
short BSplineSurf::mustExecute() const
|
||||
{
|
||||
if (aBSplineList.isTouched() ||
|
||||
filltype.isTouched())
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *BSplineSurf::execute(void)
|
||||
{
|
||||
|
||||
//Set Variables
|
||||
|
||||
int ftype = filltype.getValue();
|
||||
|
||||
//Begin Construction
|
||||
try{
|
||||
|
||||
//Identify filling style
|
||||
|
||||
GeomFill_FillingStyle fstyle;
|
||||
|
||||
if(ftype==1){fstyle = GeomFill_StretchStyle;}
|
||||
else if(ftype==2){fstyle = GeomFill_CoonsStyle;}
|
||||
else if(ftype==3){fstyle = GeomFill_CurvedStyle;}
|
||||
else{return new App::DocumentObjectExecReturn("Filling style must be 1 (Stretch), 2 (Coons), or 3 (Curved).");}
|
||||
|
||||
//Create BSpline Surface
|
||||
|
||||
GeomFill_BSplineCurves aSurfBuilder; //Create Surface Builder
|
||||
// BRepBuilderAPI_MakeWire aWireBuilder; //Create Wire Builder
|
||||
TopoDS_Wire aWire; //Create empty wire
|
||||
|
||||
//Get BSpline Curves from edges and initialize the builder
|
||||
|
||||
printf("Entering getCurves\n");
|
||||
getCurves(aSurfBuilder,aWire,aBSplineList,fstyle);
|
||||
|
||||
//Create the surface
|
||||
printf("Creating the Surface\n");
|
||||
const Handle_Geom_BSplineSurface aSurface = aSurfBuilder.Surface();
|
||||
|
||||
printf("Creating the Face\n");
|
||||
BRepBuilderAPI_MakeFace aFaceBuilder(aSurface,aWire,Standard_True); //Create Face Builder
|
||||
// Standard_Real u0 = 0.;
|
||||
// Standard_Real u1 = 2.;
|
||||
// Standard_Real v0 = 0.;
|
||||
// Standard_Real v1 = 2.;
|
||||
// aFaceBuilder.Init(aSurface,u0,u1,v0,v1,Precision::Confusion());
|
||||
|
||||
printf("Returning the Face\n");
|
||||
TopoDS_Face aFace = aFaceBuilder.Face(); //Returned Face
|
||||
if(!aFaceBuilder.IsDone()){return new App::DocumentObjectExecReturn("Face unable to be constructed");}
|
||||
|
||||
if (aFace.IsNull()){
|
||||
return new App::DocumentObjectExecReturn("Resulting Face is null");
|
||||
}
|
||||
this->Shape.setValue(aFace);
|
||||
|
||||
return App::DocumentObject::StdReturn;
|
||||
|
||||
} //End Try
|
||||
catch (Standard_Failure) {
|
||||
Handle_Standard_Failure e = Standard_Failure::Caught();
|
||||
return new App::DocumentObjectExecReturn(e->GetMessageString());
|
||||
} //End Catch
|
||||
|
||||
} //End execute
|
||||
|
||||
void getCurves(GeomFill_BSplineCurves& aBuilder,TopoDS_Wire& aWire, const App::PropertyLinkSubList& anEdge, GeomFill_FillingStyle fstyle){
|
||||
//void getCurves(TopoDS_Wire& aWire, const App::PropertyLinkSubList& anEdge){
|
||||
|
||||
crvs bcrv;
|
||||
|
||||
Standard_Real u0 = 0.;
|
||||
Standard_Real u1 = 1.;
|
||||
|
||||
Handle(ShapeFix_Wire) aShFW = new ShapeFix_Wire;
|
||||
Handle(ShapeExtend_WireData) aWD = new ShapeExtend_WireData;
|
||||
|
||||
if(anEdge.getSize()>4){Standard_Failure::Raise("Only 2-4 continuous BSpline Curves are allowed");return;}
|
||||
if(anEdge.getSize()<2){Standard_Failure::Raise("Only 2-4 continuous BSpline Curves are allowed");return;}
|
||||
|
||||
for(int i=0; i<anEdge.getSize(); i++){
|
||||
|
||||
Part::TopoShape ts; //Curve TopoShape
|
||||
TopoDS_Shape sub; //Curve TopoDS_Shape
|
||||
TopoDS_Edge etmp; //Curve TopoDS_Edge
|
||||
|
||||
|
||||
//Get Edge
|
||||
App::PropertyLinkSubList::SubSet set = anEdge[i];
|
||||
|
||||
if(set.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
ts = static_cast<Part::Feature*>(set.obj)->Shape.getShape();
|
||||
|
||||
//we want only the subshape which is linked
|
||||
sub = ts.getSubShape(set.sub);
|
||||
|
||||
if(sub.ShapeType() == TopAbs_EDGE) {etmp = TopoDS::Edge(sub);} //Check Shape type and assign edge
|
||||
else{Standard_Failure::Raise("Curves must be type TopoDS_Edge");return;} //Raise exception
|
||||
|
||||
aWD->Add(etmp);
|
||||
|
||||
}
|
||||
|
||||
else{Standard_Failure::Raise("Curve not from Part::Feature");return;}
|
||||
|
||||
}
|
||||
|
||||
//Reorder the curves and fix the wire if required
|
||||
|
||||
aShFW->Load(aWD); //Load in the wire
|
||||
aShFW->FixReorder(); //Fix the order of the edges if required
|
||||
aShFW->ClosedWireMode() = Standard_True; //Enables closed wire mode
|
||||
aShFW->FixConnected(); //Fix connection between wires
|
||||
aShFW->FixSelfIntersection(); //Fix Self Intersection
|
||||
aShFW->Perform(); //Perform the fixes
|
||||
|
||||
aWire = aShFW->Wire(); //Healed Wire
|
||||
|
||||
if(aWire.IsNull()){Standard_Failure::Raise("Wire unable to be constructed");return;}
|
||||
|
||||
//Create BSpline Surface
|
||||
|
||||
TopExp_Explorer anExp (aWire, TopAbs_EDGE);
|
||||
int it = 0;
|
||||
for (; anExp.More(); anExp.Next()) {
|
||||
const TopoDS_Edge hedge = TopoDS::Edge (anExp.Current());
|
||||
TopLoc_Location heloc = hedge.Location();
|
||||
Handle_Geom_Curve c_geom = BRep_Tool::Curve(hedge,heloc,u0,u1); //The geometric curve
|
||||
Handle_Geom_BSplineCurve b_geom = Handle_Geom_BSplineCurve::DownCast(c_geom); //Try to get BSpline curve
|
||||
|
||||
if (!b_geom.IsNull()) {
|
||||
//Store Underlying Geometry
|
||||
if(it==0){bcrv.C1 = b_geom;}
|
||||
else if(it==1){bcrv.C2 = b_geom;}
|
||||
else if(it==2){bcrv.C3 = b_geom;}
|
||||
else if(it==3){bcrv.C4 = b_geom;}
|
||||
|
||||
}
|
||||
else {
|
||||
Standard_Failure::Raise("Curve not a BSpline Curve");
|
||||
return;
|
||||
}
|
||||
|
||||
it++;
|
||||
}
|
||||
|
||||
int ncrv = anEdge.getSize();
|
||||
|
||||
if(ncrv==2){aBuilder.Init(bcrv.C1,bcrv.C2,fstyle);}
|
||||
else if(ncrv==3){aBuilder.Init(bcrv.C1,bcrv.C2,bcrv.C3,fstyle);}
|
||||
else if(ncrv==4){aBuilder.Init(bcrv.C1,bcrv.C2,bcrv.C3,bcrv.C4,fstyle);}
|
||||
|
||||
return;
|
||||
}
|
||||
54
src/Mod/Surface/App/FeatureBSplineSurf.h
Normal file
54
src/Mod/Surface/App/FeatureBSplineSurf.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 SURFACE_FEATUREBSPLINESURF_H
|
||||
#define SURFACE_FEATUREBSPLINESURF_H
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include "Mod/Part/App/PartFeature.h"
|
||||
|
||||
namespace Surface
|
||||
{
|
||||
|
||||
class SurfaceExport BSplineSurf : public Part::Feature
|
||||
{
|
||||
PROPERTY_HEADER(Surface::BSplineSurf);
|
||||
|
||||
public:
|
||||
BSplineSurf();
|
||||
|
||||
App::PropertyLinkSubList aBSplineList; //BSpline curves to be turned into a face (2-4 curves allowed).
|
||||
App::PropertyInteger filltype; //Fill method (1, 2, or 3 for Stretch, Coons, and Curved)
|
||||
|
||||
// recalculate the feature
|
||||
App::DocumentObjectExecReturn *execute(void);
|
||||
short mustExecute() const;
|
||||
/// returns the type name of the view provider
|
||||
// const char* getViewProviderName(void) const {
|
||||
// return "PartGui::ViewProviderCut";
|
||||
// }
|
||||
|
||||
};
|
||||
}//Namespace Surface
|
||||
#endif
|
||||
232
src/Mod/Surface/App/FeatureBezSurf.cpp
Normal file
232
src/Mod/Surface/App/FeatureBezSurf.cpp
Normal file
@@ -0,0 +1,232 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 <BRepBuilderAPI_MakeFace.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#endif
|
||||
|
||||
#include "FeatureBezSurf.h"
|
||||
#include <GeomFill.hxx>
|
||||
#include <GeomFill_BezierCurves.hxx>
|
||||
#include <ShapeFix_Wire.hxx>
|
||||
#include <ShapeExtend_WireData.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepBuilderAPI_MakeFace.hxx>
|
||||
#include <BRepBuilderAPI_MakeWire.hxx>
|
||||
#include <Base/Tools.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
|
||||
using namespace Surface;
|
||||
|
||||
PROPERTY_SOURCE(Surface::BezSurf, Part::Feature)
|
||||
|
||||
//Initial values
|
||||
|
||||
BezSurf::BezSurf()
|
||||
{
|
||||
ADD_PROPERTY(aBezList,(0,"Geom_BezierCurve"));
|
||||
ADD_PROPERTY(filltype,(1));
|
||||
|
||||
}
|
||||
|
||||
//Structures
|
||||
|
||||
struct crvs{
|
||||
|
||||
Handle_Geom_BezierCurve C1;
|
||||
Handle_Geom_BezierCurve C2;
|
||||
Handle_Geom_BezierCurve C3;
|
||||
Handle_Geom_BezierCurve C4;
|
||||
|
||||
};
|
||||
|
||||
//Functions
|
||||
|
||||
void getCurves(GeomFill_BezierCurves& aBuilder,TopoDS_Wire& aWire, const App::PropertyLinkSubList& anEdge, GeomFill_FillingStyle fstyle);
|
||||
//bool orderCurves(crvs& Cs, int size);
|
||||
|
||||
//Check if any components of the surface have been modified
|
||||
|
||||
short BezSurf::mustExecute() const
|
||||
{
|
||||
if (aBezList.isTouched() ||
|
||||
filltype.isTouched())
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *BezSurf::execute(void)
|
||||
{
|
||||
|
||||
//Set Variables
|
||||
|
||||
int ftype = filltype.getValue();
|
||||
|
||||
//Begin Construction
|
||||
try{
|
||||
|
||||
//Identify filling style
|
||||
|
||||
GeomFill_FillingStyle fstyle;
|
||||
|
||||
if(ftype==1){fstyle = GeomFill_StretchStyle;}
|
||||
else if(ftype==2){fstyle = GeomFill_CoonsStyle;}
|
||||
else if(ftype==3){fstyle = GeomFill_CurvedStyle;}
|
||||
else{return new App::DocumentObjectExecReturn("Filling style must be 1 (Stretch), 2 (Coons), or 3 (Curved).");}
|
||||
|
||||
//Create Bezier Surface
|
||||
|
||||
GeomFill_BezierCurves aSurfBuilder; //Create Surface Builder
|
||||
// BRepBuilderAPI_MakeWire aWireBuilder; //Create Wire Builder
|
||||
TopoDS_Wire aWire; //Create empty wire
|
||||
|
||||
//Get Bezier Curves from edges and initialize the builder
|
||||
|
||||
getCurves(aSurfBuilder,aWire,aBezList,fstyle);
|
||||
|
||||
//Create the surface
|
||||
|
||||
const Handle_Geom_BezierSurface aSurface = aSurfBuilder.Surface();
|
||||
|
||||
BRepBuilderAPI_MakeFace aFaceBuilder;//(aSurface,aWire,Standard_True); //Create Face Builder
|
||||
Standard_Real u0 = 0.;
|
||||
Standard_Real u1 = 1.;
|
||||
Standard_Real v0 = 0.;
|
||||
Standard_Real v1 = 1.;
|
||||
aFaceBuilder.Init(aSurface,u0,u1,v0,v1,Precision::Confusion());
|
||||
|
||||
TopoDS_Face aFace = aFaceBuilder.Face(); //Returned Face
|
||||
if(!aFaceBuilder.IsDone()){return new App::DocumentObjectExecReturn("Face unable to be constructed");}
|
||||
|
||||
if (aFace.IsNull()){
|
||||
return new App::DocumentObjectExecReturn("Resulting Face is null");
|
||||
}
|
||||
this->Shape.setValue(aFace);
|
||||
|
||||
return App::DocumentObject::StdReturn;
|
||||
|
||||
} //End Try
|
||||
catch (Standard_Failure) {
|
||||
Handle_Standard_Failure e = Standard_Failure::Caught();
|
||||
return new App::DocumentObjectExecReturn(e->GetMessageString());
|
||||
} //End Catch
|
||||
|
||||
} //End execute
|
||||
|
||||
void getCurves(GeomFill_BezierCurves& aBuilder,TopoDS_Wire& aWire, const App::PropertyLinkSubList& anEdge, GeomFill_FillingStyle fstyle){
|
||||
//void getCurves(TopoDS_Wire& aWire, const App::PropertyLinkSubList& anEdge){
|
||||
|
||||
crvs bcrv;
|
||||
|
||||
Standard_Real u0 = 0.;
|
||||
Standard_Real u1 = 1.;
|
||||
|
||||
Handle(ShapeFix_Wire) aShFW = new ShapeFix_Wire;
|
||||
Handle(ShapeExtend_WireData) aWD = new ShapeExtend_WireData;
|
||||
|
||||
if(anEdge.getSize()>4){Standard_Failure::Raise("Only 2-4 continuous Bezier Curves are allowed");return;}
|
||||
if(anEdge.getSize()<2){Standard_Failure::Raise("Only 2-4 continuous Bezier Curves are allowed");return;}
|
||||
|
||||
for(int i=0; i<anEdge.getSize(); i++){
|
||||
|
||||
Part::TopoShape ts; //Curve TopoShape
|
||||
TopoDS_Shape sub; //Curve TopoDS_Shape
|
||||
TopoDS_Edge etmp; //Curve TopoDS_Edge
|
||||
|
||||
|
||||
//Get Edge
|
||||
App::PropertyLinkSubList::SubSet set = anEdge[i];
|
||||
|
||||
if(set.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
ts = static_cast<Part::Feature*>(set.obj)->Shape.getShape();
|
||||
|
||||
//we want only the subshape which is linked
|
||||
sub = ts.getSubShape(set.sub);
|
||||
|
||||
if(sub.ShapeType() == TopAbs_EDGE) {etmp = TopoDS::Edge(sub);} //Check Shape type and assign edge
|
||||
else{Standard_Failure::Raise("Curves must be type TopoDS_Edge");return;} //Raise exception
|
||||
|
||||
aWD->Add(etmp);
|
||||
|
||||
}
|
||||
|
||||
else{Standard_Failure::Raise("Curve not from Part::Feature");return;}
|
||||
|
||||
}
|
||||
|
||||
//Reorder the curves and fix the wire if required
|
||||
|
||||
aShFW->Load(aWD); //Load in the wire
|
||||
aShFW->FixReorder(); //Fix the order of the edges if required
|
||||
aShFW->ClosedWireMode() = Standard_True; //Enables closed wire mode
|
||||
aShFW->FixConnected(); //Fix connection between wires
|
||||
aShFW->FixSelfIntersection(); //Fix Self Intersection
|
||||
aShFW->Perform(); //Perform the fixes
|
||||
|
||||
aWire = aShFW->Wire(); //Healed Wire
|
||||
|
||||
if(aWire.IsNull()){Standard_Failure::Raise("Wire unable to be constructed");return;}
|
||||
|
||||
//Create Bezier Surface
|
||||
|
||||
TopExp_Explorer anExp (aWire, TopAbs_EDGE);
|
||||
int it = 0;
|
||||
for (; anExp.More(); anExp.Next()) {
|
||||
printf("it: %i",it);
|
||||
const TopoDS_Edge hedge = TopoDS::Edge (anExp.Current());
|
||||
TopLoc_Location heloc = hedge.Location();
|
||||
Handle_Geom_Curve c_geom = BRep_Tool::Curve(hedge,heloc,u0,u1); //The geometric curve
|
||||
Handle_Geom_BezierCurve b_geom = Handle_Geom_BezierCurve::DownCast(c_geom); //Try to get Bezier curve
|
||||
|
||||
if (!b_geom.IsNull()) {
|
||||
//Store Underlying Geometry
|
||||
if(it==0){bcrv.C1 = b_geom;}
|
||||
else if(it==1){bcrv.C2 = b_geom;}
|
||||
else if(it==2){bcrv.C3 = b_geom;}
|
||||
else if(it==3){bcrv.C4 = b_geom;}
|
||||
|
||||
}
|
||||
else {
|
||||
Standard_Failure::Raise("Curve not a Bezier Curve");
|
||||
return;
|
||||
}
|
||||
|
||||
it++;
|
||||
}
|
||||
|
||||
int ncrv = anEdge.getSize();
|
||||
|
||||
if(ncrv==2){aBuilder.Init(bcrv.C1,bcrv.C2,fstyle);}
|
||||
else if(ncrv==3){aBuilder.Init(bcrv.C1,bcrv.C2,bcrv.C3,fstyle);}
|
||||
else if(ncrv==4){aBuilder.Init(bcrv.C1,bcrv.C2,bcrv.C3,bcrv.C4,fstyle);}
|
||||
|
||||
return;
|
||||
}
|
||||
54
src/Mod/Surface/App/FeatureBezSurf.h
Normal file
54
src/Mod/Surface/App/FeatureBezSurf.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 SURFACE_FEATUREBEZSURF_H
|
||||
#define SURFACE_FEATUREBEZSURF_H
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include "Mod/Part/App/PartFeature.h"
|
||||
|
||||
namespace Surface
|
||||
{
|
||||
|
||||
class SurfaceExport BezSurf : public Part::Feature
|
||||
{
|
||||
PROPERTY_HEADER(Surface::BezSurf);
|
||||
|
||||
public:
|
||||
BezSurf();
|
||||
|
||||
App::PropertyLinkSubList aBezList; //Bezier curves to be turned into a face (2-4 curves allowed).
|
||||
App::PropertyInteger filltype; //Fill method (1, 2, or 3 for Stretch, Coons, and Curved)
|
||||
|
||||
// recalculate the feature
|
||||
App::DocumentObjectExecReturn *execute(void);
|
||||
short mustExecute() const;
|
||||
/// returns the type name of the view provider
|
||||
// const char* getViewProviderName(void) const {
|
||||
// return "PartGui::ViewProviderCut";
|
||||
// }
|
||||
|
||||
};
|
||||
}//Namespace Surface
|
||||
#endif
|
||||
119
src/Mod/Surface/App/FeatureCut.cpp
Normal file
119
src/Mod/Surface/App/FeatureCut.cpp
Normal file
@@ -0,0 +1,119 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 <BRepBuilderAPI_MakeFace.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <Precision.hxx>
|
||||
#endif
|
||||
|
||||
#include "FeatureCut.h"
|
||||
#include <BRepAlgoAPI_Cut.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Base/Tools.h>
|
||||
#include <Base/Exception.h>
|
||||
|
||||
using namespace Surface;
|
||||
|
||||
PROPERTY_SOURCE(Surface::Cut, Part::Feature)
|
||||
|
||||
//Initial values
|
||||
|
||||
Cut::Cut()
|
||||
{
|
||||
ADD_PROPERTY(aShapeList,(0,"TopoDS_Shape"));
|
||||
|
||||
}
|
||||
|
||||
//Check if any components of the surface have been modified
|
||||
|
||||
short Cut::mustExecute() const
|
||||
{
|
||||
if (aShapeList.isTouched())
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *Cut::execute(void)
|
||||
{
|
||||
|
||||
//Perform error checking
|
||||
|
||||
bool res;
|
||||
|
||||
//Begin Construction
|
||||
try{
|
||||
|
||||
if((aShapeList.getSize()>2) || (aShapeList.getSize()<2)){
|
||||
return new App::DocumentObjectExecReturn("Two shapes must be entered at a time for a cut operation");
|
||||
}
|
||||
|
||||
//Initialize variables for first toposhape from document object
|
||||
Part::TopoShape ts1;
|
||||
TopoDS_Shape sub1;
|
||||
App::PropertyLinkSubList::SubSet set1 = aShapeList[0];
|
||||
|
||||
//Initialize variables for second toposhape from document object
|
||||
Part::TopoShape ts2;
|
||||
TopoDS_Shape sub2;
|
||||
App::PropertyLinkSubList::SubSet set2 = aShapeList[1];
|
||||
|
||||
//Get first toposhape
|
||||
printf("Get first toposhape\n");
|
||||
if(set1.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
ts1 = static_cast<Part::Feature*>(set1.obj)->Shape.getShape(); //Part::TopoShape 1
|
||||
|
||||
}
|
||||
else{return new App::DocumentObjectExecReturn("Shape1 not from Part::Feature");}
|
||||
|
||||
//Get second toposhape
|
||||
printf("Get second toposhape\n");
|
||||
if(set2.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
ts2 = static_cast<Part::Feature*>(set2.obj)->Shape.getShape();
|
||||
|
||||
}
|
||||
else{return new App::DocumentObjectExecReturn("Shape2 not from Part::Feature");}
|
||||
|
||||
//Cut Shape1 by Shape2
|
||||
TopoDS_Shape aCutShape;
|
||||
aCutShape = ts1.cut(ts2._Shape);
|
||||
|
||||
//Check if resulting shell is null
|
||||
if (aCutShape.IsNull()){
|
||||
return new App::DocumentObjectExecReturn("Resulting shape is null");
|
||||
}
|
||||
this->Shape.setValue(aCutShape);
|
||||
|
||||
} //End Try
|
||||
catch (Standard_Failure) {
|
||||
Handle_Standard_Failure e = Standard_Failure::Caught();
|
||||
return new App::DocumentObjectExecReturn(e->GetMessageString());
|
||||
} //End Catch
|
||||
|
||||
} //End execute
|
||||
53
src/Mod/Surface/App/FeatureCut.h
Normal file
53
src/Mod/Surface/App/FeatureCut.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 SURFACE_FEATURECUT_H
|
||||
#define SURFACE_FEATURECUT_H
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include "Mod/Part/App/PartFeature.h"
|
||||
|
||||
namespace Surface
|
||||
{
|
||||
|
||||
class SurfaceExport Cut : public Part::Feature
|
||||
{
|
||||
PROPERTY_HEADER(Surface::Cut);
|
||||
|
||||
public:
|
||||
Cut();
|
||||
|
||||
App::PropertyLinkSubList aShapeList; //Shapes to be cut.
|
||||
|
||||
// recalculate the feature
|
||||
App::DocumentObjectExecReturn *execute(void);
|
||||
short mustExecute() const;
|
||||
/// returns the type name of the view provider
|
||||
// const char* getViewProviderName(void) const {
|
||||
// return "SurfaceGui::ViewProviderCut";
|
||||
// }
|
||||
|
||||
};
|
||||
}//Namespace Surface
|
||||
#endif
|
||||
461
src/Mod/Surface/App/FeatureFilling.cpp
Normal file
461
src/Mod/Surface/App/FeatureFilling.cpp
Normal file
@@ -0,0 +1,461 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 <BRepBuilderAPI_MakeFace.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <Precision.hxx>
|
||||
#endif
|
||||
|
||||
#include "FeatureFilling.h"
|
||||
#include <BRepFill_Filling.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Base/Tools.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace Surface;
|
||||
|
||||
PROPERTY_SOURCE(Surface::Filling, Part::Feature)
|
||||
|
||||
//Initial values
|
||||
|
||||
Filling::Filling()
|
||||
{
|
||||
ADD_PROPERTY(Border,(0,"TopoDS_Edge"));
|
||||
|
||||
ADD_PROPERTY(Curves,(0,"TopoDS_Edge"));
|
||||
|
||||
ADD_PROPERTY(BFaces,(0,"TopoDS_Face"));
|
||||
ADD_PROPERTY(orderB,(-1));
|
||||
ADD_PROPERTY(CFaces,(0,"TopoDS_Face"));
|
||||
ADD_PROPERTY(orderC,(-1));
|
||||
|
||||
ADD_PROPERTY(Points,(0,"TopoDS_Vertex"));
|
||||
|
||||
ADD_PROPERTY(initFace,(0,"TopoDS_Face"));
|
||||
|
||||
ADD_PROPERTY(Degree,(3));
|
||||
ADD_PROPERTY(NbPtsOnCur,(3));
|
||||
ADD_PROPERTY(NbIter,(2));
|
||||
ADD_PROPERTY(Anisotropie,(false));
|
||||
ADD_PROPERTY(Tol2d,(0.00001));
|
||||
ADD_PROPERTY(Tol3d,(0.0001));
|
||||
ADD_PROPERTY(TolAng,(0.001));
|
||||
ADD_PROPERTY(TolCurv,(0.01));
|
||||
ADD_PROPERTY(MaxDeg,(8));
|
||||
ADD_PROPERTY(MaxSegments,(10000));
|
||||
}
|
||||
|
||||
//Define Functions
|
||||
|
||||
void appconstr_crv(BRepFill_Filling& builder,const App::PropertyLinkSubList& anEdge, Standard_Boolean bnd);
|
||||
void appconstr_bface(BRepFill_Filling& builder,const App::PropertyLinkSubList& aFace, const App::PropertyIntegerList& Order);
|
||||
void appconstr_crvface(BRepFill_Filling& builder, const App::PropertyLinkSubList& anEdge, const App::PropertyLinkSubList& aFace, const App::PropertyIntegerList& Order, Standard_Boolean bnd);
|
||||
void appconstr_pt(BRepFill_Filling& builder,const App::PropertyLinkSubList& aVertex);
|
||||
void appinitface(BRepFill_Filling& builder,const App::PropertyLinkSubList& aFace);
|
||||
|
||||
//Check if any components of the surface have been modified
|
||||
|
||||
short Filling::mustExecute() const
|
||||
{
|
||||
if (Border.isTouched() ||
|
||||
Curves.isTouched() ||
|
||||
BFaces.isTouched() ||
|
||||
orderB.isTouched() ||
|
||||
CFaces.isTouched() ||
|
||||
orderC.isTouched() ||
|
||||
Points.isTouched() ||
|
||||
initFace.isTouched() ||
|
||||
Degree.isTouched() ||
|
||||
NbPtsOnCur.isTouched() ||
|
||||
NbIter.isTouched() ||
|
||||
Anisotropie.isTouched() ||
|
||||
Tol2d.isTouched() ||
|
||||
Tol3d.isTouched() ||
|
||||
TolAng.isTouched() ||
|
||||
TolCurv.isTouched() ||
|
||||
MaxDeg.isTouched() ||
|
||||
MaxSegments.isTouched())
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *Filling::execute(void)
|
||||
{
|
||||
|
||||
//Assign Variables
|
||||
|
||||
|
||||
|
||||
unsigned int Deg = Degree.getValue();
|
||||
unsigned int NPOC = NbPtsOnCur.getValue();
|
||||
unsigned int NI = NbIter.getValue();
|
||||
bool Anis = Anisotropie.getValue();
|
||||
double T2d = Tol2d.getValue();
|
||||
double T3d = Tol3d.getValue();
|
||||
double TG1 = TolAng.getValue();
|
||||
double TG2 = TolCurv.getValue();
|
||||
unsigned int Mdeg = MaxDeg.getValue();
|
||||
unsigned int Mseg = MaxSegments.getValue();
|
||||
|
||||
bool res;
|
||||
|
||||
//Perform error checking
|
||||
|
||||
|
||||
//Begin Construction
|
||||
try{
|
||||
|
||||
//Generate Builder with Algorithm Variables
|
||||
|
||||
BRepFill_Filling builder(Deg,NPOC,NI,Anis,T2d,T3d,TG1,TG2,Mdeg,Mseg);
|
||||
|
||||
//Check that borders are defined
|
||||
printf("Surface Filling\n");
|
||||
|
||||
if((Border.getSize())<1){return new App::DocumentObjectExecReturn("Border must have at least one curve defined.");}
|
||||
|
||||
//Assign Boundaries
|
||||
if(Border.getSize()>0){appconstr_crvface(builder, Border, BFaces, orderB, Standard_True);}
|
||||
|
||||
//Assign Additional Curves if available
|
||||
|
||||
if(Curves.getSize()>0){appconstr_crvface(builder, Curves, CFaces, orderC, Standard_False);}
|
||||
|
||||
/* //Assign Faces
|
||||
|
||||
if(BFaces.getSize()>0){appconstr_bface(builder, BFaces, orderBFaces);}
|
||||
*/
|
||||
//Assign Point Constraints
|
||||
|
||||
if(Points.getSize()>0){appconstr_pt(builder,Points);}
|
||||
|
||||
//Assign Initial Face
|
||||
|
||||
if(initFace.getSize()>0){appinitface(builder,initFace);}
|
||||
|
||||
printf("Building...\n");
|
||||
|
||||
//Build the face
|
||||
builder.Build();
|
||||
if (!builder.IsDone()){Standard_Failure::Raise("Failed to create a face from constraints");}
|
||||
|
||||
printf("Build Complete\n");
|
||||
|
||||
//Return the face
|
||||
TopoDS_Face aFace = builder.Face();
|
||||
|
||||
if (aFace.IsNull()){
|
||||
return new App::DocumentObjectExecReturn("Resulting shape is null");
|
||||
}
|
||||
this->Shape.setValue(aFace);
|
||||
|
||||
return App::DocumentObject::StdReturn;
|
||||
|
||||
} //End Try
|
||||
catch (Standard_Failure) {
|
||||
Handle_Standard_Failure e = Standard_Failure::Caught();
|
||||
return new App::DocumentObjectExecReturn(e->GetMessageString());
|
||||
} //End Catch
|
||||
|
||||
} //End execute
|
||||
/*
|
||||
void appconstr_crv(BRepFill_Filling& builder,const App::PropertyLinkSubList& anEdge, Standard_Boolean bnd){
|
||||
|
||||
printf("Inside appconstr_crv\n");
|
||||
|
||||
int res;
|
||||
|
||||
printf("Entering for loop\n");
|
||||
|
||||
for(int i=0; i<anEdge.getSize(); i++) {
|
||||
|
||||
printf("Processing curve %i\n",i);
|
||||
|
||||
Part::TopoShape ts;
|
||||
// Part::TopoShape sub;
|
||||
TopoDS_Shape sub;
|
||||
TopoDS_Edge etmp;
|
||||
|
||||
//the subset has the documentobject and the element name which belongs to it,
|
||||
// in our case for example the cube object and the "Edge1" string
|
||||
|
||||
// printf("Pre try\n");
|
||||
//
|
||||
// try{anEdge[i].obj;}
|
||||
// catch(...){
|
||||
// Standard_Failure::Raise("Check Boundary or Curve Definitions.\nShould be of form [(App.ActiveDocument.object, 'Edge Name'),...");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// printf("Made it past try\n");
|
||||
//
|
||||
App::PropertyLinkSubList::SubSet set = anEdge[i];
|
||||
|
||||
printf("Past set = anEdge[i]\n");
|
||||
|
||||
//set.obj should be our box, but just to make sure no one set something stupid
|
||||
if(set.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
//we get the shape of the document object which resemble the whole box
|
||||
ts = static_cast<Part::Feature*>(set.obj)->Shape.getShape();
|
||||
|
||||
//we want only the subshape which is linked
|
||||
sub = ts.getSubShape(set.sub);
|
||||
|
||||
if(sub.ShapeType() == TopAbs_EDGE) {etmp = TopoDS::Edge(sub);} //Check Shape type and assign edge
|
||||
else{Standard_Failure::Raise("Curves must be type TopoDS_Edge");return;} //Raise exception
|
||||
|
||||
}
|
||||
|
||||
else{Standard_Failure::Raise("Boundary or Curve not from Part::Feature");return;}
|
||||
|
||||
res = builder.Add(etmp,GeomAbs_C0,bnd);
|
||||
|
||||
printf("Result of builder.Add: %i\n",res);
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*
|
||||
void appconstr_bface(BRepFill_Filling& builder,const App::PropertyLinkSubList& aFace, const App::PropertyIntegerList& Order){
|
||||
|
||||
int res;
|
||||
|
||||
GeomAbs_Shape ordtmp;
|
||||
|
||||
std::vector<long int>::const_iterator bc = Order.getValues().begin(); //Get the order values
|
||||
|
||||
for(int i=0; i<aFace.getSize(); i++){
|
||||
|
||||
Part::TopoShape ts;
|
||||
TopoDS_Shape sub;
|
||||
TopoDS_Face ftmp;
|
||||
|
||||
App::PropertyLinkSubList::SubSet set = aFace[i];
|
||||
|
||||
if(set.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
ts = static_cast<Part::Feature*>(set.obj)->Shape.getShape();
|
||||
|
||||
sub = ts.getSubShape(set.sub);
|
||||
|
||||
if(sub.ShapeType() == TopAbs_FACE) {ftmp = TopoDS::Face(sub);} //Check Shape type and assign edge
|
||||
else{Standard_Failure::Raise("Faces must be type TopoDS_Face");} //Raise exception
|
||||
|
||||
}
|
||||
|
||||
else{Standard_Failure::Raise("Face not from Part::Feature");}
|
||||
|
||||
//PropertyEnumerateList doesn't exist yet. Fix when implemented
|
||||
|
||||
if(*bc==0){ordtmp = GeomAbs_C0;}
|
||||
else if(*bc==1){ordtmp = GeomAbs_G1;}
|
||||
else if(*bc==2){ordtmp = GeomAbs_G2;}
|
||||
else{Standard_Failure::Raise("Continuity constraint must be 0, 1 or 2 for C0, G1, and G2.");return;}
|
||||
|
||||
printf("*bc: %li\n",*bc);
|
||||
|
||||
res = builder.Add(ftmp,ordtmp);
|
||||
|
||||
printf("res: %i\n",res);
|
||||
|
||||
bc++;
|
||||
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
*/
|
||||
void appconstr_crvface(BRepFill_Filling& builder, const App::PropertyLinkSubList& anEdge, const App::PropertyLinkSubList& aFace, const App::PropertyIntegerList& Order, Standard_Boolean bnd){
|
||||
|
||||
int res;
|
||||
|
||||
GeomAbs_Shape ordtmp;
|
||||
|
||||
std::vector<long int>::const_iterator bc = Order.getValues().begin(); //Get the order values
|
||||
int fconit = 0;
|
||||
|
||||
for(int i=0; i<anEdge.getSize(); i++){
|
||||
|
||||
Part::TopoShape ts_edge;
|
||||
TopoDS_Shape sub_edge;
|
||||
|
||||
Part::TopoShape ts_face;
|
||||
TopoDS_Shape sub_face;
|
||||
|
||||
TopoDS_Edge etmp;
|
||||
TopoDS_Face ftmp;
|
||||
|
||||
//Get Edge
|
||||
|
||||
App::PropertyLinkSubList::SubSet set_edge = anEdge[i];
|
||||
|
||||
if(set_edge.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
ts_edge = static_cast<Part::Feature*>(set_edge.obj)->Shape.getShape();
|
||||
|
||||
//we want only the subshape which is linked
|
||||
sub_edge = ts_edge.getSubShape(set_edge.sub);
|
||||
|
||||
if(sub_edge.ShapeType() == TopAbs_EDGE) {etmp = TopoDS::Edge(sub_edge);} //Check Shape type and assign edge
|
||||
else{Standard_Failure::Raise("Curves must be type TopoDS_Edge");return;} //Raise exception
|
||||
|
||||
}
|
||||
|
||||
else{Standard_Failure::Raise("Boundary or Curve not from Part::Feature");return;}
|
||||
|
||||
/*********************************/
|
||||
|
||||
//Get Order
|
||||
|
||||
//PropertyEnumerateList doesn't exist yet. Fix when implemented
|
||||
|
||||
if(*bc==0){ordtmp = GeomAbs_C0;}
|
||||
else if(*bc==1){ordtmp = GeomAbs_G1;}
|
||||
else if(*bc==2){ordtmp = GeomAbs_G2;}
|
||||
else{Standard_Failure::Raise("Continuity constraint must be 0, 1 or 2 for C0, G1, and G2.");return;}
|
||||
|
||||
/*********************************/
|
||||
|
||||
//Get Face if required
|
||||
|
||||
if(ordtmp==GeomAbs_C0){
|
||||
|
||||
res = builder.Add(etmp,ordtmp,bnd);
|
||||
|
||||
}
|
||||
|
||||
else{
|
||||
|
||||
// if(aFace.getSize()<anEdge.getSize()){
|
||||
// Standard_Failure::Raise("Faces must be defined (even as null) for all edges if G1 or G2 constraints are used.");
|
||||
// }
|
||||
|
||||
App::PropertyLinkSubList::SubSet set_face = aFace[fconit];
|
||||
|
||||
if(set_face.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
ts_face = static_cast<Part::Feature*>(set_face.obj)->Shape.getShape();
|
||||
|
||||
sub_face = ts_face.getSubShape(set_face.sub);
|
||||
|
||||
if(sub_face.ShapeType() == TopAbs_FACE) {ftmp = TopoDS::Face(sub_face);} //Check Shape type and assign edge
|
||||
else{Standard_Failure::Raise("Faces must be type TopoDS_Face");} //Raise exception
|
||||
|
||||
}
|
||||
|
||||
else{Standard_Failure::Raise("Face not from Part::Feature");}
|
||||
|
||||
printf("*bc: %li\n",*bc);
|
||||
|
||||
res = builder.Add(etmp,ftmp,ordtmp,bnd);
|
||||
|
||||
fconit++;
|
||||
|
||||
}
|
||||
|
||||
printf("res: %i\n",res);
|
||||
|
||||
bc++;
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void appconstr_pt(BRepFill_Filling& builder,const App::PropertyLinkSubList& aVertex){
|
||||
|
||||
int res;
|
||||
|
||||
for(int i=0; i<aVertex.getSize(); i++) {
|
||||
|
||||
Part::TopoShape ts;
|
||||
// Part::TopoShape sub;
|
||||
TopoDS_Shape sub;
|
||||
TopoDS_Vertex vtmp;
|
||||
|
||||
//the subset has the documentobject and the element name which belongs to it,
|
||||
// in our case for example the cube object and the "Vertex1" string
|
||||
App::PropertyLinkSubList::SubSet set = aVertex[i];
|
||||
|
||||
if(set.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
//we get the shape of the document object which resemble the whole box
|
||||
ts = static_cast<Part::Feature*>(set.obj)->Shape.getShape();
|
||||
|
||||
//we want only the subshape which is linked
|
||||
sub = ts.getSubShape(set.sub);
|
||||
|
||||
if(sub.ShapeType() == TopAbs_VERTEX) {vtmp = TopoDS::Vertex(sub);} //Check Shape type and assign edge
|
||||
else{Standard_Failure::Raise("Curves must be type TopoDS_Vertex");} //Raise exception
|
||||
|
||||
}
|
||||
|
||||
else{Standard_Failure::Raise("Point not from Part::Feature");}
|
||||
|
||||
res = builder.Add(BRep_Tool::Pnt(vtmp));
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void appinitface(BRepFill_Filling& builder,const App::PropertyLinkSubList& aFace){
|
||||
|
||||
int res;
|
||||
|
||||
if(aFace.getSize()>1){Standard_Failure::Raise("Only one face may be used for the initial face");return;}
|
||||
|
||||
Part::TopoShape ts;
|
||||
// Part::TopoShape sub;
|
||||
TopoDS_Shape sub;
|
||||
TopoDS_Face face;
|
||||
|
||||
//the subset has the documentobject and the element name which belongs to it,
|
||||
// in our case for example the cube object and the "Vertex1" string
|
||||
App::PropertyLinkSubList::SubSet set = aFace[0];
|
||||
|
||||
if(set.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
//we get the shape of the document object which resemble the whole box
|
||||
ts = static_cast<Part::Feature*>(set.obj)->Shape.getShape();
|
||||
|
||||
//we want only the subshape which is linked
|
||||
sub = ts.getSubShape(set.sub);
|
||||
|
||||
if(sub.ShapeType() == TopAbs_FACE) {face = TopoDS::Face(sub);} //Check Shape type and assign edge
|
||||
else{Standard_Failure::Raise("Faces must be type TopoDS_Face");} //Raise exception
|
||||
|
||||
}
|
||||
|
||||
else{Standard_Failure::Raise("Point not from Part::Feature");}
|
||||
|
||||
builder.LoadInitSurface(face);
|
||||
|
||||
return;
|
||||
}
|
||||
77
src/Mod/Surface/App/FeatureFilling.h
Normal file
77
src/Mod/Surface/App/FeatureFilling.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 SURFACE_FEATUREFILLING_H
|
||||
#define SURFACE_FEATUREFILLING_H
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include "Mod/Part/App/PartFeature.h"
|
||||
|
||||
namespace Surface
|
||||
{
|
||||
|
||||
class SurfaceExport Filling : public Part::Feature
|
||||
{
|
||||
PROPERTY_HEADER(Surface::Filling);
|
||||
|
||||
public:
|
||||
Filling();
|
||||
|
||||
//Properties of Curves
|
||||
|
||||
App::PropertyLinkSubList Border; // Border Edges (C0 is required for edges without a corresponding face)
|
||||
App::PropertyLinkSubList Curves; // Other Constraint Curves (C0 is required for edges without a corresponding face)
|
||||
|
||||
App::PropertyLinkSubList BFaces; // Border Faces (C0, G1 and G2 are possible)
|
||||
App::PropertyIntegerList orderB; // Order of constraint on border faces
|
||||
App::PropertyLinkSubList CFaces; // Curve Faces (C0, G1 and G2 are possible)
|
||||
App::PropertyIntegerList orderC; // Order of constraint on curve faces
|
||||
|
||||
App::PropertyLinkSubList Points; // Constraint Points (on Surface)
|
||||
|
||||
App::PropertyLinkSubList initFace; // Initial Face to use
|
||||
|
||||
//Algorithm Variables
|
||||
App::PropertyInteger Degree; //Starting degree
|
||||
App::PropertyInteger NbPtsOnCur; //Number of points on an edge for constraint
|
||||
App::PropertyInteger NbIter; //Number of iterations
|
||||
App::PropertyBool Anisotropie; //?
|
||||
App::PropertyFloat Tol2d; //2D Tolerance
|
||||
App::PropertyFloat Tol3d; //3D Tolerance
|
||||
App::PropertyFloat TolAng; //G1 tolerance
|
||||
App::PropertyFloat TolCurv; //G2 tolerance
|
||||
App::PropertyInteger MaxDeg; //Maximum curve degree
|
||||
App::PropertyInteger MaxSegments; //Maximum number of segments
|
||||
|
||||
// recalculate the feature
|
||||
App::DocumentObjectExecReturn *execute(void);
|
||||
short mustExecute() const;
|
||||
/// returns the type name of the view provider
|
||||
// const char* getViewProviderName(void) const {
|
||||
// return "PartGui::ViewProviderFilling";
|
||||
// }
|
||||
|
||||
};
|
||||
} //Namespace Surface
|
||||
#endif
|
||||
155
src/Mod/Surface/App/FeatureSewing.cpp
Normal file
155
src/Mod/Surface/App/FeatureSewing.cpp
Normal file
@@ -0,0 +1,155 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 <BRepBuilderAPI_MakeFace.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <Precision.hxx>
|
||||
#endif
|
||||
|
||||
#include "FeatureSewing.h"
|
||||
#include <BRepBuilderAPI_Sewing.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Base/Tools.h>
|
||||
#include <Base/Exception.h>
|
||||
|
||||
using namespace Surface;
|
||||
|
||||
PROPERTY_SOURCE(Surface::Sewing, Part::Feature)
|
||||
|
||||
//Initial values
|
||||
|
||||
Sewing::Sewing()
|
||||
{
|
||||
ADD_PROPERTY(aShapeList,(0,"TopoDS_Shape"));
|
||||
|
||||
App::PropertyFloat tol;
|
||||
App::PropertyBool sewopt; //Option for sewing (if false only control)
|
||||
App::PropertyBool degenshp; //Option for analysis of degenerated shapes
|
||||
App::PropertyBool cutfreeedges; //Option for cutting of free edges
|
||||
App::PropertyBool nonmanifold; //Option for non-manifold processing
|
||||
|
||||
ADD_PROPERTY(tol,(0.0000001));
|
||||
ADD_PROPERTY(sewopt,(true));
|
||||
ADD_PROPERTY(degenshp,(true));
|
||||
ADD_PROPERTY(cutfreeedges,(true));
|
||||
ADD_PROPERTY(nonmanifold,(false));
|
||||
|
||||
}
|
||||
|
||||
//Function Definitions
|
||||
|
||||
void addshape(BRepBuilderAPI_Sewing& builder,const App::PropertyLinkSubList& aShapeList);
|
||||
|
||||
//Check if any components of the surface have been modified
|
||||
|
||||
short Sewing::mustExecute() const
|
||||
{
|
||||
if (aShapeList.isTouched() ||
|
||||
tol.isTouched() ||
|
||||
sewopt.isTouched() ||
|
||||
degenshp.isTouched() ||
|
||||
cutfreeedges.isTouched() ||
|
||||
nonmanifold.isTouched())
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *Sewing::execute(void)
|
||||
{
|
||||
|
||||
//Assign Variables
|
||||
|
||||
double atol = tol.getValue();
|
||||
bool opt1 = sewopt.getValue();
|
||||
bool opt2 = degenshp.getValue();
|
||||
bool opt3 = cutfreeedges.getValue();
|
||||
bool opt4 = nonmanifold.getValue();
|
||||
|
||||
//Perform error checking
|
||||
|
||||
|
||||
bool res;
|
||||
|
||||
//Begin Construction
|
||||
try{
|
||||
|
||||
BRepBuilderAPI_Sewing builder(atol,opt1,opt2,opt3,opt4);
|
||||
|
||||
addshape(builder,aShapeList);
|
||||
|
||||
builder.Perform(); //Perform Sewing
|
||||
|
||||
TopoDS_Shape aShape = builder.SewedShape(); //Get Shape
|
||||
|
||||
printf("number of degenerated shapes: %i\n",builder.NbDegeneratedShapes());
|
||||
printf("number of deleted faces: %i\n",builder.NbDeletedFaces());
|
||||
printf("number of free edges: %i\n",builder.NbFreeEdges());
|
||||
printf("number of multiple edges: %i\n",builder.NbMultipleEdges());
|
||||
printf("number of continuous edges: %i\n",builder.NbContigousEdges());
|
||||
|
||||
if (aShape.IsNull())
|
||||
return new App::DocumentObjectExecReturn("Resulting shape is null");
|
||||
this->Shape.setValue(aShape);
|
||||
|
||||
|
||||
} //End Try
|
||||
catch (Standard_Failure) {
|
||||
Handle_Standard_Failure e = Standard_Failure::Caught();
|
||||
return new App::DocumentObjectExecReturn(e->GetMessageString());
|
||||
} //End Catch
|
||||
|
||||
} //End execute
|
||||
|
||||
void addshape(BRepBuilderAPI_Sewing& builder,const App::PropertyLinkSubList& aShapeList){
|
||||
|
||||
for(int i=0; i<aShapeList.getSize(); i++) {
|
||||
|
||||
printf("Processing shape %i\n",i);
|
||||
|
||||
Part::TopoShape ts;
|
||||
// Part::TopoShape sub;
|
||||
TopoDS_Shape sub;
|
||||
std::vector< const char * > temp;
|
||||
|
||||
//the subset has the documentobject and the element name which belongs to it,
|
||||
// in our case for example the cube object and the "Edge1" string
|
||||
App::PropertyLinkSubList::SubSet set = aShapeList[i];
|
||||
|
||||
//set.obj should be our box, but just to make sure no one set something stupid
|
||||
if(set.obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
|
||||
//we get the shape of the document object which resemble the whole box
|
||||
ts = static_cast<Part::Feature*>(set.obj)->Shape.getShape();
|
||||
|
||||
//we want only the subshape which is linked
|
||||
sub = ts.getSubShape(set.sub);
|
||||
}
|
||||
else{Standard_Failure::Raise("Shape item not from Part::Feature");return;}
|
||||
|
||||
builder.Add(sub);
|
||||
|
||||
}
|
||||
}
|
||||
59
src/Mod/Surface/App/FeatureSewing.h
Normal file
59
src/Mod/Surface/App/FeatureSewing.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 SURFACE_FEATURESEWING_H
|
||||
#define SURFACE_FEATURESEWING_H
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include "Mod/Part/App/PartFeature.h"
|
||||
|
||||
namespace Surface
|
||||
{
|
||||
|
||||
class SurfaceExport Sewing : public Part::Feature
|
||||
{
|
||||
PROPERTY_HEADER(Surface::Sewing);
|
||||
|
||||
public:
|
||||
Sewing();
|
||||
|
||||
App::PropertyLinkSubList aShapeList; //Shapes to be sewn.
|
||||
|
||||
App::PropertyFloat tol;
|
||||
App::PropertyBool sewopt; //Option for sewing (if false only control)
|
||||
App::PropertyBool degenshp; //Option for analysis of degenerated shapes
|
||||
App::PropertyBool cutfreeedges; //Option for cutting of free edges
|
||||
App::PropertyBool nonmanifold; //Option for non-manifold processing
|
||||
|
||||
// recalculate the feature
|
||||
App::DocumentObjectExecReturn *execute(void);
|
||||
short mustExecute() const;
|
||||
/// returns the type name of the view provider
|
||||
// const char* getViewProviderName(void) const {
|
||||
// return "PartGui::ViewProviderSewing";
|
||||
// }
|
||||
|
||||
};
|
||||
}//Namespace Surface
|
||||
#endif
|
||||
47
src/Mod/Surface/App/Makefile.am
Normal file
47
src/Mod/Surface/App/Makefile.am
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
lib_LTLIBRARIES=libSurface.la Surface.la
|
||||
|
||||
libSurface_la_SOURCES=\
|
||||
AppSurfacePy.cpp \
|
||||
PreCompiled.cpp \
|
||||
PreCompiled.h
|
||||
|
||||
includedir = @includedir@/Mod/Surface/App
|
||||
|
||||
# the library search path.
|
||||
libSurface_la_LDFLAGS = -L../../../Base -L../../../App $(all_libraries) \
|
||||
-version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
|
||||
libSurface_la_CPPFLAGS = -DSurfaceAppExport=
|
||||
|
||||
libSurface_la_LIBADD = \
|
||||
@BOOST_SYSTEM_LIB@ \
|
||||
-l@PYTHON_LIB@ \
|
||||
-lxerces-c \
|
||||
-lFreeCADBase \
|
||||
-lFreeCADApp
|
||||
|
||||
#--------------------------------------------------------------------------------------
|
||||
# Loader of libSurface
|
||||
|
||||
Surface_la_SOURCES=\
|
||||
AppSurface.cpp
|
||||
|
||||
# the library search path.
|
||||
Surface_la_LDFLAGS = $(libSurface_la_LDFLAGS) -module -avoid-version
|
||||
Surface_la_CPPFLAGS = $(libSurface_la_CPPFLAGS)
|
||||
|
||||
Surface_la_LIBADD = \
|
||||
$(libSurface_la_LIBADD) \
|
||||
-lSurface
|
||||
|
||||
Surface_la_DEPENDENCIES = libSurface.la
|
||||
|
||||
#--------------------------------------------------------------------------------------
|
||||
|
||||
# set the include path found by configure
|
||||
AM_CXXFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src $(all_includes)
|
||||
|
||||
libdir = $(prefix)/Mod/Surface
|
||||
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt
|
||||
24
src/Mod/Surface/App/PreCompiled.cpp
Normal file
24
src/Mod/Surface/App/PreCompiled.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
|
||||
* *
|
||||
* 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"
|
||||
65
src/Mod/Surface/App/PreCompiled.h
Normal file
65
src/Mod/Surface/App/PreCompiled.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
//#ifndef APP_PRECOMPILED_H
|
||||
//#define APP_PRECOMPILED_H
|
||||
#ifndef PRECOMPILED_H
|
||||
#define PRECOMPILED_H
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
// Exporting of App classes
|
||||
#ifdef FC_OS_WIN32
|
||||
# define SurfaceExport __declspec(dllexport)
|
||||
# define PartExport __declspec(dllimport)
|
||||
#else // for Linux
|
||||
# define SurfaceExport
|
||||
# define PartExport
|
||||
#endif
|
||||
|
||||
#ifdef _PreComp_
|
||||
|
||||
// standard
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
// STL
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// Xerces
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
#endif //_PreComp_
|
||||
|
||||
#endif
|
||||
|
||||
13
src/Mod/Surface/CMakeLists.txt
Normal file
13
src/Mod/Surface/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
add_subdirectory(App)
|
||||
if(FREECAD_BUILD_GUI)
|
||||
add_subdirectory(Gui)
|
||||
endif(FREECAD_BUILD_GUI)
|
||||
|
||||
install(
|
||||
FILES
|
||||
Init.py
|
||||
InitGui.py
|
||||
DESTINATION
|
||||
Mod/Surface
|
||||
)
|
||||
66
src/Mod/Surface/Gui/AppSurfaceGui.cpp
Normal file
66
src/Mod/Surface/Gui/AppSurfaceGui.cpp
Normal file
@@ -0,0 +1,66 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 <Python.h>
|
||||
#endif
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Gui/Application.h>
|
||||
|
||||
#include "Workbench.h"
|
||||
//#include "ViewProviderCut.h"
|
||||
|
||||
// use a different name to CreateCommand()
|
||||
void CreateSurfaceCommands(void);
|
||||
|
||||
|
||||
/* registration table */
|
||||
extern struct PyMethodDef SurfaceGui_methods[];
|
||||
|
||||
PyDoc_STRVAR(module_SurfaceGui_doc,
|
||||
"This module is the SurfaceGui module.");
|
||||
|
||||
|
||||
/* Python entry */
|
||||
extern "C" {
|
||||
void PartGuiExport initSurfaceGui()
|
||||
{
|
||||
if (!Gui::Application::Instance) {
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
|
||||
return;
|
||||
}
|
||||
|
||||
// instanciating the commands
|
||||
CreateSurfaceCommands();
|
||||
SurfaceGui::Workbench::init();
|
||||
|
||||
// SurfaceGui::ViewProviderCut::init();
|
||||
|
||||
(void) Py_InitModule3("SurfaceGui", SurfaceGui_methods, module_SurfaceGui_doc); /* mod name, table ptr */
|
||||
Base::Console().Log("Loading GUI of Surface module... done\n");
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
35
src/Mod/Surface/Gui/AppSurfaceGuiPy.cpp
Normal file
35
src/Mod/Surface/Gui/AppSurfaceGuiPy.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 <Base/Console.h>
|
||||
#include <Base/Exception.h>
|
||||
|
||||
/* registration table */
|
||||
struct PyMethodDef SurfaceGui_methods[] = {
|
||||
{NULL, NULL} /* end of table marker */
|
||||
};
|
||||
54
src/Mod/Surface/Gui/CMakeLists.txt
Normal file
54
src/Mod/Surface/Gui/CMakeLists.txt
Normal file
@@ -0,0 +1,54 @@
|
||||
if(MSVC)
|
||||
add_definitions(-DHAVE_ACOSH -DHAVE_ATANH -DHAVE_ASINH)
|
||||
else(MSVC)
|
||||
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
|
||||
endif(MSVC)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${COIN3D_INCLUDE_DIR}
|
||||
${OCC_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
${SOQT_INCLUDE_DIR}
|
||||
${QT_INCLUDE_DIR}
|
||||
${XERCESC_INCLUDE_DIR}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(SurfaceGui_LIBS
|
||||
Surface
|
||||
FreeCADGui
|
||||
)
|
||||
|
||||
qt4_add_resources(Surface_QRC_SRCS Resources/Surface.qrc)
|
||||
|
||||
SET(SurfaceGui_SRCS
|
||||
${Surface_QRC_SRCS}
|
||||
AppSurfaceGui.cpp
|
||||
AppSurfaceGuiPy.cpp
|
||||
Command.cpp
|
||||
PreCompiled.cpp
|
||||
PreCompiled.h
|
||||
Workbench.cpp
|
||||
Workbench.h
|
||||
# ViewProviderCut.cpp
|
||||
# ViewProviderCut.h
|
||||
)
|
||||
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
add_library(SurfaceGui SHARED ${SurfaceGui_SRCS})
|
||||
target_link_libraries(SurfaceGui ${SurfaceGui_LIBS})
|
||||
|
||||
fc_target_copy_resource(SurfaceGui
|
||||
${CMAKE_SOURCE_DIR}/src/Mod/Surface
|
||||
${CMAKE_BINARY_DIR}/Mod/Surface
|
||||
InitGui.py)
|
||||
|
||||
SET_BIN_DIR(SurfaceGui SurfaceGui /Mod/Surface)
|
||||
SET_PYTHON_PREFIX_SUFFIX(SurfaceGui)
|
||||
|
||||
install(TARGETS SurfaceGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
150
src/Mod/Surface/Gui/Command.cpp
Normal file
150
src/Mod/Surface/Gui/Command.cpp
Normal file
@@ -0,0 +1,150 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 <QString>
|
||||
# include <QDir>
|
||||
# include <QFileInfo>
|
||||
# include <QLineEdit>
|
||||
# include <QPointer>
|
||||
# include <Standard_math.hxx>
|
||||
# include <TopoDS_Shape.hxx>
|
||||
# include <TopExp_Explorer.hxx>
|
||||
# include <Inventor/events/SoMouseButtonEvent.h>
|
||||
#endif
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <App/Document.h>
|
||||
//#include <Gui/Application.h>
|
||||
//#include <Gui/Command.h>
|
||||
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/Control.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/FileDialog.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <Gui/Selection.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
#include <Gui/WaitCursor.h>
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
|
||||
|
||||
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
//===========================================================================
|
||||
// CmdSurfaceFILLING THIS IS THE SURFACE FILLING COMMAND
|
||||
//===========================================================================
|
||||
DEF_STD_CMD(CmdSurfaceFilling);
|
||||
|
||||
CmdSurfaceFilling::CmdSurfaceFilling()
|
||||
:Command("Surface_Filling")
|
||||
{
|
||||
sAppModule = "Surface";
|
||||
sGroup = QT_TR_NOOP("Surface");
|
||||
sMenuText = QT_TR_NOOP("Surface Filling function");
|
||||
sToolTipText = QT_TR_NOOP("Fills a series of boundary curves, constraint curves and verticies with a surface.");
|
||||
sWhatsThis = QT_TR_NOOP("Surface Filling function");
|
||||
sStatusTip = QT_TR_NOOP("Surface Filling function");
|
||||
sPixmap = "Filling.svg";
|
||||
sAccel = "CTRL+H";
|
||||
}
|
||||
|
||||
void CmdSurfaceFilling::activated(int iMsg)
|
||||
{
|
||||
Base::Console().Message("Hello, World!\n");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// CmdSurfaceCut THIS IS THE SURFACE CUT COMMAND
|
||||
//===========================================================================
|
||||
DEF_STD_CMD(CmdSurfaceCut);
|
||||
|
||||
CmdSurfaceCut::CmdSurfaceCut()
|
||||
:Command("Surface_Cut")
|
||||
{
|
||||
sAppModule = "Surface";
|
||||
sGroup = QT_TR_NOOP("Surface");
|
||||
sMenuText = QT_TR_NOOP("Surface Cut function");
|
||||
sToolTipText = QT_TR_NOOP("Cuts a Shape with another Shape.\nReturns a modified version of the first shape");
|
||||
sWhatsThis = QT_TR_NOOP("Surface Cut function");
|
||||
sStatusTip = QT_TR_NOOP("Surface Cut function");
|
||||
sPixmap = "Cut.svg";
|
||||
sAccel = "CTRL+H";
|
||||
}
|
||||
|
||||
void CmdSurfaceCut::activated(int iMsg)
|
||||
{
|
||||
/* std::vector<Gui::SelectionObject> Sel = getSelection().getSelectionEx(0, Part::Feature::getClassTypeId());
|
||||
if (Sel.size() != 2) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Invalid selection"),
|
||||
QObject::tr("Select two shapes please."));
|
||||
return;
|
||||
}
|
||||
|
||||
bool askUser = false;
|
||||
for (std::vector<Gui::SelectionObject>::iterator it = Sel.begin(); it != Sel.end(); ++it) {
|
||||
App::DocumentObject* obj = it->getObject();
|
||||
if (obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
|
||||
const TopoDS_Shape& shape = static_cast<Part::Feature*>(obj)->Shape.getValue();
|
||||
if (!PartGui::checkForSolids(shape) && !askUser) {
|
||||
int ret = QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Non-solids selected"),
|
||||
QObject::tr("The use of non-solids for boolean operations may lead to unexpected results.\n"
|
||||
"Do you want to continue?"), QMessageBox::Yes, QMessageBox::No);
|
||||
if (ret == QMessageBox::No)
|
||||
return;
|
||||
askUser = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string FeatName = getUniqueObjectName("Cut");
|
||||
std::string BaseName = Sel[0].getFeatName();
|
||||
std::string ToolName = Sel[1].getFeatName();
|
||||
|
||||
openCommand("Part Cut");
|
||||
doCommand(Doc,"App.activeDocument().addObject(\"Part::Cut\",\"%s\")",FeatName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().%s.Base = App.activeDocument().%s",FeatName.c_str(),BaseName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().%s.Tool = App.activeDocument().%s",FeatName.c_str(),ToolName.c_str());
|
||||
doCommand(Gui,"Gui.activeDocument().hide('%s')",BaseName.c_str());
|
||||
doCommand(Gui,"Gui.activeDocument().hide('%s')",ToolName.c_str());
|
||||
copyVisual(FeatName.c_str(), "ShapeColor", BaseName.c_str());
|
||||
copyVisual(FeatName.c_str(), "DisplayMode", BaseName.c_str());
|
||||
updateActive();
|
||||
commitCommand();*/
|
||||
}
|
||||
|
||||
void CreateSurfaceCommands(void)
|
||||
{
|
||||
Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||
rcCmdMgr.addCommand(new CmdSurfaceFilling());
|
||||
rcCmdMgr.addCommand(new CmdSurfaceCut());
|
||||
}
|
||||
79
src/Mod/Surface/Gui/Makefile.am
Normal file
79
src/Mod/Surface/Gui/Makefile.am
Normal file
@@ -0,0 +1,79 @@
|
||||
|
||||
lib_LTLIBRARIES=libSurfaceGui.la SurfaceGui.la
|
||||
|
||||
BUILT_SOURCES=
|
||||
|
||||
libSurfaceGui_la_SOURCES=\
|
||||
AppSurfaceGuiPy.cpp \
|
||||
Command.cpp \
|
||||
PreCompiled.cpp \
|
||||
PreCompiled.h \
|
||||
Workbench.cpp \
|
||||
Workbench.h
|
||||
|
||||
includedir = @includedir@/Mod/Surface/Gui
|
||||
|
||||
# the library search path.
|
||||
libSurfaceGui_la_LDFLAGS = -L../../../Base -L../../../App -L../../../Gui -L../App \
|
||||
$(QT_LIBS) $(all_libraries) \
|
||||
$(sim_ac_coin_ldflags) $(sim_ac_coin_libs) \
|
||||
$(sim_ac_soqt_ldflags) $(sim_ac_soqt_libs) \
|
||||
-version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
|
||||
|
||||
libSurfaceGui_la_CPPFLAGS = -DSurfaceAppExport= -DSurfaceGuiExport=
|
||||
|
||||
libSurfaceGui_la_LIBADD = \
|
||||
@BOOST_SYSTEM_LIB@ \
|
||||
-l@PYTHON_LIB@ \
|
||||
-lxerces-c \
|
||||
-lFreeCADBase \
|
||||
-lFreeCADApp \
|
||||
-lFreeCADGui \
|
||||
-lSurface
|
||||
|
||||
#--------------------------------------------------------------------------------------
|
||||
# Loader of libSurfaceGui
|
||||
|
||||
SurfaceGui_la_SOURCES=\
|
||||
AppSurfaceGui.cpp
|
||||
|
||||
# the library search path.
|
||||
SurfaceGui_la_LDFLAGS = $(libSurfaceGui_la_LDFLAGS) -module -avoid-version
|
||||
SurfaceGui_la_CPPFLAGS = $(libSurfaceGui_la_CPPFLAGS)
|
||||
|
||||
SurfaceGui_la_LIBADD = \
|
||||
$(libSurfaceGui_la_LIBADD) \
|
||||
-lSurfaceGui
|
||||
|
||||
SurfaceGui_la_DEPENDENCIES = libSurfaceGui.la
|
||||
|
||||
#--------------------------------------------------------------------------------------
|
||||
|
||||
# rule for Qt MetaObject Compiler:
|
||||
moc_%.cpp: %.h
|
||||
$(QT_MOC) $< -o $(@F)
|
||||
|
||||
# rule for Qt MetaObject Compiler:
|
||||
%.moc: %.h
|
||||
$(QT_MOC) $< -o $(@F)
|
||||
|
||||
# rules for Qt User Interface Compiler:
|
||||
ui_%.h: %.ui
|
||||
$(QT_UIC) $< -o $(@F)
|
||||
|
||||
# rules for Qt Resource Compiler:
|
||||
qrc_%.cpp: Resources/%.qrc
|
||||
$(QT_RCC) -name $(*F) $< -o $(@F)
|
||||
|
||||
# set the include path found by configure
|
||||
AM_CXXFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src $(all_includes) $(QT_CXXFLAGS) \
|
||||
-I$(sim_ac_coin_includedir) -I$(sim_ac_soqt_includedir)
|
||||
|
||||
libdir = $(prefix)/Mod/Surface
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
EXTRA_DIST = \
|
||||
CMakeLists.txt \
|
||||
Resources/Surface.qrc
|
||||
|
||||
24
src/Mod/Surface/Gui/PreCompiled.cpp
Normal file
24
src/Mod/Surface/Gui/PreCompiled.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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"
|
||||
81
src/Mod/Surface/Gui/PreCompiled.h
Normal file
81
src/Mod/Surface/Gui/PreCompiled.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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_PRECOMPILED_H
|
||||
#define GUI_PRECOMPILED_H
|
||||
|
||||
/*#include <FCConfig.h>
|
||||
|
||||
// Importing of App classes
|
||||
#ifdef FC_OS_WIN32
|
||||
# define SurfaceAppExport __declspec(dllimport)
|
||||
# define SurfaceGuiExport __declspec(dllexport)
|
||||
#else // for Linux
|
||||
# define SurfaceAppExport
|
||||
# define SurfaceGuiExport
|
||||
#endif*/
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
// Importing of App classes
|
||||
#ifdef FC_OS_WIN32
|
||||
# define PartExport __declspec(dllimport)
|
||||
# define PartGuiExport __declspec(dllimport)
|
||||
#else // for Linux
|
||||
# define PartExport
|
||||
# define PartGuiExport
|
||||
#endif
|
||||
|
||||
#ifdef _PreComp_
|
||||
|
||||
// standard
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
|
||||
// STL
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// Xerces
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
#ifdef FC_OS_WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
// Qt Toolkit
|
||||
#ifndef __Qt4All__
|
||||
# include <Gui/Qt4All.h>
|
||||
#endif
|
||||
|
||||
#endif //_PreComp_
|
||||
|
||||
#endif // GUI_PRECOMPILED_H
|
||||
9
src/Mod/Surface/Gui/Resources/Surface.qrc
Normal file
9
src/Mod/Surface/Gui/Resources/Surface.qrc
Normal file
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>icons/BezSurf.svg</file>
|
||||
<file>icons/BSplineSurf.svg</file>
|
||||
<file>icons/Cut.svg</file>
|
||||
<file>icons/Filling.svg</file>
|
||||
<file>icons/Sewing.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
307
src/Mod/Surface/Gui/Resources/icons/BSplineSurf.svg
Normal file
307
src/Mod/Surface/Gui/Resources/icons/BSplineSurf.svg
Normal file
@@ -0,0 +1,307 @@
|
||||
<?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="svg3364"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Surface_Tools_Bspline_Surface_5.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1"
|
||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/surface_tools/Surface_Tools_Bezierspline_Surface_5_16px.png"
|
||||
inkscape:export-xdpi="22.5"
|
||||
inkscape:export-ydpi="22.5">
|
||||
<defs
|
||||
id="defs3366">
|
||||
<linearGradient
|
||||
id="linearGradient3814">
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3816" />
|
||||
<stop
|
||||
id="stop3818"
|
||||
offset="0.21823955"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.50523484"
|
||||
id="stop3822" />
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3820" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3864">
|
||||
<stop
|
||||
id="stop3866"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3868"
|
||||
offset="1"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient2571"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-215.02413,-170.90186)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3352"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<linearGradient
|
||||
id="linearGradient3593">
|
||||
<stop
|
||||
style="stop-color:#c8e0f9;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3595" />
|
||||
<stop
|
||||
style="stop-color:#637dca;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3597" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3354"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<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="perspective3372" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3369"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-461.81066,-173.06271)"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3372"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3375"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3380"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3914"
|
||||
x1="6.94525"
|
||||
y1="36.838673"
|
||||
x2="48.691113"
|
||||
y2="36.838673"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3792"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)"
|
||||
x1="6.8300767"
|
||||
y1="34.146042"
|
||||
x2="48.691113"
|
||||
y2="36.838673" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3812"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3814"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3816"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864-1"
|
||||
id="linearGradient3828-2"
|
||||
x1="20.383333"
|
||||
y1="32.634235"
|
||||
x2="52.726578"
|
||||
y2="32.634235"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3864-1">
|
||||
<stop
|
||||
id="stop3866-6"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.5"
|
||||
id="stop3812" />
|
||||
<stop
|
||||
id="stop3868-7"
|
||||
offset="1"
|
||||
style="stop-color:#71b2f8;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.328125"
|
||||
inkscape:cx="18.413181"
|
||||
inkscape:cy="32"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="995"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3369">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:#5c7ddb;fill-opacity:1;stroke:#0f118e;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 2.6293891,23.803361 15.865371,50.209369 C 31.117829,11.342981 44.076973,62.386103 56.629264,27.681511 L 40.939304,7.3982223 C 32.507325,35.593058 17.707155,-1.5947189 2.6293891,23.803361 z"
|
||||
id="path3820-1"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#ff0900;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 15.86537,49.871451 C 33.063625,9.8522263 42.029288,63.98341 56.74156,27.794151"
|
||||
id="path3864"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#ff0900;fill-opacity:1;stroke:none"
|
||||
id="path3810"
|
||||
sodipodi:cx="13.664865"
|
||||
sodipodi:cy="44.799999"
|
||||
sodipodi:rx="4.0936937"
|
||||
sodipodi:ry="3.9783783"
|
||||
d="m 17.758558,44.799999 a 4.0936937,3.9783783 0 1 1 -8.1873872,0 4.0936937,3.9783783 0 1 1 8.1873872,0 z"
|
||||
transform="matrix(1.3167245,0,0,1.3590175,38.65451,-32.18069)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#ff0900;fill-opacity:1;stroke:none"
|
||||
id="path4478"
|
||||
sodipodi:cx="13.664865"
|
||||
sodipodi:cy="44.799999"
|
||||
sodipodi:rx="4.0936937"
|
||||
sodipodi:ry="3.9783783"
|
||||
d="m 17.758558,44.799999 a 4.0936937,3.9783783 0 1 1 -8.1873872,0 4.0936937,3.9783783 0 1 1 8.1873872,0 z"
|
||||
transform="matrix(1.3167245,0,0,1.3590175,-1.770433,-12.555879)" />
|
||||
<path
|
||||
transform="matrix(1.3167245,0,0,1.3590175,19.835752,-23.339118)"
|
||||
d="m 17.758558,44.799999 a 4.0936937,3.9783783 0 1 1 -8.1873872,0 4.0936937,3.9783783 0 1 1 8.1873872,0 z"
|
||||
sodipodi:ry="3.9783783"
|
||||
sodipodi:rx="4.0936937"
|
||||
sodipodi:cy="44.799999"
|
||||
sodipodi:cx="13.664865"
|
||||
id="path4518"
|
||||
style="fill:#ff0900;fill-opacity:1;stroke:none"
|
||||
sodipodi:type="arc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 10 KiB |
329
src/Mod/Surface/Gui/Resources/icons/BezSurf.svg
Normal file
329
src/Mod/Surface/Gui/Resources/icons/BezSurf.svg
Normal file
@@ -0,0 +1,329 @@
|
||||
<?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="svg3364"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Surface_Tools_Bezierspline_Surface_5.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1"
|
||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/surface_tools/Surface_Tools_Bezierspline_Surface_5_16px.png"
|
||||
inkscape:export-xdpi="22.5"
|
||||
inkscape:export-ydpi="22.5">
|
||||
<defs
|
||||
id="defs3366">
|
||||
<linearGradient
|
||||
id="linearGradient3814">
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3816" />
|
||||
<stop
|
||||
id="stop3818"
|
||||
offset="0.21823955"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.50523484"
|
||||
id="stop3822" />
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3820" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3864">
|
||||
<stop
|
||||
id="stop3866"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3868"
|
||||
offset="1"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient2571"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-215.02413,-170.90186)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3352"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<linearGradient
|
||||
id="linearGradient3593">
|
||||
<stop
|
||||
style="stop-color:#c8e0f9;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3595" />
|
||||
<stop
|
||||
style="stop-color:#637dca;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3597" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3354"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<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="perspective3372" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3369"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-461.81066,-173.06271)"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3372"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3375"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3380"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3914"
|
||||
x1="6.94525"
|
||||
y1="36.838673"
|
||||
x2="48.691113"
|
||||
y2="36.838673"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3792"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)"
|
||||
x1="6.8300767"
|
||||
y1="34.146042"
|
||||
x2="48.691113"
|
||||
y2="36.838673" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3812"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3814"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3816"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864-1"
|
||||
id="linearGradient3828-2"
|
||||
x1="20.383333"
|
||||
y1="32.634235"
|
||||
x2="52.726578"
|
||||
y2="32.634235"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3864-1">
|
||||
<stop
|
||||
id="stop3866-6"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.5"
|
||||
id="stop3812" />
|
||||
<stop
|
||||
id="stop3868-7"
|
||||
offset="1"
|
||||
style="stop-color:#71b2f8;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.328125"
|
||||
inkscape:cx="18.413181"
|
||||
inkscape:cy="32"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="995"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3369">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:#5c7ddb;fill-opacity:1;stroke:#0f118e;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 2.6293891,23.803361 15.865371,50.209369 C 31.117829,11.342981 44.076973,62.386103 56.629264,27.681511 L 40.939304,7.3982223 C 32.507325,35.593058 17.707155,-1.5947189 2.6293891,23.803361 z"
|
||||
id="path3820-1"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#ff0900;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 15.86537,49.871451 C 33.063625,9.8522263 42.029288,63.98341 56.74156,27.794151"
|
||||
id="path3864"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 17.527928,44.246003 22.654418,27.00439"
|
||||
id="path3865"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 48.432433,51.395554 56.735135,28.217175"
|
||||
id="path3867"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
transform="matrix(1.3167245,0,0,1.3590175,29.377856,-7.2022669)"
|
||||
d="m 17.758558,44.799999 a 4.0936937,3.9783783 0 1 1 -8.1873872,0 4.0936937,3.9783783 0 1 1 8.1873872,0 z"
|
||||
sodipodi:ry="3.9783783"
|
||||
sodipodi:rx="4.0936937"
|
||||
sodipodi:cy="44.799999"
|
||||
sodipodi:cx="13.664865"
|
||||
id="path3808"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#ff0900;fill-opacity:1;stroke:none"
|
||||
id="path3810"
|
||||
sodipodi:cx="13.664865"
|
||||
sodipodi:cy="44.799999"
|
||||
sodipodi:rx="4.0936937"
|
||||
sodipodi:ry="3.9783783"
|
||||
d="m 17.758558,44.799999 a 4.0936937,3.9783783 0 1 1 -8.1873872,0 4.0936937,3.9783783 0 1 1 8.1873872,0 z"
|
||||
transform="matrix(1.3167245,0,0,1.3590175,38.65451,-32.18069)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#000000;fill-opacity:1;stroke:none"
|
||||
id="path3862"
|
||||
sodipodi:cx="13.664865"
|
||||
sodipodi:cy="44.799999"
|
||||
sodipodi:rx="4.0936937"
|
||||
sodipodi:ry="3.9783783"
|
||||
d="m 17.758558,44.799999 a 4.0936937,3.9783783 0 1 1 -8.1873872,0 4.0936937,3.9783783 0 1 1 8.1873872,0 z"
|
||||
transform="matrix(1.3167245,0,0,1.3590175,4.9923938,-36.287158)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#ff0900;fill-opacity:1;stroke:none"
|
||||
id="path4478"
|
||||
sodipodi:cx="13.664865"
|
||||
sodipodi:cy="44.799999"
|
||||
sodipodi:rx="4.0936937"
|
||||
sodipodi:ry="3.9783783"
|
||||
d="m 17.758558,44.799999 a 4.0936937,3.9783783 0 1 1 -8.1873872,0 4.0936937,3.9783783 0 1 1 8.1873872,0 z"
|
||||
transform="matrix(1.3167245,0,0,1.3590175,-1.770433,-12.555879)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 11 KiB |
287
src/Mod/Surface/Gui/Resources/icons/Cut.svg
Normal file
287
src/Mod/Surface/Gui/Resources/icons/Cut.svg
Normal file
@@ -0,0 +1,287 @@
|
||||
<?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="svg3364"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Surface_Tools_Intersection_Edge_2.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1"
|
||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/surface_tools/more_stuff/Surface_Tools_Intersection_Edge_2_16px.png"
|
||||
inkscape:export-xdpi="22.5"
|
||||
inkscape:export-ydpi="22.5">
|
||||
<defs
|
||||
id="defs3366">
|
||||
<linearGradient
|
||||
id="linearGradient3814">
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3816" />
|
||||
<stop
|
||||
id="stop3818"
|
||||
offset="0.21823955"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.50523484"
|
||||
id="stop3822" />
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3820" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3864">
|
||||
<stop
|
||||
id="stop3866"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3868"
|
||||
offset="1"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient2571"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-215.02413,-170.90186)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3352"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<linearGradient
|
||||
id="linearGradient3593">
|
||||
<stop
|
||||
style="stop-color:#c8e0f9;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3595" />
|
||||
<stop
|
||||
style="stop-color:#637dca;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3597" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3354"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<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="perspective3372" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3369"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-461.81066,-173.06271)"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3372"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3375"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3380"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3914"
|
||||
x1="6.94525"
|
||||
y1="36.838673"
|
||||
x2="48.691113"
|
||||
y2="36.838673"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3792"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)"
|
||||
x1="6.8300767"
|
||||
y1="34.146042"
|
||||
x2="48.691113"
|
||||
y2="36.838673" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3812"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3814"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3816"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864-1"
|
||||
id="linearGradient3828-2"
|
||||
x1="20.383333"
|
||||
y1="32.634235"
|
||||
x2="52.726578"
|
||||
y2="32.634235"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3864-1">
|
||||
<stop
|
||||
id="stop3866-6"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.5"
|
||||
id="stop3812" />
|
||||
<stop
|
||||
id="stop3868-7"
|
||||
offset="1"
|
||||
style="stop-color:#71b2f8;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.328125"
|
||||
inkscape:cx="30.945501"
|
||||
inkscape:cy="32.130746"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="995"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3369">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
id="g3030"
|
||||
transform="translate(2.9942692,9.9637069)">
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3820-1"
|
||||
d="M 2.6293891,23.803361 15.865371,50.209369 C 31.117829,11.342981 44.076973,62.386103 56.629264,27.681511 L 40.939304,7.3982223 C 32.507325,35.593058 17.707155,-1.5947189 2.6293891,23.803361 z"
|
||||
style="fill:#5c7ddb;fill-opacity:1;stroke:#0f118e;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;stroke:#ff0900;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 11.556779,45.52737 C 25.874345,17.995849 46.026224,54.568317 51.379491,27.104519"
|
||||
id="path3764"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="opacity:0.32758627;fill:#ff0900;fill-opacity:1;stroke:none"
|
||||
d="M 2.7648989,53.899744 2.6544545,19.188008 61.036201,2.7903111 60.996946,30.595019 57.113068,32.052606 52.904728,26.453157 C 52.876498,52.317496 21.44976,15.973163 10.904636,47.263908 l 1.078103,2.355076 z"
|
||||
id="path3241"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.4 KiB |
303
src/Mod/Surface/Gui/Resources/icons/Filling.svg
Normal file
303
src/Mod/Surface/Gui/Resources/icons/Filling.svg
Normal file
@@ -0,0 +1,303 @@
|
||||
<?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="svg3364"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Surface_Tools_Fill_From_Edges_1.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1"
|
||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/surface_tools/more_stuff/Surface_Tools_Fill_From_Edges_1_32px.png"
|
||||
inkscape:export-xdpi="45"
|
||||
inkscape:export-ydpi="45">
|
||||
<defs
|
||||
id="defs3366">
|
||||
<linearGradient
|
||||
id="linearGradient3814">
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3816" />
|
||||
<stop
|
||||
id="stop3818"
|
||||
offset="0.21823955"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.50523484"
|
||||
id="stop3822" />
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3820" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3864">
|
||||
<stop
|
||||
id="stop3866"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3868"
|
||||
offset="1"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient2571"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-215.02413,-170.90186)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3352"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<linearGradient
|
||||
id="linearGradient3593">
|
||||
<stop
|
||||
style="stop-color:#c8e0f9;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3595" />
|
||||
<stop
|
||||
style="stop-color:#637dca;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3597" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3354"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<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="perspective3372" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3369"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-461.81066,-173.06271)"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3372"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3375"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3380"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3914"
|
||||
x1="6.94525"
|
||||
y1="36.838673"
|
||||
x2="48.691113"
|
||||
y2="36.838673"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3792"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)"
|
||||
x1="6.8300767"
|
||||
y1="34.146042"
|
||||
x2="48.691113"
|
||||
y2="36.838673" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3812"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3814"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3816"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864-1"
|
||||
id="linearGradient3828-2"
|
||||
x1="20.383333"
|
||||
y1="32.634235"
|
||||
x2="52.726578"
|
||||
y2="32.634235"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3864-1">
|
||||
<stop
|
||||
id="stop3866-6"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.5"
|
||||
id="stop3812" />
|
||||
<stop
|
||||
id="stop3868-7"
|
||||
offset="1"
|
||||
style="stop-color:#71b2f8;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.328125"
|
||||
inkscape:cx="32"
|
||||
inkscape:cy="32"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="995"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3369">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
id="g3040"
|
||||
transform="translate(-0.97338403,-7.3814956)">
|
||||
<g
|
||||
transform="translate(2.9942692,9.9637069)"
|
||||
id="g3030">
|
||||
<path
|
||||
style="fill:#5c7ddb;fill-opacity:1;stroke:#0f118e;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 2.6293891,23.803361 15.865371,50.209369 C 31.117829,11.342981 44.076973,62.386103 56.629264,27.681511 L 40.939304,7.3982223 C 32.507325,35.593058 17.707155,-1.5947189 2.6293891,23.803361 z"
|
||||
id="path3820-1"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
</g>
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3764"
|
||||
d="M 18.857159,59.884784 C 35.11937,21.946164 46.60822,72.405245 59.409909,38.21732"
|
||||
style="fill:none;stroke:#ff0900;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<path
|
||||
style="fill:none;stroke:#ff0900;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 5.7164749,34.820145 C 20.034041,7.2886246 35.319,45.321168 43.430188,17.532909"
|
||||
id="path3034"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#ff0900;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 18.776044,59.884784 5.7115567,34.972707"
|
||||
id="path3036"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3038"
|
||||
d="M 59.577058,37.821413 43.673534,17.451794"
|
||||
style="fill:none;stroke:#ff0900;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 10 KiB |
281
src/Mod/Surface/Gui/Resources/icons/Sewing.svg
Normal file
281
src/Mod/Surface/Gui/Resources/icons/Sewing.svg
Normal file
@@ -0,0 +1,281 @@
|
||||
<?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="svg3364"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Surface_Tools_sew_1.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1"
|
||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/surface_tools/more_stuff/Surface_Tools_sew_1_16px.png"
|
||||
inkscape:export-xdpi="22.5"
|
||||
inkscape:export-ydpi="22.5">
|
||||
<defs
|
||||
id="defs3366">
|
||||
<linearGradient
|
||||
id="linearGradient3814">
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3816" />
|
||||
<stop
|
||||
id="stop3818"
|
||||
offset="0.21823955"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.50523484"
|
||||
id="stop3822" />
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3820" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3864">
|
||||
<stop
|
||||
id="stop3866"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3868"
|
||||
offset="1"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient2571"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-215.02413,-170.90186)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3352"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<linearGradient
|
||||
id="linearGradient3593">
|
||||
<stop
|
||||
style="stop-color:#c8e0f9;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3595" />
|
||||
<stop
|
||||
style="stop-color:#637dca;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3597" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3354"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<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="perspective3372" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3369"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-461.81066,-173.06271)"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3372"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3375"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3380"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3914"
|
||||
x1="6.94525"
|
||||
y1="36.838673"
|
||||
x2="48.691113"
|
||||
y2="36.838673"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3792"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)"
|
||||
x1="6.8300767"
|
||||
y1="34.146042"
|
||||
x2="48.691113"
|
||||
y2="36.838673" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3812"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3814"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3816"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864-1"
|
||||
id="linearGradient3828-2"
|
||||
x1="20.383333"
|
||||
y1="32.634235"
|
||||
x2="52.726578"
|
||||
y2="32.634235"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3864-1">
|
||||
<stop
|
||||
id="stop3866-6"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.5"
|
||||
id="stop3812" />
|
||||
<stop
|
||||
id="stop3868-7"
|
||||
offset="1"
|
||||
style="stop-color:#71b2f8;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.328125"
|
||||
inkscape:cx="17.358682"
|
||||
inkscape:cy="32.130746"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="995"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3369">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
id="g3030"
|
||||
transform="translate(2.5075772,3.717826)">
|
||||
<path
|
||||
sodipodi:nodetypes="ccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path3820-1"
|
||||
d="M 1.2504284,24.208938 13.513026,54.02179 C 28.38708,17.993434 44.715449,64.492341 57.278187,29.709394 L 39.479228,2.4501868 C 31.047249,30.645023 16.328194,-1.1891422 1.2504284,24.208938 z"
|
||||
style="fill:#5c7ddb;fill-opacity:1;stroke:#0f118e;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;stroke:#0f118e;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="M 9.4904943,41.368822 C 25.602438,11.43807 42.568392,50.102478 50.697085,19.629912"
|
||||
id="path3032"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.9 KiB |
281
src/Mod/Surface/Gui/Resources/icons/Surface.svg
Normal file
281
src/Mod/Surface/Gui/Resources/icons/Surface.svg
Normal file
@@ -0,0 +1,281 @@
|
||||
<?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="svg3364"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Surface_Tools_Workbench_3.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1"
|
||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/surface_tools/more_stuff/Surface_Tools_Workbench_3_16px.png"
|
||||
inkscape:export-xdpi="22.5"
|
||||
inkscape:export-ydpi="22.5">
|
||||
<defs
|
||||
id="defs3366">
|
||||
<linearGradient
|
||||
id="linearGradient3814">
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3816" />
|
||||
<stop
|
||||
id="stop3818"
|
||||
offset="0.27319029"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.62831503"
|
||||
id="stop3822" />
|
||||
<stop
|
||||
style="stop-color:#71b2f8;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3820" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3864">
|
||||
<stop
|
||||
id="stop3866"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3868"
|
||||
offset="1"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient2571"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-215.02413,-170.90186)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3352"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<linearGradient
|
||||
id="linearGradient3593">
|
||||
<stop
|
||||
style="stop-color:#c8e0f9;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3595" />
|
||||
<stop
|
||||
style="stop-color:#637dca;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3597" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3354"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428"
|
||||
gradientTransform="translate(-0.1767767,-2.6516504)" />
|
||||
<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="perspective3372" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3369"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.6258409,0.5434973,-8.8819886e-2,0.2656996,-461.81066,-173.06271)"
|
||||
cx="342.58258"
|
||||
cy="27.256668"
|
||||
fx="342.58258"
|
||||
fy="27.256668"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3372"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3375"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3380"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3914"
|
||||
x1="6.94525"
|
||||
y1="36.838673"
|
||||
x2="48.691113"
|
||||
y2="36.838673"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="linearGradient3792"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-4.8699606,-2.3863162)"
|
||||
x1="6.8300767"
|
||||
y1="34.146042"
|
||||
x2="48.691113"
|
||||
y2="36.838673" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3812"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-287.81791,-28.143054)"
|
||||
cx="330.63791"
|
||||
cy="39.962704"
|
||||
fx="330.63791"
|
||||
fy="39.962704"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3593"
|
||||
id="radialGradient3814"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0012324,0,0,0.9421773,-327.50313,-4.3316646)"
|
||||
cx="345.28433"
|
||||
cy="15.560534"
|
||||
fx="345.28433"
|
||||
fy="15.560534"
|
||||
r="19.571428" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864"
|
||||
id="radialGradient3816"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.9829174,1.3240854,-1.2330051,0.8105158,-131.04134,-483.74563)"
|
||||
cx="320.44025"
|
||||
cy="113.23357"
|
||||
fx="320.44025"
|
||||
fy="113.23357"
|
||||
r="19.571428" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3864-1"
|
||||
id="linearGradient3828-2"
|
||||
x1="20.383333"
|
||||
y1="32.634235"
|
||||
x2="52.726578"
|
||||
y2="32.634235"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient3864-1">
|
||||
<stop
|
||||
id="stop3866-6"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#002795;stop-opacity:1;"
|
||||
offset="0.5"
|
||||
id="stop3812" />
|
||||
<stop
|
||||
id="stop3868-7"
|
||||
offset="1"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
gradientTransform="matrix(0.97382749,0,0,0.97679383,-16.999788,24.343455)"
|
||||
y2="5.5175142"
|
||||
x2="63.67384"
|
||||
y1="18.997772"
|
||||
x1="44.79789"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient3845"
|
||||
xlink:href="#linearGradient3814"
|
||||
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.328125"
|
||||
inkscape:cx="19.467681"
|
||||
inkscape:cy="32"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="995"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3369">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:url(#linearGradient3845);fill-opacity:1;stroke:#0f118e;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 4.089465,27.453551 15.18275,25.838201 C 29.286194,26.73456 49.250839,57.680348 60.036108,30.763894 L 42.56161,10.156144 C 31.242931,28.661919 10.308791,9.0212675 4.089465,27.453551 z"
|
||||
id="path3820-1"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.8 KiB |
78
src/Mod/Surface/Gui/Workbench.cpp
Normal file
78
src/Mod/Surface/Gui/Workbench.cpp
Normal file
@@ -0,0 +1,78 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 "Workbench.h"
|
||||
#include <Gui/MenuManager.h>
|
||||
#include <Gui/ToolBarManager.h>
|
||||
|
||||
using namespace SurfaceGui;
|
||||
|
||||
/// @namespace SurfaceGui @class Workbench
|
||||
TYPESYSTEM_SOURCE(SurfaceGui::Workbench, Gui::StdWorkbench)
|
||||
|
||||
Workbench::Workbench()
|
||||
{
|
||||
}
|
||||
|
||||
Workbench::~Workbench()
|
||||
{
|
||||
}
|
||||
|
||||
Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
{
|
||||
|
||||
Gui::MenuItem* root = StdWorkbench::setupMenuBar();
|
||||
Gui::MenuItem* item = root->findItem( "&Windows" );
|
||||
|
||||
Gui::MenuItem* make = new Gui::MenuItem;
|
||||
root->insertItem( item, make );
|
||||
make->setCommand("MakeSurface");
|
||||
*make << "Surface_Filling";
|
||||
|
||||
Gui::MenuItem* mod = new Gui::MenuItem;
|
||||
root->insertItem( item, mod );
|
||||
mod->setCommand("ModSurface");
|
||||
*mod << "Surface_Cut";
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
{
|
||||
Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
|
||||
|
||||
Gui::ToolBarItem* make = new Gui::ToolBarItem(root);
|
||||
make->setCommand( "MakeSurface" );
|
||||
*make << "Surface_Filling";
|
||||
|
||||
Gui::ToolBarItem* mod = new Gui::ToolBarItem(root);
|
||||
mod->setCommand( "ModSurface" );
|
||||
*mod << "Surface_Cut";
|
||||
|
||||
return root;
|
||||
}
|
||||
47
src/Mod/Surface/Gui/Workbench.h
Normal file
47
src/Mod/Surface/Gui/Workbench.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2014 Nathan Miller <Nathan.A.Mill[at]gmail.com> *
|
||||
* *
|
||||
* 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 Surface_WORKBENCH_H
|
||||
#define Surface_WORKBENCH_H
|
||||
|
||||
#include <Gui/Workbench.h>
|
||||
|
||||
namespace SurfaceGui {
|
||||
|
||||
class Workbench : public Gui::StdWorkbench
|
||||
{
|
||||
TYPESYSTEM_HEADER();
|
||||
|
||||
public:
|
||||
Workbench();
|
||||
virtual ~Workbench();
|
||||
|
||||
protected:
|
||||
Gui::MenuItem* setupMenuBar() const;
|
||||
Gui::ToolBarItem* setupToolBars() const;
|
||||
};
|
||||
|
||||
} // namespace SurfaceGui
|
||||
|
||||
|
||||
#endif // Surface_WORKBENCH_H
|
||||
30
src/Mod/Surface/Gui/qrc_Surface.cxx
Normal file
30
src/Mod/Surface/Gui/qrc_Surface.cxx
Normal file
@@ -0,0 +1,30 @@
|
||||
/****************************************************************************
|
||||
** Resource object code
|
||||
**
|
||||
** Created: Tue Aug 5 22:27:13 2014
|
||||
** by: The Resource Compiler for Qt version 4.8.1
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
||||
int QT_MANGLE_NAMESPACE(qInitResources_Surface)()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_Surface))
|
||||
|
||||
int QT_MANGLE_NAMESPACE(qCleanupResources_Surface)()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
Q_DESTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qCleanupResources_Surface))
|
||||
|
||||
2
src/Mod/Surface/Init.py
Normal file
2
src/Mod/Surface/Init.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# FreeCAD init script of the Surface module
|
||||
# (c) 2001 Juergen Riegel LGPL
|
||||
87
src/Mod/Surface/InitGui.py
Normal file
87
src/Mod/Surface/InitGui.py
Normal file
@@ -0,0 +1,87 @@
|
||||
# Surface gui init module
|
||||
# (c) 2001 Juergen Riegel LGPL
|
||||
|
||||
class SurfaceWorkbench ( Workbench ):
|
||||
"Surface workbench object"
|
||||
Icon = """
|
||||
/* XPM */
|
||||
static char * Surface_Tools_Workbench_Main_xpm[] = {
|
||||
"16 16 48 1",
|
||||
" c None",
|
||||
". c #171D96",
|
||||
"+ c #1A229B",
|
||||
"@ c #222CA1",
|
||||
"# c #181D95",
|
||||
"$ c #232DA2",
|
||||
"% c #3344B3",
|
||||
"& c #2A36A9",
|
||||
"* c #181C96",
|
||||
"= c #181B94",
|
||||
"- c #161C96",
|
||||
"; c #4961C8",
|
||||
"> c #5776D5",
|
||||
", c #192098",
|
||||
"' c #171C96",
|
||||
") c #394DB9",
|
||||
"! c #5C7DDB",
|
||||
"~ c #5B7BDA",
|
||||
"{ c #465FC5",
|
||||
"] c #384AB5",
|
||||
"^ c #4D67CB",
|
||||
"/ c #4D67CC",
|
||||
"( c #171D97",
|
||||
"_ c #3D51BC",
|
||||
": c #181E96",
|
||||
"< c #181E97",
|
||||
"[ c #4961C7",
|
||||
"} c #1B2099",
|
||||
"| c #1F269E",
|
||||
"1 c #506DCF",
|
||||
"2 c #516ED0",
|
||||
"3 c #171F96",
|
||||
"4 c #4861C8",
|
||||
"5 c #5A7BDA",
|
||||
"6 c #2631A5",
|
||||
"7 c #191E97",
|
||||
"8 c #181F99",
|
||||
"9 c #1B229A",
|
||||
"0 c #445AC3",
|
||||
"a c #597AD9",
|
||||
"b c #1F279E",
|
||||
"c c #2E3BAD",
|
||||
"d c #181D97",
|
||||
"e c #192097",
|
||||
"f c #181D98",
|
||||
"g c #181F97",
|
||||
"h c #3C51BC",
|
||||
"i c #10128F",
|
||||
" ",
|
||||
" ",
|
||||
" .. ",
|
||||
" +@ ",
|
||||
" #$%&*= -;>, ",
|
||||
" ')!!!~{]^!!/( ",
|
||||
" '!!!!!!!!!!!_: ",
|
||||
" <[!!!!!!!!!!!} ",
|
||||
" |!!!!11!!!!23 ",
|
||||
" :4!567890!ab ",
|
||||
" |!c def ",
|
||||
" gh( ",
|
||||
" i ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
"""
|
||||
MenuText = "Surface"
|
||||
ToolTip = "Surface workbench: Create and edit complex surfaces"
|
||||
def Initialize(self):
|
||||
# load the module
|
||||
import SurfaceGui
|
||||
import FreeCADGui
|
||||
|
||||
# Set path to icon labels
|
||||
FreeCADGui.addIconPath('./Gui/Resources/Icons/')
|
||||
def GetClassName(self):
|
||||
return "SurfaceGui::Workbench"
|
||||
|
||||
Gui.addWorkbench(SurfaceWorkbench())
|
||||
10
src/Mod/Surface/Makefile.am
Normal file
10
src/Mod/Surface/Makefile.am
Normal file
@@ -0,0 +1,10 @@
|
||||
SUBDIRS=App Gui
|
||||
|
||||
# Change data dir from default ($(prefix)/share) to $(prefix)
|
||||
datadir = $(prefix)/Mod/Surface
|
||||
data_DATA = Init.py InitGui.py
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(data_DATA) \
|
||||
CMakeLists.txt \
|
||||
Surface.dox
|
||||
3
src/Mod/Surface/Surface.dox
Normal file
3
src/Mod/Surface/Surface.dox
Normal file
@@ -0,0 +1,3 @@
|
||||
/** \defgroup TEMPLATE Surface
|
||||
* \ingroup WORKBENCHES */
|
||||
|
||||
Reference in New Issue
Block a user