mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-14 16:11:33 +05:00
PAL10403: pb with GetEdgeNearPoint()
This commit is contained in:
parent
163fb83e85
commit
387a0fd3bc
@ -508,7 +508,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeBlockCompound
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* GetEdge
|
* GetPoint
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetPoint
|
Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetPoint
|
||||||
@ -528,13 +528,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetPoint
|
|||||||
|
|
||||||
TopoDS_Shape aBlockOrComp = theShape->GetValue();
|
TopoDS_Shape aBlockOrComp = theShape->GetValue();
|
||||||
if (aBlockOrComp.IsNull()) {
|
if (aBlockOrComp.IsNull()) {
|
||||||
SetErrorCode("Block or compound is null");
|
SetErrorCode("Given shape is null");
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if (aBlockOrComp.ShapeType() != TopAbs_SOLID &&
|
|
||||||
aBlockOrComp.ShapeType() != TopAbs_COMPOUND &&
|
|
||||||
aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) {
|
|
||||||
SetErrorCode("Shape is neither a block, nor a compound of blocks");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,13 +608,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdge
|
|||||||
|
|
||||||
TopoDS_Shape aBlockOrComp = theShape->GetValue();
|
TopoDS_Shape aBlockOrComp = theShape->GetValue();
|
||||||
if (aBlockOrComp.IsNull()) {
|
if (aBlockOrComp.IsNull()) {
|
||||||
SetErrorCode("Block or compound is null");
|
SetErrorCode("Given shape is null");
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if (aBlockOrComp.ShapeType() != TopAbs_SOLID &&
|
|
||||||
aBlockOrComp.ShapeType() != TopAbs_COMPOUND &&
|
|
||||||
aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) {
|
|
||||||
SetErrorCode("Shape is neither a block, nor a compound of blocks");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -737,13 +725,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdgeNearPoint
|
|||||||
|
|
||||||
TopoDS_Shape aBlockOrComp = theShape->GetValue();
|
TopoDS_Shape aBlockOrComp = theShape->GetValue();
|
||||||
if (aBlockOrComp.IsNull()) {
|
if (aBlockOrComp.IsNull()) {
|
||||||
SetErrorCode("Block or compound is null");
|
SetErrorCode("Given shape is null");
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if (aBlockOrComp.ShapeType() != TopAbs_SOLID &&
|
|
||||||
aBlockOrComp.ShapeType() != TopAbs_COMPOUND &&
|
|
||||||
aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) {
|
|
||||||
SetErrorCode("Shape is neither a block, nor a compound of blocks");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -773,6 +755,11 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdgeNearPoint
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nbEdges == 0) {
|
||||||
|
SetErrorCode("Given shape contains no edges");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
mapShape.Clear();
|
mapShape.Clear();
|
||||||
Standard_Integer ind = 1;
|
Standard_Integer ind = 1;
|
||||||
TopTools_Array1OfShape anEdges (1, nbEdges);
|
TopTools_Array1OfShape anEdges (1, nbEdges);
|
||||||
@ -873,12 +860,6 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceByPoints
|
|||||||
SetErrorCode("Block or compound is null");
|
SetErrorCode("Block or compound is null");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (aBlockOrComp.ShapeType() != TopAbs_SOLID &&
|
|
||||||
aBlockOrComp.ShapeType() != TopAbs_COMPOUND &&
|
|
||||||
aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) {
|
|
||||||
SetErrorCode("Shape is neither a block, nor a compound of blocks");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
TopoDS_Shape anArg1 = thePoint1->GetValue();
|
TopoDS_Shape anArg1 = thePoint1->GetValue();
|
||||||
TopoDS_Shape anArg2 = thePoint2->GetValue();
|
TopoDS_Shape anArg2 = thePoint2->GetValue();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user