Minor changes to FEM constraint visuals
This commit is contained in:
parent
20fdeb3d86
commit
af43eff2c2
|
@ -44,15 +44,15 @@ PROPERTY_SOURCE(Fem::ConstraintGear, Fem::ConstraintBearing);
|
|||
|
||||
ConstraintGear::ConstraintGear()
|
||||
{
|
||||
ADD_PROPERTY(Diameter,(0));
|
||||
ADD_PROPERTY(Force,(0.0));
|
||||
ADD_PROPERTY(Diameter,(100.0));
|
||||
ADD_PROPERTY(Force,(1000.0));
|
||||
ADD_PROPERTY(ForceAngle,(0.0));
|
||||
ADD_PROPERTY_TYPE(Direction,(0),"ConstraintGear",(App::PropertyType)(App::Prop_None),
|
||||
"Element giving direction of gear force");
|
||||
ADD_PROPERTY(Reversed,(0));
|
||||
ADD_PROPERTY_TYPE(DirectionVector,(Base::Vector3f(0,1,0)),"ConstraintGear",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output),
|
||||
ADD_PROPERTY_TYPE(DirectionVector,(Base::Vector3f(1,1,1).Normalize()),"ConstraintGear",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output),
|
||||
"Direction of gear force");
|
||||
naturalDirectionVector = Base::Vector3f(0,1,0);
|
||||
naturalDirectionVector = Base::Vector3f(1,1,1).Normalize();
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *ConstraintGear::execute(void)
|
||||
|
|
|
@ -44,8 +44,8 @@ PROPERTY_SOURCE(Fem::ConstraintPulley, Fem::ConstraintGear);
|
|||
|
||||
ConstraintPulley::ConstraintPulley()
|
||||
{
|
||||
ADD_PROPERTY(OtherDiameter,(0));
|
||||
ADD_PROPERTY(CenterDistance,(0));
|
||||
ADD_PROPERTY(OtherDiameter,(100.0));
|
||||
ADD_PROPERTY(CenterDistance,(500.0));
|
||||
ADD_PROPERTY(IsDriven,(0));
|
||||
ADD_PROPERTY(TensionForce,(0.0));
|
||||
|
||||
|
@ -55,8 +55,10 @@ ConstraintPulley::ConstraintPulley()
|
|||
"First belt force");
|
||||
ADD_PROPERTY_TYPE(BeltForce2,(0.0),"ConstraintPulley",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output),
|
||||
"Second belt force");
|
||||
ForceAngle.setValue(90.0);
|
||||
ForceAngle.setValue(00.0);
|
||||
Diameter.setValue(300.0);
|
||||
// calculate initial values of read-only properties
|
||||
onChanged(&Force);
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *ConstraintPulley::execute(void)
|
||||
|
|
|
@ -172,7 +172,7 @@
|
|||
<number>1</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000000000000000</double>
|
||||
<double>-360.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>360.000000000000000</double>
|
||||
|
|
|
@ -100,7 +100,7 @@ TaskFemConstraintGear::TaskFemConstraintGear(ViewProviderFemConstraint *Constrai
|
|||
ui->spinForce->setMinimum(0);
|
||||
ui->spinForce->setMaximum(FLOAT_MAX);
|
||||
ui->spinForce->setValue(force);
|
||||
ui->spinForceAngle->setMinimum(0);
|
||||
ui->spinForceAngle->setMinimum(-360);
|
||||
ui->spinForceAngle->setMaximum(360);
|
||||
ui->spinForceAngle->setValue(angle);
|
||||
ui->lineDirection->setText(dir);
|
||||
|
|
|
@ -128,6 +128,7 @@ void ViewProviderFemConstraintGear::updateData(const App::Property* prop)
|
|||
SbVec3f b(base.x, base.y, base.z);
|
||||
SbVec3f ax(axis.x, axis.y, axis.z);
|
||||
SbVec3f dir(direction.x, direction.y, direction.z);
|
||||
//Base::Console().Error("DirectionVector: %f, %f, %f\n", direction.x, direction.y, direction.z);
|
||||
|
||||
createPlacement(pShapeSep, b, SbRotation(SbVec3f(0,1,0), ax));
|
||||
pShapeSep->addChild(createCylinder(pcConstraint->Height.getValue() * 0.8, dia/2));
|
||||
|
|
Loading…
Reference in New Issue
Block a user