gdbaldw / BlenderAndMBDyn

Combines Blender's graphical interface and rendering capabilities with MBDyn's multi-body dynamics, aerodynamics, and aeroelastics simulation and analysis, for rapid modeling and realistic rendering of physics based multi-body simulations.
GNU General Public License v3.0
25 stars 13 forks source link

How to use 'input card'>'set' variables within Rigid_offset location coordinate fields #12

Closed timgow closed 8 years ago

timgow commented 8 years ago

Hi, I've created variables for length and mass using 'set' input cards. I've used a mass variable ok for a body but I can't see how to use the length variables within the numeric X,Y,Z fields for the Rigid_offset. Is this input option implemented? Regards, Tim

gdbaldw commented 8 years ago

Hi Tim, No, that input option it is not implemented. However, the Cantilever beam tutorial video shows how to use Blender's scaling operation to match Blender lengths to Set lengths. In that video, the initial beam length is 8, it is then scaled to a length of 1, and then because the Set value is 0.5 for the length of the beam, it is scaled in Blender by 0.5. To generalize this procedure, define the model and the Set variables with a matching characteristic length, and then each time the Set value is changed, the Blender model must be scaled appropriately. Positions and orientations are defined in the Blender 3D-VIEW, which has no access to MBDyn's Set variables. Blender does not have a parametric modeling dimension feature. All positions are defined by Blender units. -Doug

timgow commented 8 years ago

Hi Doug, Thank you for the insight into using the length variables. On a different topic, I keep worrying about the structure of the tree in Blender on the RH side; e.g. add node>Rigid offset will create a blender object that is a child of the existing 'node'. If the new blender object is already in the tree at the top level, it can still be shifted into a sub-position of the associated blender node by a BAM operation, is there a discipline here that I must follow? Is the result of a Rigid offset any different to creating a new blender object and translating it using blender grab? I appreciate that the add>node>Rigid_offset is a fine labour saving tool, I would like to understand the sequence of operations that it replaces (or has no alternative piecemeal ops). Is BAM taking care of any degree of freedom / constraint checking in the background? The models tend to run even though MBS models can easily be over-constrained when created by hand. Tim

gdbaldw commented 8 years ago

Tim, Unlike some of the other lists, the ordering of elements in the Element list box has no importance. Node definition and element ordering are decided within the script. Rigid offset is simply a way to define a position offset and orientation offset from a node. You will notice, for instance, that Rigid offsets cannot be chained (i.e. a Rigid offset to a Rigid offset is not a permissible menu option). Also, if you create a Rigid offset from a Blender object that does not define a node, then an error is reported when creating the Initial value problem, because the offset is not associated with any node. Rigid offset is necessary, and does not replace any sequence of steps. What it does provide is the ability to have an unlimited number of Elements associated with any node, and to have each of those Elements independently positioned and oriented. For example. in BAM, only one Clamp is needed for any model, because Rigid offset provides a convenient way to position and orient any Element that is grounded to the global reference frame by simply offsetting it from that Clamp. My goal was an intuitive GUI which when reasonably applied automatically creates the minimal number of necessary nodes, and properly constrains the model. One common error when creating an Initial value problem is that a Blender object that the user believes should be a node is not identified by BAM as a node. In general, the active Blender object (last object selected, or the one created by BAM) is identified as a node, and is a static node unless it has a dynamic element. If an error message says that an Object is not associated with a node, simply add a Body to that object as a quick fix to get it running and then make appropriate modifications to the model. -Doug