From 89a77b18eee3d9c6fcc4170b80be9eb1cc3f81f1 Mon Sep 17 00:00:00 2001 From: Nicogene Date: Fri, 5 Apr 2024 14:42:16 +0200 Subject: [PATCH] Cleanup spaces/tabs --- src/creo2urdf/src/Creo2Urdf.cpp | 26 +++++++++++++------------- src/creo2urdf/src/main.cpp | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/creo2urdf/src/Creo2Urdf.cpp b/src/creo2urdf/src/Creo2Urdf.cpp index 1714030..b6ad8e4 100644 --- a/src/creo2urdf/src/Creo2Urdf.cpp +++ b/src/creo2urdf/src/Creo2Urdf.cpp @@ -20,15 +20,15 @@ void Creo2Urdf::OnCommand() { pfcSession_ptr session_ptr = pfcGetProESession(); if (!session_ptr) { - printToMessageWindow("Failed to get the session", c2uLogLevel::WARN); - return; - } + printToMessageWindow("Failed to get the session", c2uLogLevel::WARN); + return; + } if (!m_asm_model_ptr) { m_asm_model_ptr = session_ptr->GetCurrentModel(); if (!m_asm_model_ptr) { - printToMessageWindow("Failed to get the current model", c2uLogLevel::WARN); - return; - } + printToMessageWindow("Failed to get the current model", c2uLogLevel::WARN); + return; + } } @@ -43,8 +43,8 @@ void Creo2Urdf::OnCommand() { // YAML file path if (m_yaml_path.empty()) { - m_yaml_path = string(session_ptr->UIOpenFile(yaml_file_open_option)); - } + m_yaml_path = string(session_ptr->UIOpenFile(yaml_file_open_option)); + } if (!loadYamlConfig(m_yaml_path)) { printToMessageWindow("Failed to run Creo2Urdf!", c2uLogLevel::WARN); @@ -52,10 +52,10 @@ void Creo2Urdf::OnCommand() { } // CSV file path if (m_csv_path.empty()) { - auto csv_file_open_option = pfcFileOpenOptions::Create("*.csv"); - csv_file_open_option->SetDialogLabel("Select the csv"); - m_csv_path = string(session_ptr->UIOpenFile(csv_file_open_option)); - } + auto csv_file_open_option = pfcFileOpenOptions::Create("*.csv"); + csv_file_open_option->SetDialogLabel("Select the csv"); + m_csv_path = string(session_ptr->UIOpenFile(csv_file_open_option)); + } rapidcsv::Document joints_csv_table(m_csv_path, rapidcsv::LabelParams(0, 0)); // Output folder path if (m_output_path.empty()) { @@ -239,7 +239,7 @@ void Creo2Urdf::OnCommand() { if (joint_info.second.type == JointType::Revolute) { joint_sh_ptr = std::make_shared(); dynamic_cast(joint_sh_ptr.get())->setAxis(iDynTree::Axis(axis, parent_H_child.getPosition())); - } + } else if (joint_info.second.type == JointType::Linear) { joint_sh_ptr = std::make_shared(); dynamic_cast(joint_sh_ptr.get())->setAxis(iDynTree::Axis(axis, parent_H_child.getPosition())); diff --git a/src/creo2urdf/src/main.cpp b/src/creo2urdf/src/main.cpp index 7cf3514..2d902bb 100644 --- a/src/creo2urdf/src/main.cpp +++ b/src/creo2urdf/src/main.cpp @@ -24,8 +24,8 @@ ProError evaluateBatchMode(const std::string& asm_path, const std::string& yaml_ pfcBaseSession* session = pfcGetProESession(); if (!session) { ProTKPrintf("Creo2Urdf: impossible to retrieve the session"); - return PRO_TK_GENERAL_ERROR; - } + return PRO_TK_GENERAL_ERROR; + } pfcModel_ptr asm_model_ptr{ nullptr };