Skip to content

Commit

Permalink
Fixed Results folder for Mini Golf
Browse files Browse the repository at this point in the history
  • Loading branch information
smiller01985 committed Apr 28, 2022
1 parent 15ae898 commit e3fcea7
Show file tree
Hide file tree
Showing 18 changed files with 83 additions and 1,845 deletions.
Binary file modified CFL_Core/Libraries/Contact_Forces_Lib.slx
Binary file not shown.
Binary file added CFL_Core/Libraries/Images/Contact_Images.pptx
Binary file not shown.
Binary file modified CFL_Core/Libraries/Parts_Lib.slx
Binary file not shown.
10 changes: 10 additions & 0 deletions CFL_Core/Scripts_Data/Doc/CFL_publish_all_scripts.m
@@ -0,0 +1,10 @@
% Copyright 2014-2020 The MathWorks, Inc.

ds_list = dir('*Contact*.m');
for ds_i = 1:length(ds_list)
publish(ds_list(ds_i).name);
HTMLfilename = strrep(ds_list(ds_i).name,'.m','.html');
movefile(['./html/' HTMLfilename],['./' HTMLfilename]);
end
rmdir('html');
clear ds_list ds_i HTMLfilename
@@ -0,0 +1,34 @@
%% Simscape Multibody Contact Forces Library
%
% <html>
% <span style="font-family:Arial">
% <span style="font-size:10pt">
% <tr><b><u>Library Overview</u></b><br>
% <tr>1. <a href="matlab:web('Contact_Forces_Library_Use.html');">Using the Library</a><br>
% <tr>2. <a href="matlab:cd(fileparts(which('Contact_Forces_Lib.slx')));Contact_Forces_Lib;">Library</a><br>
% <tr>3. Forces: <a href="matlab:web('Force_Laws.html');">Laws</a><br>
% <tr>....1. Basic 2D:<br>
% <tr>.......a. Circle-to-Circle Force: <a href="matlab:web('Circle_to_Circle_Contact.html');">Description</a><br>
% <tr>.......b. Circle-to-Finite Line Force: <a href="matlab:web('Circle_to_Finite_Line_Contact.html');">Description</a><br>
% <tr>.......c. Circle-to-Ring Force: <a href="matlab:web('Circle_to_Ring_Contact.html');">Description</a><br>
% <tr>....2. Composite 2D:<br>
% <tr>.......a. Box-to-Box Force: <a href="matlab:web('Box_to_Box_Contact.html');">Description</a><br>
% <tr>.......b. Box-to-Belt Force: <a href="matlab:web('Box_to_Belt_Contact.html');">Description</a><br>
% <tr>....3. Basic 3D:<br>
% <tr>.......a. Sphere-to-Sphere Force: <a href="matlab:web('Sphere_to_Sphere_Contact.html');">Description</a><br>
% <tr>.......b. Sphere-in-Sphere Force: <a href="matlab:web('Sphere_in_Sphere_Contact.html');">Description</a><br>
% <tr>.......c. Sphere-to-Plane Force: <a href="matlab:web('Sphere_to_Plane_Contact.html');">Description</a><br>
% <tr>.......d. Sphere-to-Tube Force: <a href="matlab:web('Sphere_to_Tube_Contact.html');">Description</a><br>
% <tr>.......e. Sphere-to-Cone Force: <a href="matlab:web('Sphere_to_Cone_Contact.html');">Description</a><br>
% <tr>4. Friction Force: <a href="matlab:web('Friction_Laws.html');">Laws</a><br>
% <br>
% <tr><b><u>Test Models</u></b><br>
% <tr>1. Disks in Box (2D): <a href="matlab:cd(fileparts(which('Test2D_Disks_in_Box.slx')));Test2D_Disks_in_Box;">Model</a><br>
% <tr>2. Balls in Box (3D): <a href="matlab:cd(fileparts(which('Test3D_Balls_in_Box.slx')));Test3D_Balls_in_Box;">Model</a><br>
% <br>
% </style>
% </style>
% </html>
%
% Copyright 2014-2020 The MathWorks(TM), Inc.

Binary file not shown.
Binary file modified CFL_Core/Test_Models/Test2D_Disks_in_Box.slx
Binary file not shown.
Binary file modified CFL_Core/Test_Models/Test3D_Balls_in_Box.slx
Binary file not shown.
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="e758491f-dede-4c34-ae7d-553888133829" />
</Category>
</Info>
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="e758491f-dede-4c34-ae7d-553888133829" />
</Category>
</Info>
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="e758491f-dede-4c34-ae7d-553888133829" />
</Category>
</Info>
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="e758491f-dede-4c34-ae7d-553888133829" />
</Category>
</Info>
5 changes: 5 additions & 0 deletions Examples/2D/Mini_Golf/Results/README_run_course.txt
@@ -0,0 +1,5 @@
Run MATLAB script Mini_Golf_Run_Course.m
That code will run each hole and save the path of the ball
on each hole to this folder as a MATLAB figure.

Copyright 2012-2022 The MathWorks(TM), Inc.
4 changes: 2 additions & 2 deletions Examples/2D/Mini_Golf/Scripts_Data/Mini_Golf_Run_Course.m
@@ -1,5 +1,5 @@
% RUN COURSE AND SAVE RESULTS IN EXCEL FILE
% Copyright 2012-2020 The MathWorks(TM), Inc.
% Copyright 2012-2022 The MathWorks(TM), Inc.

% RETURN TO HOME DIRECTORY SO THAT FIGURES ARE SAVED IN CORRECT FOLDER
cd(Mini_Golf_Model_HomeDir);
Expand Down Expand Up @@ -35,7 +35,7 @@
MGT.SimTime(hole_i) = Elapsed_Sim_Time;

% SAVE FIGURE WINDOWS TO A FILE
saveas(gcf,['./Results/Ball_Path_' HoleList(hole_i).Name],'fig');
saveas(gcf,[pwd filesep 'Results' filesep 'Ball_Path_' HoleList(hole_i).Name],'fig');
close(gcf);
end

Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -10,6 +10,8 @@ and persistent contact (parts resting on each other).
**Please note that the Spatial Contact Force block has been added in R2019b.**
**You should see if this block meets your needs before using this library.**

**See File Exchange submission [Spatial Contact Force Examples Simscape Multibody](https://www.mathworks.com/matlabcentral/fileexchange/109680-spatial-contact-force-examples-simscape-multibody)**

You are welcome to use these models in your own projects. If you need to
include the library in your own example, I recommend you use just the
project Contact_Forces_Core.prj in subfolder Core. You can either use it
Expand Down
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="b580afb4-ad06-4060-9b24-7ee8a8cdebcd" />
</Category>
</Info>

0 comments on commit e3fcea7

Please sign in to comment.