0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / XSDRAWSTEP / XSDRAWSTEP.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 7999b98..bd80097
@@ -1,72 +1,59 @@
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
 //
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
 //
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
 //
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 //:k8 abv 6 Jan 98: using parameter "step.group" for writing assemblies/shapes
-#include <XSDRAWSTEP.ixx>
-#include <STEPControl_Controller.hxx>
-#include <STEPControl_ActorWrite.hxx>
-#include <STEPControl_Reader.hxx>
-#include <STEPControl_Writer.hxx>
-#include <STEPControl_StepModelType.hxx>
-#include <XSDRAW.hxx>
-#include <StepSelect_Activator.hxx>
 
+#include <DBRep.hxx>
 #include <Draw_Appli.hxx>
 #include <Draw_Interpretor.hxx>
-#include <Draw_Printer.hxx>
+#include <Draw_ProgressIndicator.hxx>
+#include <IFSelect_SessionPilot.hxx>
+#include <Interface_InterfaceModel.hxx>
+#include <Interface_Macros.hxx>
+#include <Interface_Static.hxx>
+#include <Message.hxx>
 #include <Message_Messenger.hxx>
-
-#include <DBRep.hxx>
-
+#include <Message_ProgressSentry.hxx>
+#include <STEPControl_ActorWrite.hxx>
+#include <STEPControl_Controller.hxx>
+#include <STEPControl_Reader.hxx>
+#include <STEPControl_StepModelType.hxx>
+#include <STEPControl_Writer.hxx>
+#include <StepData_StepModel.hxx>
+#include <StepGeom_Axis2Placement3d.hxx>
+#include <StepSelect_Activator.hxx>
+#include <STEPSelections_AssemblyExplorer.hxx>
+#include <STEPSelections_Counter.hxx>
+#include <StepShape_ShapeRepresentation.hxx>
+#include <StepToTopoDS_MakeTransformed.hxx>
 #include <TCollection_HAsciiString.hxx>
-#include <Interface_Macros.hxx>
-#include <Interface_InterfaceModel.hxx>
-
-//  Pour le transfert (write)
-//  Pour NewModel et Write : definition de produit (temporaire ...)
+#include <TColStd_HSequenceOfTransient.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopoDS.hxx>
 #include <Transfer_FinderProcess.hxx>
+#include <Transfer_TransientProcess.hxx>
 #include <TransferBRep_ShapeMapper.hxx>
-#include <StepShape_ShapeRepresentation.hxx>
-#include <TColStd_HSequenceOfTransient.hxx>
-
 #include <XSControl_Controller.hxx>
+#include <XSControl_TransferReader.hxx>
+#include <XSControl_TransferWriter.hxx>
 #include <XSControl_WorkSession.hxx>
-#include <StepData_StepModel.hxx>
-
-#include <TopoDS.hxx>
-
-// steptrans
-#include <StepToTopoDS_MakeTransformed.hxx>
-#include <StepGeom_Axis2Placement3d.hxx>
+#include <XSDRAW.hxx>
+#include <XSDRAWSTEP.hxx>
 
 #include <stdio.h>
