mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023379: Exporting single point into STEP produces a compound with two points
Adding single vertex for second time was removed. Adding single vertex in first time was removed, but for second time was returned. Duplication of vertex compound in STEPControl_GeometricCurveSet mode was removed. Some cosmetic changes Test case for this bug
This commit is contained in:
@@ -760,6 +760,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape (const Handle(Tran
|
||||
Handle(TopTools_HSequenceOfShape) RepItemSeq = new TopTools_HSequenceOfShape();
|
||||
|
||||
// PTV 16.09.2002 OCC725 separate shape from solo vertices.
|
||||
Standard_Boolean isOnlyVertices = Standard_False;
|
||||
if (theShape.ShapeType() == TopAbs_COMPOUND) {
|
||||
Standard_Integer countVrtx = 0;
|
||||
Standard_Integer countSh = 0;
|
||||
@@ -784,11 +785,10 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape (const Handle(Tran
|
||||
theShape = aNewShape;
|
||||
if (countVrtx)
|
||||
RepItemSeq->Append(aCompOfVrtx);
|
||||
if (countSh == 0)
|
||||
isOnlyVertices = Standard_True;
|
||||
}
|
||||
else if (theShape.ShapeType() == TopAbs_VERTEX)
|
||||
RepItemSeq->Append(theShape); // to translate one vertex
|
||||
|
||||
|
||||
if (theShape.ShapeType() == TopAbs_COMPOUND) {
|
||||
TopExp_Explorer SolidExp, ShellExp, FaceExp;
|
||||
if (mymode != STEPControl_GeometricCurveSet) {
|
||||
@@ -807,7 +807,8 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape (const Handle(Tran
|
||||
}
|
||||
}
|
||||
else {
|
||||
RepItemSeq->Append(theShape); //:j1
|
||||
if (!isOnlyVertices)
|
||||
RepItemSeq->Append(theShape); //:j1
|
||||
}
|
||||
if(mymode == STEPControl_AsIs) {
|
||||
TopExp_Explorer WireExp, EdgeExp;
|
||||
|
Reference in New Issue
Block a user