mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 10:10:34 +05:00
Check if aUnitName is NULL before testing unit value.
This commit is contained in:
parent
8f307e271d
commit
3b485f4d87
@ -101,14 +101,18 @@ IGESIMPORT_EXPORT
|
|||||||
if (!aModel.IsNull()) {
|
if (!aModel.IsNull()) {
|
||||||
Handle(TCollection_HAsciiString) aUnitName =
|
Handle(TCollection_HAsciiString) aUnitName =
|
||||||
aModel->GlobalSection().UnitName();
|
aModel->GlobalSection().UnitName();
|
||||||
//cout<<"aUnitName = "<<aUnitName->ToCString()<<endl;
|
if (!aUnitName.IsNull()) {
|
||||||
//cout<<"aUnitFlag = "<<aModel->GlobalSection().UnitFlag()<<endl;
|
//cout<<"aUnitName = "<<aUnitName->ToCString()<<endl;
|
||||||
if (aUnitName->String()=="MM") {
|
//cout<<"aUnitFlag = "<<aModel->GlobalSection().UnitFlag()<<endl;
|
||||||
P = gp_Pnt(0.001,0.0,0.0);
|
if (aUnitName->String()=="MM") {
|
||||||
}
|
P = gp_Pnt(0.001,0.0,0.0);
|
||||||
else if (aUnitName->String()=="CM") {
|
}
|
||||||
P = gp_Pnt(0.01,0.0,0.0);
|
else if (aUnitName->String()=="CM") {
|
||||||
|
P = gp_Pnt(0.01,0.0,0.0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
//else
|
||||||
|
// cout << "aUnitName is NULL !!" << endl;
|
||||||
}
|
}
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
TopoDS_Vertex V;
|
TopoDS_Vertex V;
|
||||||
|
Loading…
Reference in New Issue
Block a user