-#include <Interface_Static.hxx>
-#include <IFSelect_SessionPilot.hxx>
-#include <STEPSelections_Counter.hxx>
-#include <STEPSelections_AssemblyExplorer.hxx>
-
-#include <Draw_ProgressIndicator.hxx>
-#include <Transfer_TransientProcess.hxx>
-
-#include <TopExp_Explorer.hxx>
-#include <XSControl_TransferWriter.hxx>
-#include <Message_ProgressSentry.hxx>
-
-
+//  Pour le transfert (write)
+//  Pour NewModel et Write : definition de produit (temporaire ...)
+// steptrans
 extern "C" {
 static void cleanpilot ()
 {
@@ -98,6 +85,10 @@ void XSDRAWSTEP::Init ()
 
 static Standard_Integer stepread (Draw_Interpretor& di/*theCommands*/, Standard_Integer argc, const char** argv) 
 {
+  if (argc < 3) {
+    di << "Use: stepread  [file] [f or r (type of model full or reduced)]\n";
+    return 1;
+  }
   //  On admet le controller AP214 ou une variante
   DeclareAndCast(STEPControl_Controller,ctl,XSDRAW::Controller());
   if (ctl.IsNull()) XSDRAW::SetNorm("STEP");
@@ -121,7 +112,7 @@ static Standard_Integer stepread (Draw_Interpretor& di/*theCommands*/, Standard_
   progress->Show();
 
   Standard_Boolean fromtcl = Standard_False;
-  Standard_Boolean aFullMode = 0;
+  Standard_Boolean aFullMode = Standard_False;
   Standard_Integer k = 3;
   if(argc > k )
   {
@@ -142,9 +133,9 @@ static Standard_Integer stepread (Draw_Interpretor& di/*theCommands*/, Standard_
   if(!fromtcl)
     fromtcl = argc > k;
   if(aFullMode)
-    cout<<"Full model for translation with additional info will be used \n"<<flush;
+    std::cout<<"Full model for translation with additional info will be used \n"<<std::flush;
   else
-    cout<<"Reduced model for translation without additional info will be used \n"<<flush;
+    std::cout<<"Reduced model for translation without additional info will be used \n"<<std::flush;
   
   sr.WS()->SetModeStat(aFullMode);
 
@@ -156,8 +147,8 @@ static Standard_Integer stepread (Draw_Interpretor& di/*theCommands*/, Standard_
   progress->Show();
 
   if (readstat != IFSelect_RetDone) {
-    if (modfic) di<<"Could not read file "<<fnom.ToCString()<<" , abandon"<<"\n";
-    else di<<"No model loaded"<<"\n";
+    if (modfic) di<<"Could not read file "<<fnom.ToCString()<<" , abandon\n";
+    else di<<"No model loaded\n";
     return 1;
   }
   
@@ -165,55 +156,55 @@ static Standard_Integer stepread (Draw_Interpretor& di/*theCommands*/, Standard_
   //   nom = "." -> fichier deja lu
   Standard_Integer i, num, nbs, modepri = 1;
   if (fromtcl) modepri = 4;
-  Handle(Message_Messenger) aDIMessenger = 
-    new Message_Messenger (new Draw_Printer(di));
   while (modepri) {
     num = sr.NbRootsForTransfer();
     if (!fromtcl) {
       di<<"NbRootsForTransfer="<<num<<" :\n";
       for (i = 1; i <= num; i ++) {
         di<<"Root."<<i<<", Ent. ";
-        sr.Model()->Print(sr.RootForTransfer(i),aDIMessenger);
+        Standard_SStream aTmpStream;
+        sr.Model()->Print (sr.RootForTransfer(i), aTmpStream);
+        di << aTmpStream.str().c_str();
         di<<" Type:"<<sr.RootForTransfer(i)->DynamicType()->Name()<<"\n";
       }
 
-      cout<<"Mode (0 End, 1 root n0 1, 2 one root/n0, 3 one entity/n0, 4 Selection) : "<<flush;
-      cin>>modepri;
+      std::cout<<"Mode (0 End, 1 root n0 1, 2 one root/n0, 3 one entity/n0, 4 Selection) : "<<std::flush;
+      std::cin>>modepri;
     }
 
-    if (modepri == 0) { di<<"End Reading STEP"<<"\n"; return 0; }
+    if (modepri == 0) { di<<"End Reading STEP\n"; return 0; }
     if (modepri <= 2) {
       num = 1;
       if (modepri == 2) {
-        cout<<"Root N0 : "<<flush;  cin>>num;
+        std::cout<<"Root N0 : "<<std::flush;  std::cin>>num;
       }
 
       progress->NewScope ( 80, "Translation" );
       progress->Show();
-      sr.WS()->MapReader()->SetProgress ( progress );
+      sr.WS()->TransferReader()->TransientProcess()->SetProgress ( progress );
 
-      if (!sr.TransferRoot (num)) di<<"Transfer root n0 "<<num<<" : no result"<<"\n";
+      if (!sr.TransferRoot (num)) di<<"Transfer root n0 "<<num<<" : no result\n";
       else {
         nbs = sr.NbShapes();
-        char shname[30];  sprintf (shname,"%s_%d",rnom.ToCString(),nbs);
+        char shname[30];  Sprintf (shname,"%s_%d",rnom.ToCString(),nbs);
         di<<"Transfer root n0 "<<num<<" OK  -> DRAW Shape: "<<shname<<"\n";
-        di<<"Now, "<<nbs<<" Shapes produced"<<"\n";
+        di<<"Now, "<<nbs<<" Shapes produced\n";
         TopoDS_Shape sh = sr.Shape(nbs);
         DBRep::Set (shname,sh);
       }
 
-      sr.WS()->MapReader()->SetProgress ( 0 );
+      sr.WS()->TransferReader()->TransientProcess()->SetProgress ( 0 );
       progress->EndScope();
       progress->Show();
     }
     else if (modepri == 3) {
-      cout<<"Entity : "<<flush;  num = XSDRAW::GetEntityNumber();
-      if (!sr.TransferOne (num)) di<<"Transfer entity n0 "<<num<<" : no result"<<"\n";
+      std::cout<<"Entity : "<<std::flush;  num = XSDRAW::GetEntityNumber();
+      if (!sr.TransferOne (num)) di<<"Transfer entity n0 "<<num<<" : no result\n";
       else {
         nbs = sr.NbShapes();
-        char shname[30];  sprintf (shname,"%s_%d",rnom.ToCString(),num);
+        char shname[30];  Sprintf (shname,"%s_%d",rnom.ToCString(),num);
         di<<"Transfer entity n0 "<<num<<" OK  -> DRAW Shape: "<<shname<<"\n";
-        di<<"Now, "<<nbs<<" Shapes produced"<<"\n";
+        di<<"Now, "<<nbs<<" Shapes produced\n";
         TopoDS_Shape sh = sr.Shape(nbs);
         DBRep::Set (shname,sh);
       }
@@ -239,11 +230,11 @@ static Standard_Integer stepread (Draw_Interpretor& di/*theCommands*/, Standard_
           di<<" : ";
           list = XSDRAW::GetList (argv[k], ( argc > (k+1) ? argv[k+1] : 0 ) );
         }
-        if (list.IsNull()) { di<<"No list defined. Give a selection name or * for all transferrable roots"<<"\n"; continue; }
+        if (list.IsNull()) { di<<"No list defined. Give a selection name or * for all transferrable roots\n"; continue; }
       } else {
-        cout<<"Name of Selection :"<<flush;
+        std::cout<<"Name of Selection :"<<std::flush;
         list = XSDRAW::GetList();
-        if (list.IsNull()) { di<<"No list defined"<<"\n"; continue; }
+        if (list.IsNull()) { di<<"No list defined\n"; continue; }
       }
 
       Standard_Integer ill, nbl = list->Length();
@@ -252,23 +243,23 @@ static Standard_Integer stepread (Draw_Interpretor& di/*theCommands*/, Standard_
 
       progress->NewScope ( 80, "Translation" );
       progress->Show();
-      sr.WS()->MapReader()->SetProgress ( progress );
+      sr.WS()->TransferReader()->TransientProcess()->SetProgress ( progress );
 
       Message_ProgressSentry PSentry ( progress, "Root", 0, nbl, 1 );
       for (ill = 1; ill <= nbl && PSentry.More(); ill ++, PSentry.Next()) {
         num = sr.Model()->Number(list->Value(ill));
         if (num == 0) continue;
-        if (!sr.TransferOne(num)) di<<"Transfer entity n0 "<<num<<" : no result"<<"\n";
+        if (!sr.TransferOne(num)) di<<"Transfer entity n0 "<<num<<" : no result\n";
         else {
           nbs = sr.NbShapes();
-          char shname[30];  sprintf (shname,"%s_%d",rnom.ToCString(),nbs);
+          char shname[30];  Sprintf (shname,"%s_%d",rnom.ToCString(),nbs);
           di<<"Transfer entity n0 "<<num<<" OK  -> DRAW Shape: "<<shname<<"\n";
-          di<<"Now, "<<nbs<<" Shapes produced"<<"\n";
+          di<<"Now, "<<nbs<<" Shapes produced\n";
           TopoDS_Shape sh = sr.Shape(nbs);
           DBRep::Set (shname,sh);
         }
       }
-      sr.WS()->MapReader()->SetProgress ( 0 );
+      sr.WS()->TransferReader()->TransientProcess()->SetProgress ( 0 );
       progress->EndScope();
       progress->Show();
     }
@@ -285,8 +276,8 @@ static Standard_Integer testread (Draw_Interpretor& di, Standard_Integer argc, c
 {
   if (argc != 3)                                                                                      
     {                                                                                             
-      di << "ERROR in " << argv[0] << "Wrong Number of Arguments."<<"\n";                     
-      di << " Usage : " << argv[0] <<" file_name shape_name"<< "\n";                          
+      di << "ERROR in " << argv[0] << "Wrong Number of Arguments.\n";                     
+      di << " Usage : " << argv[0] <<" file_name shape_name\n";                          
       return 1;                                                                                 
     }
   STEPControl_Reader Reader;
@@ -294,11 +285,11 @@ static Standard_Integer testread (Draw_Interpretor& di, Standard_Integer argc, c
   IFSelect_ReturnStatus readstat = Reader.ReadFile(filename);
   di<<"Status from reading STEP file "<<filename<<" : ";  
   switch(readstat) {                                                              
-    case IFSelect_RetVoid  : { di<<"empty file"<<"\n"; return 1; }            
-    case IFSelect_RetDone  : { di<<"file read"<<"\n";    break; }             
-    case IFSelect_RetError : { di<<"file not found"<<"\n";   return 1; }      
-    case IFSelect_RetFail  : { di<<"error during read"<<"\n";  return 1; }    
-    default  :  { di<<"failure"<<"\n";   return 1; }                          
+    case IFSelect_RetVoid  : { di<<"empty file\n"; return 1; }            
+    case IFSelect_RetDone  : { di<<"file read\n";    break; }             
+    case IFSelect_RetError : { di<<"file not found\n";   return 1; }      
+    case IFSelect_RetFail  : { di<<"error during read\n";  return 1; }    
+    default  :  { di<<"failure\n";   return 1; }                          
   }  
   Reader.TransferRoots();
   TopoDS_Shape shape = Reader.OneShape();
@@ -307,47 +298,6 @@ static Standard_Integer testread (Draw_Interpretor& di, Standard_Integer argc, c
   return 0;
 }
  
-//=======================================================================
-//function : readstep
-//purpose  : 
-//=======================================================================
-
-static Standard_Integer readstep (Draw_Interpretor& di, Standard_Integer /*argc*/, const char** argv) 
-{
-//  On admet le controller AP214 ou une variante
-  
-  
-  STEPControl_Reader sr;
-  
-  IFSelect_ReturnStatus readstat = IFSelect_RetVoid;
-
-   readstat = sr.ReadFile (argv[1]);
-  if (readstat != IFSelect_RetDone) {
-    
-    di<<"No model loaded"<<"\n";
-    return 1;
-  }
-
-  
-  Standard_Integer  num = sr.NbRootsForTransfer();
-  Standard_Integer  modepri;
-  di<<"NbRootsForTransfer="<<num<<" :\n";
-
-  cout<<"Mode (0 End, 1 root n0 1, 2 one root/n0, 3 one entity/n0, 4 Selection) : "<<flush;
-  cin>>modepri;
-  if (modepri == 0) { di<<"End Reading STEP"<<"\n"; return 0; }
-    
-
-  if (!sr.TransferRoot (num)) di<<"Transfer root n0 "<<num<<" : no result"<<"\n";
-  else {
-    TopoDS_Shape sh = sr.OneShape();
-    DBRep::Set (argv[2],sh);
-  }
-  cin>>modepri;
-  return 0;
-}
-
 //  ########  COMMANDE steptrans  : teste les transformations  #########
 //=======================================================================
 //function : steptrans
@@ -356,7 +306,7 @@ static Standard_Integer readstep (Draw_Interpretor& di, Standard_Integer /*argc*
 
 static Standard_Integer steptrans (Draw_Interpretor& di, Standard_Integer argc, const char** argv) 
 {
-  if (argc < 5) { di<<"give shape-name new-shape + entity-n0 entity-n0: AXIS2"<<"\n";
+  if (argc < 5) { di<<"give shape-name new-shape + entity-n0 entity-n0: AXIS2\n";
                  return 1; }
   TopoDS_Shape shape = DBRep::Get(argv[1]);
   if (shape.IsNull()) { di<<"Not a shape : "<<argv[1]<<"\n"; return 1; }
@@ -376,7 +326,7 @@ static Standard_Integer steptrans (Draw_Interpretor& di, Standard_Integer argc,
     DBRep::Set (argv[2],shape);
     di<<"Transformed Shape as "<<argv[2]<<"\n";
   }
-  else di<<"No transformation computed"<<"\n";
+  else di<<"No transformation computed\n";
   return 0;
 }
 
@@ -398,9 +348,9 @@ static Standard_Integer stepwrite (Draw_Interpretor& di, Standard_Integer argc,
   }
 
   if (argc < 3) {
-    di<<"Give mode[1-4] and Shape name + optional file. Mode possible"<<"\n";
+    di<<"Give mode[1-4] and Shape name + optional file. Mode possible\n";
     di<<"f ou 1 : FacettedBRep        s ou 2 : ShellBasedSurfaceModel\n"
-        <<"m ou 3 : ManifoldSolidBrep   w ou 4 : GeometricCurveSet/WireFrame"<<"\n";
+        <<"m ou 3 : ManifoldSolidBrep   w ou 4 : GeometricCurveSet/WireFrame\n";
     return 1; }
   char modeshape = argv[1][0];
   STEPControl_StepModelType mode;
@@ -415,7 +365,7 @@ static Standard_Integer stepwrite (Draw_Interpretor& di, Standard_Integer argc,
     case '3' : mode = STEPControl_ManifoldSolidBrep;       break;
     case 'w' :
     case '4' : mode = STEPControl_GeometricCurveSet;       break;
-    default :  di<<"1st arg = mode, incorrect [give fsmw]"<<"\n"; return 1;
+    default :  di<<"1st arg = mode, incorrect [give fsmw]\n"; return 1;
   }
 
   //:k8 abv 6 Jan 98: using parameter for writing mode (assemblies/shapes)
@@ -453,22 +403,22 @@ static Standard_Integer stepwrite (Draw_Interpretor& di, Standard_Integer argc,
 //   Que s est-il passe
   stepmodel = sw.Model();
   Standard_Integer nbapres = (stepmodel.IsNull() ? 0 : stepmodel->NbEntities());
-  if (nbavant > 0) di<<"Beware : Model not empty before transferring"<<"\n";
-  if (nbapres <= nbavant) di<<"Beware : No data produced by this transfer"<<"\n";
-  if (nbapres == 0) { di<<"No data to write"<<"\n"; return 0; }
+  if (nbavant > 0) di<<"Beware : Model not empty before transferring\n";
+  if (nbapres <= nbavant) di<<"Beware : No data produced by this transfer\n";
+  if (nbapres == 0) { di<<"No data to write\n"; return 0; }
 
   if (argc <= 3) {
-    di<<" Now, to write a file, command : writeall filename"<<"\n";
+    di<<" Now, to write a file, command : writeall filename\n";
     return 0;
   }
 
   const char *nomfic = argv[3];
   stat = sw.Write(nomfic);
   switch (stat) {
-  case IFSelect_RetVoid : di<<"Error: No file written"<<"\n"; break;
-    case IFSelect_RetDone : di<<"File "<<nomfic<<" written"<<"\n"; break;
-    case IFSelect_RetStop : di<<"Error on writing file: no space on disk or destination is write protected"<<"\n"; break;
-    default : di<<"Error: File "<<nomfic<<" written with fail messages"<<"\n"; break;
+  case IFSelect_RetVoid : di<<"Error: No file written\n"; break;
+    case IFSelect_RetDone : di<<"File "<<nomfic<<" written\n"; break;
+    case IFSelect_RetStop : di<<"Error on writing file: no space on disk or destination is write protected\n"; break;
+    default : di<<"Error: File "<<nomfic<<" written with fail messages\n"; break;
   }
 
   progress->EndScope();
@@ -484,8 +434,8 @@ static Standard_Integer testwrite (Draw_Interpretor& di, Standard_Integer argc,
 {
   if (argc != 3)                                                                                      
     {                                                                                             
-      di << "ERROR in " << argv[0] << "Wrong Number of Arguments."<<"\n";                     
-      di << " Usage : " << argv[0] <<" file_name shape_name "<< "\n"; 
+      di << "ERROR in " << argv[0] << "Wrong Number of Arguments.\n";                     
+      di << " Usage : " << argv[0] <<" file_name shape_name \n"; 
       return 1;                                                                                 
     }
   STEPControl_Writer Writer;
@@ -494,10 +444,10 @@ static Standard_Integer testwrite (Draw_Interpretor& di, Standard_Integer argc,
   IFSelect_ReturnStatus stat = Writer.Transfer(shape,STEPControl_AsIs);
   stat = Writer.Write(filename);
   if(stat != IFSelect_RetDone){
-    di<<"Error on writing file"<<"\n";                                                               
+    di<<"Error on writing file\n";                                                               
     return 1; 
   }
-  di<<"File Is Written"<<"\n";
+  di<<"File Is Written\n";
   return 0;
 }
 
@@ -543,7 +493,7 @@ static Standard_Integer dumpassembly
   const Interface_Graph& graph = WS->Graph();
   
   STEPSelections_AssemblyExplorer exp(graph);
-  exp.Dump(cout);
+  exp.Dump(std::cout);
   return 0;
 }
 
@@ -552,7 +502,7 @@ static Standard_Integer stepfileunits (Draw_Interpretor& di, Standard_Integer ar
 
   if(  argc < 2)
   {
-    cout<<"Error: Invalid number of parameters. Should be: getfileunits name_file"<<endl;
+    std::cout<<"Error: Invalid number of parameters. Should be: getfileunits name_file"<<std::endl;
     return 1;
   }
   STEPControl_Reader aStepReader;
@@ -562,7 +512,7 @@ static Standard_Integer stepfileunits (Draw_Interpretor& di, Standard_Integer ar
  
   if (readstat != IFSelect_RetDone) {
     
-    di<<"No model loaded"<<"\n";
+    di<<"No model loaded\n";
     return 1;
   }
 
@@ -571,19 +521,19 @@ static Standard_Integer stepfileunits (Draw_Interpretor& di, Standard_Integer ar
   TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
   aStepReader.FileUnits( anUnitLengthNames,anUnitAngleNames,anUnitSolidAngleNames);
                                    
-  Standard_Integer i =1, nb = anUnitLengthNames.Length();
+  Standard_Integer i =1;
   di<<"=====================================================\n";
-  di<<"LENTH Unit"<<"\n";
+  di<<"LENTH Unit\n";
   for( ; i <= anUnitLengthNames.Length() ; i++)
     di<<anUnitLengthNames(i).ToCString()<<"\n";
   
   di<<"=====================================================\n";
-  di<<"Angle Unit"<<"\n";
+  di<<"Angle Unit\n";
   for( i =1 ; i <= anUnitAngleNames.Length() ; i++)
     di<<anUnitAngleNames(i).ToCString()<<"\n";
 
   di<<"=====================================================\n";
-  di<<"Solid Angle Unit"<<"\n";
+  di<<"Solid Angle Unit\n";
   for( i =1 ; i <= anUnitSolidAngleNames.Length() ; i++)
     di<<anUnitSolidAngleNames(i).ToCString()<<"\n";
   
@@ -603,6 +553,5 @@ void XSDRAWSTEP::InitCommands (Draw_Interpretor& theCommands)
   theCommands.Add("steptrans",     "steptrans shape stepax1 stepax2",  __FILE__, steptrans,     g);
   theCommands.Add("countexpected","TEST",                              __FILE__, countexpected, g);
   theCommands.Add("dumpassembly", "TEST",                              __FILE__, dumpassembly,  g);
-  theCommands.Add("readstep",      "readstep  [file]",                 __FILE__, readstep,      g);
   theCommands.Add("stepfileunits" , "stepfileunits name_file", __FILE__, stepfileunits,      g);
 }