-
Notifications
You must be signed in to change notification settings - Fork 3
Feedback for Free Body Diagrams
FBD Generic Validation Feedback
These functions are defined in fb_fbd.mac. To use them, include the macro file in the question variables
stack_include("https://raw.githubusercontent.com/mkraska/meclib/main/Maxima/fb_fbd.mac");
-
angle() angle between two directional objects
-
direction() Identify the direction of objects, e.g. for parallelity check
-
moment_of_force() Moment of a "force" object about a given point
-
parallelp() Check if two directional objects are parallel
-
fb_reactions() Check the number of reaction forces and reaction moments.
-
fb_system() Check of activation/deactivation of elements.
-
MatchByParallel() Reduce reactions in
names
to those who are parallel to the support
This is a temporary state of a function which finds duplicate names,
-
names
contents of the input field -
res
list of reserved names (perhaps used for external loads) -
user
list of indices of supports (where reactions can appear)
fb_duplicates(%_names, %_res, %_user):=block(
[%_loi: [], %_unames, %_tmp: [], %_dup: [], %_i, %_n],
/* user supplied names */
for %_i in %_user do (
if listp(%_names[%_i]) then %_loi: append(%_loi, %_names[%_i])
),
return([%_loi, true]),
%_unames: map(lambda([%_i], names[%_i]), %_loi),
/* check for duplicates */
for %_n in %_unames do (
if member(%_n,%_tmp)
then %_dup: append(%_dup, [%_n])
else %_tmp: append(%_tmp, [%_n])
),
if not emptyp(%_dup) then return([castext("Der Name \\({@%_dup[1]@}\\) tritt mehrfach auf."), false]),
["", true]
);
if a de-activated element has active forces or moments nearby, a list of indices is returned in the names
list
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