Added spring boundary condition
This commit is contained in:
@@ -394,6 +394,30 @@ void ViewProviderFemConstraint::updateArrow(const SoNode* node, const int idx, c
|
||||
updateCylinder(sep, idx+CONE_CHILDREN+PLACEMENT_CHILDREN, length-radius, radius/5);
|
||||
}
|
||||
|
||||
#define SPRING_CHILDREN (CUBE_CHILDREN + PLACEMENT_CHILDREN + CYLINDER_CHILDREN)
|
||||
|
||||
void ViewProviderFemConstraint::createSpring(SoSeparator* sep, const double length, const double width)
|
||||
{
|
||||
createCube(sep, width, width, length/2);
|
||||
createPlacement(sep, SbVec3f(0, -length/2, 0), SbRotation());
|
||||
createCylinder(sep, length/2, width/4);
|
||||
}
|
||||
|
||||
SoSeparator* ViewProviderFemConstraint::createSpring(const double length, const double width)
|
||||
{
|
||||
SoSeparator* sep = new SoSeparator();
|
||||
createSpring(sep, length, width);
|
||||
return sep;
|
||||
}
|
||||
|
||||
void ViewProviderFemConstraint::updateSpring(const SoNode* node, const int idx, const double length, const double width)
|
||||
{
|
||||
const SoSeparator* sep = static_cast<const SoSeparator*>(node);
|
||||
updateCube(sep, idx, width, width, length/2);
|
||||
updatePlacement(sep, idx+CUBE_CHILDREN, SbVec3f(0, -length/2, 0), SbRotation());
|
||||
updateCylinder(sep, idx+CUBE_CHILDREN+PLACEMENT_CHILDREN, length/2, width/4);
|
||||
}
|
||||
|
||||
#define FIXED_CHILDREN (CONE_CHILDREN + PLACEMENT_CHILDREN + CUBE_CHILDREN)
|
||||
|
||||
void ViewProviderFemConstraint::createFixed(SoSeparator* sep, const double height, const double width, const bool gap)
|
||||
|
||||
Reference in New Issue
Block a user