Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New UI - clean #56

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c06dfa9
parsing a wecSimInputFile.m and instantiating some objects
dav-og Oct 23, 2023
d516b56
add functions to run simulation and automatically save body positions
dav-og Oct 27, 2023
80c76d2
adding some console outputs
dav-og Oct 27, 2023
d292413
Update demo_rm3_irreg_waves_wsio.cpp
dav-og Nov 8, 2023
811b739
add wec-sim examples
dav-og Nov 14, 2023
6c0440e
include LinSpringDampers and nonhydro bodies
dav-og Nov 14, 2023
fdb3292
save PTO data
dav-og Nov 14, 2023
a37be24
improve viz options and data saving
dav-og Nov 15, 2023
c2ffc00
fixed bods, rev joints, quiet mode, nicer output
dav-og Nov 17, 2023
396c5b2
improved viz, outputs & fixing rev joint
dav-og Nov 17, 2023
c306ef6
include ground body, add some debugging checks
dav-og Nov 23, 2023
9b37bea
refactoring new ui code - breaking up main, following GSG C++
dav-og Nov 24, 2023
3df859f
refactoring whole ui
dav-og Nov 24, 2023
a5ef09f
remove 'wecsim_examples' folder (now 'examples/wsi')
dav-og Nov 27, 2023
737869c
rename main ui file
dav-og Nov 27, 2023
f5f4f83
added some wec-sim example models
dav-og Nov 27, 2023
618c813
parsing a wecSimInputFile.m and instantiating some objects
dav-og Oct 23, 2023
b007d4f
add functions to run simulation and automatically save body positions
dav-og Oct 27, 2023
7ed93a0
adding some console outputs
dav-og Oct 27, 2023
a8585da
Update demo_rm3_irreg_waves_wsio.cpp
dav-og Nov 8, 2023
96ef6c3
add wec-sim examples
dav-og Nov 14, 2023
35b5c62
include LinSpringDampers and nonhydro bodies
dav-og Nov 14, 2023
2fb59f0
save PTO data
dav-og Nov 14, 2023
3a8f5a1
improve viz options and data saving
dav-og Nov 15, 2023
fbc0841
fixed bods, rev joints, quiet mode, nicer output
dav-og Nov 17, 2023
18614ea
improved viz, outputs & fixing rev joint
dav-og Nov 17, 2023
19da732
include ground body, add some debugging checks
dav-og Nov 23, 2023
4021240
refactoring new ui code - breaking up main, following GSG C++
dav-og Nov 24, 2023
5af6a0a
refactoring whole ui
dav-og Nov 24, 2023
47f4a9d
remove 'wecsim_examples' folder (now 'examples/wsi')
dav-og Nov 27, 2023
c27b266
rename main ui file
dav-og Nov 27, 2023
9317e47
include pretension in PTOConfig
dav-og Mar 5, 2024
4da34ab
Update get_started.md
dav-og Mar 7, 2024
8bdb7bf
Update get_started.md
dav-og Mar 7, 2024
d580e50
fixed some typos in get_started.md
dav-og Mar 7, 2024
41a54af
Update demo_hydrochrono_wsi.cpp
dav-og Mar 29, 2024
9bae078
Merge branch 'main' into new-ui-clean
dav-og Jul 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
include pretension in PTOConfig
  • Loading branch information
dav-og committed Mar 5, 2024
commit 9317e47b6e2e0d53a2e681f2d1278a4123757914
11 changes: 7 additions & 4 deletions demos/demo_hydrochrono_wsi.cpp
Original file line number Diff line number Diff line change
@@ -66,10 +66,11 @@ struct PTOConfig {

// Optional fields for specific joint types
// For linear spring-damper
double rest_length_; // Rest length of the spring
double spring_radius_ = 0.5; // Radius of the spring (for visualization)
int spring_resolution_ = 1280; // Resolution of the spring shape
int spring_turns_ = 16; // Number of turns in the spring shape
std::optional<double> rest_length_; // Rest length of the spring
double spring_radius_ = 0.5; // Radius of the spring (for visualization)
int spring_resolution_ = 1280; // Resolution of the spring shape
int spring_turns_ = 16; // Number of turns in the spring shape
std::optional<double> pretension_; // Pre-tension in the spring

// For rotational PTO
ChVector<> rotation_axis_ = ChVector<>(0, 0, 1); // Default rotation axis
@@ -467,6 +468,8 @@ std::vector<PTOConfig> ParsePTOConfig(const std::string& file_name) {
current_config.location_ = ExtractAndAssignVector(line);
} else if (line.find(".restLength = ") != std::string::npos) {
current_config.rest_length_ = ExtractAndAssignDouble(line, ".restLength = ");
} else if (line.find(".pretension = ") != std::string::npos) {
current_config.pretension_ = ExtractAndAssignDouble(line, ".pretension = ");
}
}
// Save the last parsed config