public class FrameFem3dAttachment extends FrameAttachment
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
boolean |
debug |
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, myProps, NULL_OBJ, useCompactPathNames
COPY_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, scaleMass
addBackRefs, addBackRefs, addConnectedMasterRefs, clone, connectAttachment, connectToHierarchy, disconnectFromHierarchy, getAttachment, oneMasterActive, oneMasterNotAttached, removeBackRefs, removeBackRefs, removeConnectedMasterRefs, setSlaveAffectsStiffness, slaveAffectsStiffness
checkFlag, 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, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getAllPropertyInfo, getProperty
getChildren, hasChildren
postscan
isWritable, write
public FrameFem3dAttachment()
public FrameFem3dAttachment(Frame frame)
public FrameFem3dAttachment(Frame frame, FemModel3d fem)
public boolean isFlexible()
FrameAttachment
isFlexible
in class FrameAttachment
true
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 DynamicAttachment
updatePosStates
in class DynamicAttachmentBase
public void updateVelStates()
updateVelStates
in interface DynamicAttachment
updateVelStates
in class DynamicAttachmentBase
public void updateAttachment()
DynamicAttachmentBase
updateAttachment
in interface DynamicAttachment
updateAttachment
in class DynamicAttachmentBase
public boolean setCurrentTFW(RigidTransform3d TFW)
FrameAttachment
setCurrentTFW
in class FrameAttachment
TFW
- 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 DynamicAttachment
applyForces
in class FrameAttachment
public boolean getDerivative(double[] buf, int idx)
getDerivative
in interface DynamicAttachment
getDerivative
in class DynamicAttachmentBase
public void addMassToMasters()
addMassToMasters
in interface DynamicAttachment
addMassToMasters
in class DynamicAttachmentBase
public void getCurrentTFW(RigidTransform3d TFW)
FrameAttachment
getCurrentTFW
in class FrameAttachment
TFW
- used to return current frame pose.public void getUndeformedTFW(RigidTransform3d TFW)
FrameAttachment
getCurrentTFW()
.getUndeformedTFW
in class FrameAttachment
TFW
- 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 FrameAttachment
vel
- used to return current frame velocitydg
- if not null
, returns the velocity derivative termpublic void applyForce(Wrench wr)
FrameAttachment
applyForce
in class FrameAttachment
wr
- force to apply to the framepublic RigidTransform3d getTFM()
public double getAverageMasterMass()
getAverageMasterMass
in class FrameAttachment
public double getAverageMasterInertia()
getAverageMasterInertia
in class FrameAttachment
public void writeItems(java.io.PrintWriter pw, NumberFormat fmt, CompositeComponent ancestor) throws java.io.IOException
writeItems
in class FrameAttachment
java.io.IOException
public void getHardReferences(java.util.List<ModelComponent> refs)
ModelComponentBase
getHardReferences
in interface ModelComponent
getHardReferences
in class DynamicAttachmentBase
refs
- list to which hard references are appendedpublic void scaleDistance(double m)
m
- scaling factorpublic void transformGeometry(AffineTransform3dBase X, RigidTransform3d TFW)
transformGeometry
in class FrameAttachment
public FrameFem3dAttachment copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponent
COPY_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 DynamicAttachmentComp
copy
in interface CopyableComponent
copy
in class FrameAttachment
flags
- flags to control the copyingcopyMap
- map to possible existing instances of referenced
components