-
Notifications
You must be signed in to change notification settings - Fork 3
Feedback for "fix12"
mkraska edited this page Sep 22, 2022
·
10 revisions
-
txt
feedback text -
isOK
test result -
o
list of objects -
n
names field -
i
index of "fix12" object -
description
string with Text to identify the object for the user
-
txt
feedback text -
isOK
test result -
o
list of objects -
n
names field -
i
index of "fix12" object
These functions provide Feedback for Free Body Diagrams.
"fix12" is a bidirectional (fixed) support. It is to be replaced by two reactions.
Checks done by the fb_fix12()
:
- Is the object really of type "fix12" (just for developers)?
- Is the object deactivated?
- Has meclib found any reactions by proximity check?
- Are there exactly two reactions?
- Are both reactions of type "force"?
- Are the names of the reactions unique (not identical)?
- Do the reactions have different directions?
Checks done by the fb_fix12_name()
(only if there are one or two reaction forces):
- Is the base name a single character?
- Does the base name match the name of the support point?
- Is there a direction index?
- Is the index a single character?
- Is the index one of x, y, h(orizontal), v(ertical)?
- Does the index match the actual direction?
Example:
-
"FBD Tutorial Festlager (I)"
-
"FBD demo (l)"
Feedback variables:
obj: stackjson_parse(objects);
[text, isOK]: fb_fix12(obj, names, i_A, "Lagerung bei A: ");
[ntext, nOK]: fb_fix12_name(obj, names, i_A);
PRT node 1 test for correct direction
Algebraic test for isOK = true
and feedback of {@text@}
for both branches.
PRT node 2 test for correct name
Algebraic test for nOK = true
and feedback of {@ntext@}
in the false
branch (with penalty of 0.5).
In order to try code snippets in jsfiddle,
- copy the code from the wiki page to the clipboard
- follow the link for the JSXGraph version you want to try
- Replace the code in the HTML section (contents of
<p hidden id="init">
) with the content of the clipboard