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;
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) {
}
}
else {
- RepItemSeq->Append(theShape); //:j1
+ if (!isOnlyVertices)
+ RepItemSeq->Append(theShape); //:j1
}
if(mymode == STEPControl_AsIs) {
TopExp_Explorer WireExp, EdgeExp;
--- /dev/null
+set os $env(os_type)
+if { [string compare $os "windows"] == 0 } {
+# puts "TODO OCC23561 $os: child process exited abnormally"
+} else {
+ puts "TODO OCC23561 ALL: An exception was caught"
+ puts "TODO OCC23561 ALL: Tcl Exception:"
+ puts "TODO OCC23561 ALL: \\*\\* Exception \\*\\*.*"
+}
+puts "TODO OCC23561 ALL: TEST INCOMPLETE"
+
+puts "================"
+puts "OCC23379"
+puts "================"
+puts ""
+#################################
+# Exporting single point into STEP produces a compound with two points
+#################################
+
+pload XDE
+
+set filedir ${imagedir}
+
+set Name bug23379_point
+set brepFileName ${Name}.brep
+set stepFileName ${imagedir}/${Name}.step
+
+restore [locate_data_file ${brepFileName}] point
+
+stepwrite 0 point ${stepFileName}
+stepread ${stepFileName} a *
+set L [llength [explode a_1]]
+puts "L=$L"
+
+if { ${L} == 1} {
+ puts "OK : Number of points is good"
+} else {
+ puts "Error : Number of points is bad"
+}
+
+catch {exec rm -f ${stepFileName}}