Skip to content

Commit 2f3dcd5

Browse files
authored
Merge branch 'main' into fem-constraint_section_print
2 parents 69131eb + 5b0be7f commit 2f3dcd5

File tree

557 files changed

+146453
-6906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

557 files changed

+146453
-6906
lines changed

cMake/FreeCAD_Helpers/CheckInterModuleDependencies.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ macro(CheckInterModuleDependencies)
1717
endif(${dependent})
1818
endfunction(REQUIRES_MODS)
1919

20-
REQUIRES_MODS(BUILD_ARCH BUILD_PART BUILD_MESH BUILD_DRAFT)
20+
REQUIRES_MODS(BUILD_BIM BUILD_PART BUILD_MESH BUILD_DRAFT)
2121
REQUIRES_MODS(BUILD_DRAFT BUILD_SKETCHER)
2222
REQUIRES_MODS(BUILD_DRAWING BUILD_PART BUILD_SPREADSHEET)
2323
REQUIRES_MODS(BUILD_FEM BUILD_PART)

cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ macro(InitializeFreeCADBuildOptions)
104104
option(BUILD_SANDBOX "Build the FreeCAD Sandbox module which is only for testing purposes" OFF)
105105
option(BUILD_TEMPLATE "Build the FreeCAD template module which is only for testing purposes" OFF)
106106
option(BUILD_ADDONMGR "Build the FreeCAD addon manager module" ON)
107-
option(BUILD_ARCH "Build the FreeCAD Architecture module" ON)
107+
option(BUILD_BIM "Build the FreeCAD BIM module" ON)
108108
option(BUILD_DRAFT "Build the FreeCAD draft module" ON)
109109
option(BUILD_DRAWING "Build the FreeCAD drawing module" OFF)
110110
option(BUILD_HELP "Build the FreeCAD help module" ON)

cMake/FreeCAD_Helpers/PrintFinalReport.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ macro(PrintFinalReport)
8989
value(FREECAD_USE_PYBIND11)
9090
value(FREECAD_USE_EXTERNAL_KDL)
9191
value(BUILD_ADDONMGR)
92-
value(BUILD_ARCH)
92+
value(BUILD_BIM)
9393
value(BUILD_ASSEMBLY)
9494
value(BUILD_CLOUD)
9595
value(BUILD_DRAFT)

cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake

+3-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ MACRO(PYSIDE_WRAP_RC outfiles)
262262
# we follow the tool command with in-place sed.
263263
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
264264
COMMAND "${PYSIDE_RCC_EXECUTABLE}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
265-
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
265+
# The line below sometimes catches unwanted lines too - but there is no date in the file
266+
# anymore with Qt5 RCC, so commenting it out for now...
267+
#COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
266268
MAIN_DEPENDENCY "${infile}"
267269
)
268270
endif()

src/App/Application.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2027,6 +2027,7 @@ void Application::initTypes()
20272027
App::PropertyMagneticFluxDensity ::init();
20282028
App::PropertyMagnetization ::init();
20292029
App::PropertyMass ::init();
2030+
App::PropertyMoment ::init();
20302031
App::PropertyPressure ::init();
20312032
App::PropertyPower ::init();
20322033
App::PropertyShearModulus ::init();

src/App/PropertyUnits.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,17 @@ PropertyMass::PropertyMass()
555555
setUnit(Base::Unit::Mass);
556556
}
557557

558+
//**************************************************************************
559+
// PropertyMoment
560+
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
561+
562+
TYPESYSTEM_SOURCE(App::PropertyMoment, App::PropertyQuantity)
563+
564+
PropertyMoment::PropertyMoment()
565+
{
566+
setUnit(Base::Unit::Moment);
567+
}
568+
558569
//**************************************************************************
559570
// PropertyPressure
560571
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

src/App/PropertyUnits.h

+13
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,19 @@ class AppExport PropertyMass: public PropertyQuantity
540540
~PropertyMass() override = default;
541541
};
542542

