Skip to content
mkraska edited this page Nov 23, 2024 · 6 revisions

[txt, isOK]: fb_bar(o, n, i, flags)

  • txt feedback text
  • isOK flag for test result
  • o list of objects
  • n names field
  • i index of bar object
  • flags optional string with further instructions
    • T means accept tensile forces only.
    • 2 means test for antiparallel forces close to both ends.

Source

This function provides feedback on "force" reactions replacing a "bar" object in the framework of Feedback for Free Body Diagrams.

Checks done by the fb_bar():

  • Is the object deactivated?
  • Any forces with matching name?
  • For one-sided cut:
    • force parallel to bar?
    • if check for tensile/compressive definition, then check this.
  • For double-sided cut (as might be required in trusswork, not yet implemented):
    • forces of identical name?
    • forces parallel to bar?
    • forces antiparallel?
    • if check for tensile/compressive definition, then check this.

Typical PRT

Feedback variables:

obj: stackjson_parse(objects);
[text, isOK]: fb_bar(obj, names, i1, "T");
[ntext,nOK]: fb_bar_name(obj, names, i1);

PRT node

Node 1: Algebraic test for isOK = true and feedback of {@text@} for both branches. Node 2: Algebraic test for nOK = true and feedback of {@ntext@} for both branches.

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