public class FrameFem3dAttachment extends FrameAttachment
ModelComponent.FilePathSaveType, ModelComponent.NavpanelVisibility| Modifier and Type | Field and Description |
|---|---|
boolean |
debug |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, myProps, NULL_OBJ, useCompactPathNamesCOPY_REFERENCES, REST_POSITION| Constructor and Description |
|---|
FrameFem3dAttachment() |
FrameFem3dAttachment(Frame frame) |
FrameFem3dAttachment(Frame frame,
FemModel3d fem) |
| Modifier and Type | Method and Description |
|---|---|
int |
addBilateralConstraints(SparseBlockMatrix GT,
VectorNd dg,
int numb) |
void |
addMassToMasters() |
void |
applyForce(Wrench wr)
Applies a force to this frame, in world coordinates, by propagating
it through to the underlying master bodies.
|
void |
applyForces() |
void |
computeFrame(RigidTransform3d TFM) |
void |
computeRestFrame(RigidTransform3d TFM) |
void |
computeVelocity(Twist velFM) |
FrameFem3dAttachment |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component.
|
double |
getAverageMasterInertia()
Returns the average rotational inertia of the master components as seen
by the attached frame.
|
double |
getAverageMasterMass()
Returns the average mass of the master components as seen by the attached
frame.
|
int |
getBilateralForces(VectorNd lam,
int idx) |
int |
getBilateralInfo(MechSystem.ConstraintInfo[] ginfo,
int idx) |
void |
getBilateralSizes(VectorNi sizes) |
void |
getCurrentTFW(RigidTransform3d TFW)
Returns the current pose of the attached frame, in world coordinates.
|
void |
getCurrentVel(Twist vel,
Twist dg)
Returns the current velocity of the attached frame, in frame coordinates.
|
void |
getCurrentVelX(Twist vel,
Twist dg)
For testing only ...
|
void |
getCurrentWorldVel(Twist vel,
Twist dg) |
void |
getCurrentWorldVelX(Twist vel,
Twist dg)
For testing only ...
|
boolean |
getDerivative(double[] buf,
int idx) |
FemElement3dBase |
getElement() |
void |
getHardReferences(java.util.List<ModelComponent> refs)
Appends all hard references for this component to a list.
|
FemNode[] |
getNodes() |
RigidTransform3d |
getTFM() |
void |
getUndeformedTFW(RigidTransform3d TFW)
Returns the current undeformed pose of the attached frame, in world
coordinates.
|
boolean |
isFlexible()
Indicates that this attachment is flexible.
|
void |
scaleDistance(double m)
Nothing to do for scale distance, since attachment is based
on weights.
|
int |
setBilateralForces(VectorNd lam,
double s,
int idx) |
boolean |
setCurrentTFW(RigidTransform3d TFW)
Sets the current pose of the attached frame, in world coordinates.
|
boolean |
setFromElement(RigidTransform3d T,
FemElement3dBase elem) |
void |
setFromFem(RigidTransform3d TFW,
FemModel3d fem) |
boolean |
setFromFem(RigidTransform3d TFW,
FemModel3d fem,
boolean project) |
boolean |
setFromNodes(RigidTransform3d TFW,
java.util.Collection<FemNode3d> nodes) |
boolean |
setFromNodes(RigidTransform3d TFW,
java.util.Collection<FemNode3d> nodes,
VectorNd weights) |
boolean |
setFromNodes(RigidTransform3d TFW,
FemNode3d[] nodes) |
boolean |
setFromNodes(RigidTransform3d TFW,
FemNode3d[] nodes,
double[] weights) |
void |
transformGeometry(AffineTransform3dBase X,
RigidTransform3d TFW)
Nothing to do for scale distance, since attachment is based
on weights.
|
void |
updateAttachment()
Update attachment to reflect changes in the slave state.
|
double |
updateConstraints(double t,
int flags) |
void |
updateFramePose(boolean frameRelative) |
void |
updatePosStates() |
void |
updateVelStates() |
void |
writeItems(java.io.PrintWriter pw,
NumberFormat fmt,
CompositeComponent ancestor) |
void |
zeroForces() |
getCopyReferences, getFrame, getGT, getMasterBlocks, getMasters, getSlave, invalidateMasters, isDuplicatable, mulSubGT, mulSubGTM, mulSubMG, numMasters, scaleMassaddBackRefs, addBackRefs, addConnectedMasterRefs, clone, connectAttachment, connectToHierarchy, disconnectFromHierarchy, getAttachment, oneMasterActive, oneMasterNotAttached, removeBackRefs, removeBackRefs, removeConnectedMasterRefs, setSlaveAffectsStiffness, slaveAffectsStiffnesscheckFlag, checkName, checkNameUniqueness, clearFlag, createTempFlag, getAllPropertyInfo, getChildren, getGrandParent, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, writeequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnectToHierarchy, disconnectFromHierarchy, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferencesgetAllPropertyInfo, getPropertygetChildren, hasChildrenpostscanisWritable, writepublic FrameFem3dAttachment()
public FrameFem3dAttachment(Frame frame)
public FrameFem3dAttachment(Frame frame, FemModel3d fem)
public boolean isFlexible()
FrameAttachmentisFlexible in class FrameAttachmenttrue if this attachment is flexible.public void getBilateralSizes(VectorNi sizes)
public int addBilateralConstraints(SparseBlockMatrix GT, VectorNd dg, int numb)
public int getBilateralInfo(MechSystem.ConstraintInfo[] ginfo, int idx)
public int setBilateralForces(VectorNd lam, double s, int idx)
public int getBilateralForces(VectorNd lam, int idx)
public void zeroForces()
public double updateConstraints(double t,
int flags)
public FemElement3dBase getElement()
public FemNode[] getNodes()
public boolean setFromElement(RigidTransform3d T, FemElement3dBase elem)
public boolean setFromNodes(RigidTransform3d TFW, java.util.Collection<FemNode3d> nodes, VectorNd weights)
public boolean setFromNodes(RigidTransform3d TFW, java.util.Collection<FemNode3d> nodes)
public boolean setFromNodes(RigidTransform3d TFW, FemNode3d[] nodes, double[] weights)
public boolean setFromNodes(RigidTransform3d TFW, FemNode3d[] nodes)
public void setFromFem(RigidTransform3d TFW, FemModel3d fem)
public boolean setFromFem(RigidTransform3d TFW, FemModel3d fem, boolean project)
public void updateFramePose(boolean frameRelative)
public void updatePosStates()
updatePosStates in interface DynamicAttachmentupdatePosStates in class DynamicAttachmentBasepublic void updateVelStates()
updateVelStates in interface DynamicAttachmentupdateVelStates in class DynamicAttachmentBasepublic void updateAttachment()
DynamicAttachmentBaseupdateAttachment in interface DynamicAttachmentupdateAttachment in class DynamicAttachmentBasepublic boolean setCurrentTFW(RigidTransform3d TFW)
FrameAttachmentsetCurrentTFW in class FrameAttachmentTFW - new pose for the attached frame, in world coordinatestrue if the underlying master
components have changedpublic void computeFrame(RigidTransform3d TFM)
public void computeRestFrame(RigidTransform3d TFM)
public void computeVelocity(Twist velFM)
public void applyForces()
applyForces in interface DynamicAttachmentapplyForces in class FrameAttachmentpublic boolean getDerivative(double[] buf,
int idx)
getDerivative in interface DynamicAttachmentgetDerivative in class DynamicAttachmentBasepublic void addMassToMasters()
addMassToMasters in interface DynamicAttachmentaddMassToMasters in class DynamicAttachmentBasepublic void getCurrentTFW(RigidTransform3d TFW)
FrameAttachmentgetCurrentTFW in class FrameAttachmentTFW - used to return current frame pose.public void getUndeformedTFW(RigidTransform3d TFW)
FrameAttachmentgetCurrentTFW().getUndeformedTFW in class FrameAttachmentTFW - used to return current undeformed frame pose.FrameAttachment.isFlexible()public void getCurrentVel(Twist vel, Twist dg)
FrameAttachment\dot J velmwhere
J is the matrix that maps master velocities
to the attached frame velocity (in frame coordinates), and velm
are the master velocities.getCurrentVel in class FrameAttachmentvel - used to return current frame velocitydg - if not null, returns the velocity derivative termpublic void applyForce(Wrench wr)
FrameAttachmentapplyForce in class FrameAttachmentwr - force to apply to the framepublic RigidTransform3d getTFM()
public double getAverageMasterMass()
getAverageMasterMass in class FrameAttachmentpublic double getAverageMasterInertia()
getAverageMasterInertia in class FrameAttachmentpublic void writeItems(java.io.PrintWriter pw,
NumberFormat fmt,
CompositeComponent ancestor)
throws java.io.IOException
writeItems in class FrameAttachmentjava.io.IOExceptionpublic void getHardReferences(java.util.List<ModelComponent> refs)
ModelComponentBasegetHardReferences in interface ModelComponentgetHardReferences in class DynamicAttachmentBaserefs - list to which hard references are appendedpublic void scaleDistance(double m)
m - scaling factorpublic void transformGeometry(AffineTransform3dBase X, RigidTransform3d TFW)
transformGeometry in class FrameAttachmentpublic FrameFem3dAttachment copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponentCOPY_REFERENCES
is set in flags, then any component referenced
by this component should itself be set to a copy. This
should be done first checking copyMap for an
existing copy of the referenced component. If there is no existing
copy, then a copy should be created by calling copy
recursively and adding the new copy to copyMap.copy in interface DynamicAttachmentCompcopy in interface CopyableComponentcopy in class FrameAttachmentflags - flags to control the copyingcopyMap - map to possible existing instances of referenced
components