Explicit type cast added in conversions from double to float in PrsMgr, Select3D, StdPrs, Visual3d, and Voxel.
Minor corrections in ShapeProcess and TCollection.
In Visual3d_ViewManager::ConvertCoord...(), output is initialized by zeros instead of RealLast() in case of failure.
In XmlMXCAFDoc, material density is correctly converted to string when writing to Xml.
const gp_Pnt& ThePoint )
{
myTransformPersistence.Flag = TheFlag;
- myTransformPersistence.Point.x = ThePoint.X();
- myTransformPersistence.Point.y = ThePoint.Y();
- myTransformPersistence.Point.z = ThePoint.Z();
+ myTransformPersistence.Point.x = (Standard_ShortReal)ThePoint.X();
+ myTransformPersistence.Point.y = (Standard_ShortReal)ThePoint.Y();
+ myTransformPersistence.Point.z = (Standard_ShortReal)ThePoint.Z();
Handle(Graphic3d_Structure) aStruct;
for( Standard_Integer i = 1, n = myPresentations.Length(); i <= n; i++ )
Standard_Real& DMin)
{
myLastRank = 0;
- myLastTol = aTol;
+ myLastTol = (Standard_ShortReal)aTol;
for(Select3D_ListIteratorOfListOfSensitive It(myList);It.More();It.Next()){
myLastRank++;
if (It.Value()->Matches (X, Y, aTol, DMin))
{
- myX = X; myY = Y; myLastTol = aTol;
+ myX = (Standard_ShortReal)X;
+ myY = (Standard_ShortReal)Y;
+ myLastTol = (Standard_ShortReal)aTol;
// compute and validate the depth (will call ::ComputeDepth())
return Select3D_SensitiveEntity::Matches (X, Y, aTol, DMin);
}
// Optimisation of loading resource file: file is load only once
// and reloaded only if file date has changed
static Handle(Resource_Manager) sRC;
- static long mtime;
+ static Standard_Time mtime;
static TCollection_AsciiString name;
if ( ! sRC.IsNull() && ! name.IsEqual ( file ) ) sRC.Nullify();
if ( ! sRC.IsNull() ) {
}
Standard_Integer j = (i - UVNodes.Lower()) * 3;
- Normals->SetValue(j + 1, Nor(i).X());
- Normals->SetValue(j + 2, Nor(i).Y());
- Normals->SetValue(j + 3, Nor(i).Z());
+ Normals->SetValue(j + 1, (Standard_ShortReal)Nor(i).X());
+ Normals->SetValue(j + 2, (Standard_ShortReal)Nor(i).Y());
+ Normals->SetValue(j + 3, (Standard_ShortReal)Nor(i).Z());
if (aFace.Orientation() == TopAbs_REVERSED) (Nor(i)).Reverse();
Nor(i) = gp_Dir(eqPlan);
Standard_Integer j = (i - Nodes.Lower()) * 3;
- Normals->SetValue(j + 1, Nor(i).X());
- Normals->SetValue(j + 2, Nor(i).Y());
- Normals->SetValue(j + 3, Nor(i).Z());
+ Normals->SetValue(j + 1, (Standard_ShortReal)Nor(i).X());
+ Normals->SetValue(j + 2, (Standard_ShortReal)Nor(i).Y());
+ Normals->SetValue(j + 3, (Standard_ShortReal)Nor(i).Z());
if (aFace.Orientation() == TopAbs_REVERSED) (Nor(i)).Reverse();
mylength = nbSymbols(astring);
mystring = Allocate(ROUNDMEM((mylength+1)*2));
if(!ConvertToUnicode (astring))
+ {
#ifdef DEB
cout <<"UTF8 decoding failure..." <<endl;
#endif
- ;
+ }
}
}
else {
Visual3d_LayerDefinitionError::Raise
("One primitive is already open !");
- MyGraphicDriver->TextSize (AText, AHeight, aWidth, anAscent, aDescent);
+ MyGraphicDriver->TextSize (AText, (Standard_ShortReal)AHeight, aWidth, anAscent, aDescent);
AWidth = aWidth;
AnAscent = anAscent;
ADescent = aDescent;
MyCView.Orientation.IsCustomMatrix = 1;
for ( i = 0; i < 4; i++)
for ( j = 0; j < 4; j++)
- MyCView.Orientation.ModelViewMatrix[i][j] = MyViewOrientation.MyModelViewMatrix->Value(i,j);
+ MyCView.Orientation.ModelViewMatrix[i][j] =
+ (Standard_ShortReal)MyViewOrientation.MyModelViewMatrix->Value(i,j);
}
else {
MyCView.Orientation.IsCustomMatrix = 0;
MyCView.Mapping.IsCustomMatrix = 1;
for ( i = 0; i < 4; i++)
for ( j = 0; j < 4; j++)
- MyCView.Mapping.ProjectionMatrix[i][j] = MyViewMapping.MyProjectionMatrix->Value(i,j);
+ MyCView.Mapping.ProjectionMatrix[i][j] =
+ (Standard_ShortReal)MyViewMapping.MyProjectionMatrix->Value(i,j);
}
else {
MyCView.Mapping.IsCustomMatrix = 0;
for (i = 0; i < 4; i++)
for (j = 0; j < 4; j++)
MyCView.Mapping.ProjectionMatrix[i][j] =
- MyViewMapping.MyProjectionMatrix->Value(i,j);
+ (Standard_ShortReal)MyViewMapping.MyProjectionMatrix->Value(i,j);
}
MyMatOfMapIsEvaluated = Standard_False;
for (i = 0; i < 4; i++)
for (j = 0; j < 4; j++)
MyCView.Mapping.ProjectionMatrix[i][j] =
- MyViewMapping.MyProjectionMatrix->Value(i,j);
+ (Standard_ShortReal)MyViewMapping.MyProjectionMatrix->Value(i,j);
}
MyMatOfMapIsEvaluated = Standard_False;
Graphic3d_CView TheCView;
Graphic3d_Vertex Point;
- if (! ViewExists (AWindow, TheCView))
- Point.SetCoord (RealLast (), RealLast (), RealLast ());
- else {
+ if (ViewExists (AWindow, TheCView))
+ {
Standard_Integer Width, Height;
Standard_ShortReal x, y, z;
Standard_Boolean Result;
if (WCT != 0.)
Point.SetCoord (WCX/WCT, WCY/WCT, WCZ/WCT);
- else
- Point.SetCoord (RealLast (), RealLast (), RealLast ());
}
}
Graphic3d_CView TheCView;
if (! ViewExists (AWindow, TheCView)) {
- Point.SetCoord (RealLast (), RealLast (), RealLast ());
+ Point.SetCoord (0., 0., 0.);
Proj.SetCoord (0., 0., 0.);
}
else {
if (WCT != 0.)
Point.SetCoord (WCX/WCT, WCY/WCT, WCZ/WCT);
else
- Point.SetCoord (RealLast (), RealLast (), RealLast ());
+ Point.SetCoord (0., 0., 0.);
// Define projection ray
NPCZ = 10.0;
return Standard_False;
}
}
- value = Atof(line);
+ value = (Standard_ShortReal)Atof(line);
// Set value
if (!((Standard_ShortReal**)((Voxel_DS*)myFloatVoxels)->myData)[i1])
arrVec[i] = aNormal.XYZ();
Standard_Integer j = i * 3;
- Normals->SetValue(j + 1, aNormal.X());
- Normals->SetValue(j + 2, aNormal.Y());
- Normals->SetValue(j + 3, aNormal.Z());
+ Normals->SetValue(j + 1, (Standard_ShortReal)aNormal.X());
+ Normals->SetValue(j + 2, (Standard_ShortReal)aNormal.Y());
+ Normals->SetValue(j + 3, (Standard_ShortReal)aNormal.Z());
}
if ( !anAtt->GetDensValType().IsNull() )
aDensTypeStr = anAtt->GetDensValType()->String().ToCString();
- XmlObjMgt::SetStringValue (theTarget, anAtt->GetDensity());
+ TCollection_AsciiString aDensityStr (anAtt->GetDensity());
+ XmlObjMgt::SetStringValue (theTarget, aDensityStr.ToCString());
theTarget.Element().setAttribute(::NameIndexString(), aNameString);
theTarget.Element().setAttribute(::DescrIndexString(),aDescrString);
theTarget.Element().setAttribute(::DensNameIndexString(),aDensNameStr);