Merge branch 'master' of ssh://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad into sanguinariojoe-ship

This commit is contained in:
Jose Luis Cercós pita 2012-06-21 18:20:47 +02:00
commit e6b3fa22d4
19 changed files with 99 additions and 17 deletions

View File

@ -353,7 +353,9 @@ endif(FREECAD_LIBPACK_USE)
# copy build convenient files for M$
if(WIN32)
configure_file(BuildAll.bat ${CMAKE_BINARY_DIR}/BuildAll.bat COPYONLY)
if (EXISTS BuildAll.bat)
configure_file(BuildAll.bat ${CMAKE_BINARY_DIR}/BuildAll.bat COPYONLY)
endif (EXISTS BuildAll.bat)
#configure_file(BuildAllNice.bat ${CMAKE_BINARY_DIR}/BuildAllNice.bat COPYONLY)
endif(WIN32)

View File

@ -63,6 +63,11 @@
#include "SMESHDS_Mesh.hxx"
#include "SMESHDS_GroupBase.hxx"
#include <cmath>
#ifndef PI
#define PI M_PI
#endif
/*
AUXILIARY METHODS

View File

@ -82,6 +82,10 @@
#include <numeric>
#include <limits>
#ifndef PI
#define PI M_PI
#endif
#define cast2Node(elem) static_cast<const SMDS_MeshNode*>( elem )
using namespace std;

View File

@ -74,6 +74,11 @@
#include "SMESH_subMesh.hxx"
#include "utilities.h"
#include <cmath>
#ifndef PI
#define PI M_PI
#endif
using namespace std;

View File

@ -37,6 +37,11 @@
#include <TopExp.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <cmath>
#ifndef PI
#define PI M_PI
#endif
using namespace std;

View File

@ -56,6 +56,11 @@
#include <list>
#include <set>
#include <vector>
#include <cmath>
#ifndef PI
#define PI M_PI
#endif
#ifdef _DEBUG_

View File

@ -47,6 +47,11 @@ typedef NCollection_Array1<TColStd_SequenceOfInteger> StdMeshers_Array1OfSequenc
#include <SMESH_Array1.hxx>
typedef SMESH_Array1<TColStd_SequenceOfInteger> StdMeshers_Array1OfSequenceOfInteger;
#endif
#include <cmath>
#ifndef PI
#define PI M_PI
#endif
//=======================================================================
//function : StdMeshers_QuadToTriaAdaptor

View File

@ -54,6 +54,11 @@
#include <TColgp_SequenceOfPnt2d.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <cmath>
#ifndef PI
#define PI M_PI
#endif
using namespace std;

View File

@ -23,6 +23,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Python.h>
# include <QApplication>
# include <QClipboard>
# include <QMutex>
@ -30,7 +31,6 @@
# include <QSysInfo>
# include <QTextStream>
# include <QWaitCondition>
# include <Python.h>
# include <Inventor/C/basic.h>
# include <Inventor/Qt/SoQtBasic.h>
#endif

View File

@ -2416,16 +2416,17 @@ class _Wire:
for v in shape.Vertexes: p.append(v.Point)
if fp.Points != p: fp.Points = p
elif fp.Base and fp.Tool:
if ('Shape' in fp.Base.PropertiesList) and ('Shape' in fp.Tool.PropertiesList):
sh1 = fp.Base.Shape.copy()
sh2 = fp.Tool.Shape.copy()
shape = sh1.fuse(sh2)
if DraftGeomUtils.isCoplanar(shape.Faces):
shape = DraftGeomUtils.concatenate(shape)
fp.Shape = shape
p = []
for v in shape.Vertexes: p.append(v.Point)
if fp.Points != p: fp.Points = p
if fp.Base.isDerivedFrom("Part::Feature") and fp.Tool.isDerivedFrom("Part::Feature"):
if (not fp.Base.Shape.isNull()) and (not fp.Tool.Shape.isNull()):
sh1 = fp.Base.Shape.copy()
sh2 = fp.Tool.Shape.copy()
shape = sh1.fuse(sh2)
if DraftGeomUtils.isCoplanar(shape.Faces):
shape = DraftGeomUtils.concatenate(shape)
fp.Shape = shape
p = []
for v in shape.Vertexes: p.append(v.Point)
if fp.Points != p: fp.Points = p
elif fp.Points:
if fp.Points[0] == fp.Points[-1]:
if not fp.Closed: fp.Closed = True
@ -2857,9 +2858,13 @@ class _Clone:
if hasattr(obj,"Scale") and not sh.isNull():
m.scale(obj.Scale)
sh = sh.transformGeometry(m)
shapes.append(sh)
if not sh.isNull():
shapes.append(sh)
if shapes:
obj.Shape = Part.makeCompound(shapes)
if len(shapes) == 1:
obj.Shape = shapes[0]
else:
obj.Shape = Part.makeCompound(shapes)
if not DraftGeomUtils.isNull(pl):
obj.Placement = pl

View File

@ -6,6 +6,7 @@ SET(Idf_SRCS
SOURCE_GROUP("" FILES ${Idf_SRCS})
SET(IdfLibs_SRCS
lib/License.txt
lib/0603_SMD.stp
lib/0805_SMD.stp
lib/1206_SMD.stp

View File

@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <BRepAlgoAPI_BooleanOperation.hxx>
# include <BRepCheck_Analyzer.hxx>
# include <memory>
#endif
@ -82,13 +83,20 @@ App::DocumentObjectExecReturn *Boolean::execute(void)
if (resShape.IsNull()) {
return new App::DocumentObjectExecReturn("Resulting shape is invalid");
}
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part/Boolean");
if (hGrp->GetBool("CheckModel", false)) {
BRepCheck_Analyzer aChecker(resShape);
if (! aChecker.IsValid() ) {
return new App::DocumentObjectExecReturn("Resulting shape is invalid");
}
}
std::vector<ShapeHistory> history;
history.push_back(buildHistory(*mkBool.get(), TopAbs_FACE, resShape, BaseShape));
history.push_back(buildHistory(*mkBool.get(), TopAbs_FACE, resShape, ToolShape));
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part/Boolean");
if (hGrp->GetBool("RefineModel", false)) {
TopoDS_Shape oldShape = resShape;
BRepBuilderAPI_RefineModel mkRefine(oldShape);

View File

@ -25,6 +25,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <BRepAlgoAPI_Common.hxx>
# include <BRepCheck_Analyzer.hxx>
# include <Standard_Failure.hxx>
#endif
@ -112,6 +113,12 @@ App::DocumentObjectExecReturn *MultiCommon::execute(void)
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part/Boolean");
if (hGrp->GetBool("CheckModel", false)) {
BRepCheck_Analyzer aChecker(resShape);
if (! aChecker.IsValid() ) {
return new App::DocumentObjectExecReturn("Resulting shape is invalid");
}
}
if (hGrp->GetBool("RefineModel", false)) {
TopoDS_Shape oldShape = resShape;
BRepBuilderAPI_RefineModel mkRefine(oldShape);

View File

@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <BRepAlgoAPI_Fuse.hxx>
# include <BRepCheck_Analyzer.hxx>
# include <Standard_Failure.hxx>
#endif
@ -111,6 +112,12 @@ App::DocumentObjectExecReturn *MultiFuse::execute(void)
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part/Boolean");
if (hGrp->GetBool("CheckModel", false)) {
BRepCheck_Analyzer aChecker(resShape);
if (! aChecker.IsValid() ) {
return new App::DocumentObjectExecReturn("Resulting shape is invalid");
}
}
if (hGrp->GetBool("RefineModel", false)) {
TopoDS_Shape oldShape = resShape;
BRepBuilderAPI_RefineModel mkRefine(oldShape);

View File

@ -70,6 +70,7 @@ void DlgSettingsGeneral::saveSettings()
break;
}
ui->checkBooleanRefine->onSave();
ui->checkBooleanCheck->onSave();
}
void DlgSettingsGeneral::loadSettings()
@ -79,6 +80,7 @@ void DlgSettingsGeneral::loadSettings()
int unit = hGrp->GetInt("Unit", 0);
ui->comboBoxUnits->setCurrentIndex(unit);
ui->checkBooleanRefine->onRestore();
ui->checkBooleanCheck->onRestore();
}
/**

View File

@ -87,6 +87,19 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="Gui::PrefCheckBox" name="checkBooleanCheck">
<property name="text">
<string>Automatically check model after boolean operation</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>CheckModel</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Part/Boolean</cstring>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@ -108,6 +108,7 @@ SET(Robot_Scripts
RobotExampleTrajectoryOutOfShapes.py
)
if (EXISTS ${CMAKE_SOURCE_DIR}/src/Mod/Robot/Lib/Kuka)
SET(Robot_Resources
Lib/Kuka/kr500_1.wrl
Lib/Kuka/kr500_1.csv
@ -122,6 +123,7 @@ SET(Robot_Resources
Lib/Kuka/kr_125.csv
Lib/Kuka/kr125_2.pdf
)
endif ()
add_library(Robot SHARED ${Robot_SRCS})
target_link_libraries(Robot ${Robot_LIBS})

View File

@ -250,7 +250,7 @@ def main():
if o in ("-b", "--bindir"):
bindir = a
vcs=[Subversion(), BazaarControl(), GitControl(), MercurialControl(), DebianChangelog(), UnknownControl()]
vcs=[GitControl(), BazaarControl(), Subversion(), MercurialControl(), DebianChangelog(), UnknownControl()]
for i in vcs:
if i.extractInfo(srcdir):
# Open the template file and the version file

View File

@ -34,6 +34,7 @@ def main():
gitattr.write("zipios++ export-ignore\n")
gitattr.write("Pivy-0.5 export-ignore\n")
gitattr.write("Pivy export-ignore\n")
gitattr.write("Kuka export-ignore\n")
gitattr.close()
# revision number