Skip to content

Feedback for "fix1"

mkraska edited this page Mar 15, 2024 · 9 revisions

fb_fix1(o, n, i, description)

  • o list of objects
  • n names field
  • i index of fix1 object
  • description string with Text to identify the object for the user

fb_fix1_name(o, n, i)

  • o list of objects
  • n names field
  • i index of fix1 object

These functions provide Feedback for Free Body Diagrams.

Source

"fix1" is a unidirectional support. It is to be replaced by a single reaction force.

Checks done by the fb_fix1():

  • Is the object really of type "fix1" (just for developers)?
  • Is the object deactivated?
  • Has meclib found any reactions by proximity check?
  • Is there exactly one reaction?
  • Is the reaction of type "force" as opposed to "moment"?
  • Is the reaction normal to the direction of unconstrained motion?

Checks done by the fb_fix1_name():

  • Is the name a single character?
  • Does the name of the reaction match the name of the support point?

Two-node PRT

Feedback variables:

obj: stackjson_parse(objects);
[text, isOK]: fb_fix1(obj, names, i_fix1, "Loslager A: ");
[ntext, nOK]: fb_fix1_name(obj, names, i_fix1);

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).

Tryout Space

In order to try code snippets in jsfiddle,

  1. copy the code from the wiki page to the clipboard
  2. follow the link for the JSXGraph version you want to try
  3. Replace the code in the HTML section (contents of <p hidden id="init">) with the content of the clipboard
Clone this wiki locally