All: Reformat according to new standard
This commit is contained in:
committed by
Kacper Donat
parent
eafd18dac0
commit
25c3ba7338
@@ -84,9 +84,7 @@ void swapJCS(const App::DocumentObject* joint)
|
||||
}
|
||||
}
|
||||
|
||||
bool isEdgeType(const App::DocumentObject* obj,
|
||||
const std::string& elName,
|
||||
const GeomAbs_CurveType type)
|
||||
bool isEdgeType(const App::DocumentObject* obj, const std::string& elName, const GeomAbs_CurveType type)
|
||||
{
|
||||
auto* base = dynamic_cast<const PartApp::Feature*>(obj);
|
||||
if (!base) {
|
||||
@@ -102,9 +100,7 @@ bool isEdgeType(const App::DocumentObject* obj,
|
||||
return sf.GetType() == type;
|
||||
}
|
||||
|
||||
bool isFaceType(const App::DocumentObject* obj,
|
||||
const std::string& elName,
|
||||
const GeomAbs_SurfaceType type)
|
||||
bool isFaceType(const App::DocumentObject* obj, const std::string& elName, const GeomAbs_SurfaceType type)
|
||||
{
|
||||
auto* base = dynamic_cast<const PartApp::Feature*>(obj);
|
||||
if (!base) {
|
||||
@@ -537,8 +533,8 @@ App::DocumentObject* getObjFromRef(const App::DocumentObject* obj, const std::st
|
||||
const auto isBodySubObject = [](App::DocumentObject* obj) -> bool {
|
||||
// PartDesign::Point + Line + Plane + CoordinateSystem
|
||||
// getViewProviderName instead of isDerivedFrom to avoid dependency on sketcher
|
||||
const auto isDerivedFromVpSketch =
|
||||
strcmp(obj->getViewProviderName(), "SketcherGui::ViewProviderSketch") == 0;
|
||||
const auto isDerivedFromVpSketch
|
||||
= strcmp(obj->getViewProviderName(), "SketcherGui::ViewProviderSketch") == 0;
|
||||
return isDerivedFromVpSketch || obj->isDerivedFrom<PartApp::Datum>()
|
||||
|| obj->isDerivedFrom<App::DatumElement>()
|
||||
|| obj->isDerivedFrom<App::LocalCoordinateSystem>();
|
||||
@@ -645,9 +641,11 @@ App::DocumentObject* getLinkedObjFromRef(const App::DocumentObject* joint, const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
App::DocumentObject* getMovingPartFromRef(const AssemblyObject* assemblyObject,
|
||||
App::DocumentObject* obj,
|
||||
const std::string& sub)
|
||||
App::DocumentObject* getMovingPartFromRef(
|
||||
const AssemblyObject* assemblyObject,
|
||||
App::DocumentObject* obj,
|
||||
const std::string& sub
|
||||
)
|
||||
{
|
||||
if (!obj) {
|
||||
return nullptr;
|
||||
@@ -700,8 +698,10 @@ App::DocumentObject* getMovingPartFromRef(const AssemblyObject* assemblyObject,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
App::DocumentObject* getMovingPartFromRef(const AssemblyObject* assemblyObject,
|
||||
App::PropertyXLinkSub* prop)
|
||||
App::DocumentObject* getMovingPartFromRef(
|
||||
const AssemblyObject* assemblyObject,
|
||||
App::PropertyXLinkSub* prop
|
||||
)
|
||||
{
|
||||
if (!prop) {
|
||||
return nullptr;
|
||||
@@ -719,9 +719,11 @@ App::DocumentObject* getMovingPartFromRef(const AssemblyObject* assemblyObject,
|
||||
return getMovingPartFromRef(assemblyObject, obj, subs[0]);
|
||||
}
|
||||
|
||||
App::DocumentObject* getMovingPartFromRef(const AssemblyObject* assemblyObject,
|
||||
App::DocumentObject* joint,
|
||||
const char* pName)
|
||||
App::DocumentObject* getMovingPartFromRef(
|
||||
const AssemblyObject* assemblyObject,
|
||||
App::DocumentObject* joint,
|
||||
const char* pName
|
||||
)
|
||||
{
|
||||
if (!joint) {
|
||||
return nullptr;
|
||||
@@ -733,8 +735,7 @@ App::DocumentObject* getMovingPartFromRef(const AssemblyObject* assemblyObject,
|
||||
|
||||
void syncPlacements(App::DocumentObject* src, App::DocumentObject* to)
|
||||
{
|
||||
auto* plcPropSource =
|
||||
dynamic_cast<App::PropertyPlacement*>(src->getPropertyByName("Placement"));
|
||||
auto* plcPropSource = dynamic_cast<App::PropertyPlacement*>(src->getPropertyByName("Placement"));
|
||||
auto* plcPropLink = dynamic_cast<App::PropertyPlacement*>(to->getPropertyByName("Placement"));
|
||||
|
||||
if (plcPropSource && plcPropLink) {
|
||||
|
||||
Reference in New Issue
Block a user