543+
/** Moment property
544+
* This is a property for representing moment. It is basically a float
545+
* property. On the Gui it has a quantity like N*m.
546+
*/
547+
class AppExport PropertyMoment: public PropertyQuantity
548+
{
549+
TYPESYSTEM_HEADER_WITH_OVERRIDE();
550+
551+
public:
552+
PropertyMoment();
553+
~PropertyMoment() override = default;
554+
};
555+
543556
/** Pressure property
544557
* This is a property for representing pressure. It basically a float
545558
* property. On the Gui it has a quantity like Pa.

src/Base/Unit.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,9 @@ QString Unit::getTypeString() const
623623
if (*this == Unit::YoungsModulus) {
624624
return QString::fromLatin1("YoungsModulus");
625625
}
626+
if (*this == Unit::Moment) {
627+
return QString::fromLatin1("Moment");
628+
}
626629

627630
return {};
628631
}
@@ -664,6 +667,7 @@ const Unit Unit::MagneticFieldStrength (-1,0,0,1);
664667
const Unit Unit::MagneticFlux (2,1,-2,-1);
665668
const Unit Unit::MagneticFluxDensity (0,1,-2,-1);
666669
const Unit Unit::Magnetization (-1,0,0,1);
670+
const Unit Unit::Moment (2, 1, -2);
667671
const Unit Unit::Pressure (-1,1,-2);
668672
const Unit Unit::Power (2, 1, -3);
669673
const Unit Unit::ShearModulus (-1,1,-2);

src/Base/Unit.h

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ class BaseExport Unit
155155
static const Unit Force;
156156
static const Unit Work;
157157
static const Unit Power;
158+
static const Unit Moment;
158159

159160
static const Unit SpecificEnergy;
160161
static const Unit ThermalConductivity;

src/Base/UnitsSchemaInternal.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,24 @@ UnitsSchemaInternal::schemaTranslate(const Quantity& quant, double& factor, QStr
272272
factor = 1e9;
273273
}
274274
}
275+
// else if (unit == Unit::Moment) {
276+
// if (UnitValue < 1e6) {
277+
// unitString = QString::fromLatin1("mNm");
278+
// factor = 1e3;
279+
// }
280+
// else if (UnitValue < 1e9) {
281+
// unitString = QString::fromLatin1("Nm");
282+
// factor = 1e6;
283+
// }
284+
// else if (UnitValue < 1e12) {
285+
// unitString = QString::fromLatin1("kNm");
286+
// factor = 1e9;
287+
// }
288+
// else {
289+
// unitString = QString::fromLatin1("MNm");
290+
// factor = 1e12;
291+
// }
292+
// }
275293
else if (unit == Unit::Power) {
276294
if (UnitValue < 1e6) {
277295
unitString = QString::fromLatin1("mW");

src/Base/UnitsSchemaMKS.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,24 @@ QString UnitsSchemaMKS::schemaTranslate(const Quantity& quant, double& factor, Q
261261
factor = 1e9;
262262
}
263263
}
264+
// else if (unit == Unit::Moment) {
265+
// if (UnitValue < 1e6) {
266+
// unitString = QString::fromLatin1("mNm");
267+
// factor = 1e3;
268+
// }
269+
// else if (UnitValue < 1e9) {
270+
// unitString = QString::fromLatin1("Nm");
271+
// factor = 1e6;
272+
// }
273+
// else if (UnitValue < 1e12) {
274+
// unitString = QString::fromLatin1("kNm");
275+
// factor = 1e9;
276+
// }
277+
// else {
278+
// unitString = QString::fromLatin1("MNm");
279+
// factor = 1e12;
280+
// }
281+
// }
264282
else if (unit == Unit::Power) {
265283
if (UnitValue < 1e6) {
266284
unitString = QString::fromLatin1("mW");
+42-92
Loading

0 commit comments

Comments
 (0)