1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0031301: Data Exchange - Export to STEP corrupts the shape

For small edges fully covered by tolerances of vertices BSpline periodic curves are converted to not periodic BSpline curves by cutting segment before writing.
In the class TopoDSToStep_MakeStepEdge permute of edge vertices for closed curves was added for the case when the range obtained from the vertex projection contradicts the edge range in order to avoid computation of the invalid edge range after reading.
This commit is contained in:
gka
2020-02-27 15:26:42 +03:00
committed by azv
parent 1b6753c628
commit 0140cba7c5
8 changed files with 130 additions and 64 deletions

View File

@@ -42,6 +42,7 @@
#include <StepGeom_Conic.hxx>
#include <StepGeom_Curve.hxx>
#include <StepGeom_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
//=============================================================================
// Creation d' une Curve de prostep a partir d' une Curve de Geom
@@ -162,6 +163,10 @@ GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom2d_Curve)& C)
GeomToStep_MakeBoundedCurve MkBoundedC(L);
theCurve = MkBoundedC.Value();
}
else if (C->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
GeomToStep_MakeCurve aMaker = (Handle(Geom2d_TrimmedCurve)::DownCast(C)->BasisCurve());
theCurve = aMaker.Value();
}
else
done = Standard_False;
}

View File

@@ -53,6 +53,8 @@
#include <Transfer_FinderProcess.hxx>
#include <TransferBRep.hxx>
#include <TransferBRep_ShapeMapper.hxx>
#include <BRepTools.hxx>
#include <ShapeAnalysis_Curve.hxx>
// Processing of non-manifold topology (ssv; 11.11.2010)
// ----------------------------------------------------------------------------
@@ -65,8 +67,8 @@ TopoDSToStep_MakeStepEdge::TopoDSToStep_MakeStepEdge()
TopoDSToStep_MakeStepEdge::TopoDSToStep_MakeStepEdge
(const TopoDS_Edge& E,
TopoDSToStep_Tool& T,
const Handle(Transfer_FinderProcess)& FP)
TopoDSToStep_Tool& T,
const Handle(Transfer_FinderProcess)& FP)
{
done = Standard_False;
Init(E, T, FP);
@@ -77,9 +79,9 @@ TopoDSToStep_MakeStepEdge::TopoDSToStep_MakeStepEdge
// Purpose :
// ----------------------------------------------------------------------------
void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
TopoDSToStep_Tool& aTool,
const Handle(Transfer_FinderProcess)& FP)
void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
TopoDSToStep_Tool& aTool,
const Handle(Transfer_FinderProcess)& FP)
{
// ------------------------------------------------------------------
// The edge is given with its relative orientation (i.e. in the wire)
@@ -92,7 +94,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
if (isNMMode) {
Handle(StepShape_EdgeCurve) anEC;
Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aEdge);
if ( FP->FindTypedTransient(aSTEPMapper, STANDARD_TYPE(StepShape_EdgeCurve), anEC) ) {
if (FP->FindTypedTransient(aSTEPMapper, STANDARD_TYPE(StepShape_EdgeCurve), anEC)) {
// Non-manifold topology detected
myError = TopoDSToStep_EdgeDone;
myResult = anEC;
@@ -113,28 +115,28 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
Standard_Integer i;
Standard_Real U, U1, U2;
gp_Pnt P;
Standard_Boolean isSeam = BRep_Tool::IsClosed(aEdge, aTool.CurrentFace());
//:i4 abv 02 Sep 98: ProSTEP TR8 Motor.rle f3 & f62: check that edge
// participates twice in the wires of the face before making it seam
// (else it can have two pcurves on the same surface being shared by
// two faces on that surface)
// This fix is necessary because sharing of surfaces is not preserved when
// writing faces to STEP (see TopoDSToSTEP_MakeStepFace)
if ( isSeam ) {
if (isSeam) {
Standard_Integer count = 0;
TopExp_Explorer exp ( aTool.CurrentFace(), TopAbs_EDGE );
for ( ; exp.More(); exp.Next() )
if ( aEdge.IsSame ( exp.Current() ) ) count++;
if ( count < 2 ) isSeam = Standard_False;
TopExp_Explorer exp (aTool.CurrentFace(), TopAbs_EDGE);
for (; exp.More(); exp.Next())
if (aEdge.IsSame (exp.Current())) count++;
if (count < 2) isSeam = Standard_False;
}
BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge);
BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace());
if (aEdge.Orientation() == TopAbs_INTERNAL ||
aEdge.Orientation() == TopAbs_EXTERNAL ) {
aEdge.Orientation() == TopAbs_EXTERNAL) {
Handle(TransferBRep_ShapeMapper) errShape =
new TransferBRep_ShapeMapper(aEdge);
FP->AddWarning(errShape, " Edge(internal/external) from Non Manifold Topology");
@@ -142,18 +144,18 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
done = Standard_False;
return;
}
// Vertices
Handle(StepShape_Vertex) V1,V2;
Handle(StepShape_Vertex) V1, V2;
Handle(StepShape_TopologicalRepresentationItem) Gpms2;
TopoDS_Vertex Vfirst, Vlast;
TopExp::Vertices(aEdge,Vfirst, Vlast);
TopExp::Vertices(aEdge, Vfirst, Vlast);
TopoDSToStep_MakeStepVertex MkVertex;
MkVertex.Init(Vfirst, aTool, FP);
MkVertex.Init(Vfirst, aTool, FP);
if (MkVertex.IsDone())
V1 = Handle(StepShape_Vertex)::DownCast(MkVertex.Value());
else {
@@ -164,7 +166,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
done = Standard_False;
return;
}
MkVertex.Init(Vlast, aTool, FP);
if (MkVertex.IsDone())
V2 = Handle(StepShape_Vertex)::DownCast(MkVertex.Value());
@@ -176,22 +178,71 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
done = Standard_False;
return;
}
// ---------------------------------------
// Translate 3D representation of the Edge
// ---------------------------------------
Handle(StepGeom_Curve) Gpms;
Handle(Geom_Curve) C = CA.Curve().Curve();
if (!C.IsNull()) {
C = Handle(Geom_Curve)::DownCast(C->Copy());
if (C->IsPeriodic())
{
Standard_Real dpar = CA.LastParameter() - CA.FirstParameter();
Standard_Real aTolV1 = BRep_Tool::Tolerance(Vfirst);
Standard_Real aTolV2 = BRep_Tool::Tolerance(Vlast);
gp_Pnt aP1 = BRep_Tool::Pnt(Vfirst);
gp_Pnt aP2 = BRep_Tool::Pnt(Vlast);
gp_Pnt pproj;
gp_Pnt aP11 = CA.Value(CA.FirstParameter());
gp_Pnt aP12 =CA.Value(CA.LastParameter());
ShapeAnalysis_Curve sac;
sac.Project (C, aP1, Tolerance(), pproj, U1, Standard_False);
sac.Project (C, aP2, Tolerance(), pproj, U2, Standard_False);
Standard_Real dU = U2 - U1;
if (dpar <= 0)
dpar += (ceil(fabs(dpar) / C->Period()) *C->Period());
if (dU <= 0)
dU += (ceil(fabs(dU) / C->Period()) *C->Period());
// if range obtained from projection of vertices is contradicted with range of the edge
//tnen vertices should be permuted
if ((dU > Precision::PConfusion() && dU <= 0.1 * C->Period() && dpar > 0.5 * C->Period()) ||
(dpar > Precision::PConfusion() && dpar <= 0.1 * C->Period() && dU > 0.5 * C->Period()))
{
Handle(StepShape_Vertex) aVtemp = V1;
V1 = V2; V2 = aVtemp;
}
gp_Pnt aPm = CA.Value((CA.FirstParameter() + CA.LastParameter()) *0.5);
Standard_Real aDist11 = aP11.Distance(aP12);
Standard_Real aDist1m = aP11.Distance(aPm);
Standard_Real aDist2m = aP12.Distance(aPm);
Standard_Real aDistMax = Max(Max(aDist1m, aDist2m), aDist11);
Standard_Boolean isSmallCurve = (aDistMax <= aTolV1 || aDistMax <= aTolV2);
//for small edge lying BSpline periodic curve segment of the BSpline periodic curve is used to avoid invalid computation of the edge range duriring reading
if (BRepTools::Compare(Vfirst, Vlast) && isSmallCurve && C->IsPeriodic() && dpar > Precision::PConfusion() && dpar <= 0.1 * C->Period())
{
if (C->IsKind(STANDARD_TYPE(Geom_BSplineCurve)))
{
Handle(Geom_BSplineCurve) aBspl1 = Handle(Geom_BSplineCurve)::DownCast(C->Copy());
aBspl1->Segment (CA.FirstParameter(), CA.LastParameter());
C = aBspl1;
}
}
}
gp_Trsf Tr1 = CA.Trsf();
C->Transform(Tr1);
GeomToStep_MakeCurve MkCurve(C);
Gpms = MkCurve.Value();
}
else {
// -------------------------
// a 3D Curve is constructed
// -------------------------
@@ -200,41 +251,41 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
std::cout << "Warning: TopoDSToStep_MakeStepEdge: edge without 3d curve; creating..." << std::endl;
#endif
if ((SA.GetType() == GeomAbs_Plane) &&
(CA.GetType() == GeomAbs_Line)) {
(CA.GetType() == GeomAbs_Line)) {
U1 = CA.FirstParameter();
U2 = CA.LastParameter();
gp_Vec V = gp_Vec( CA.Value(U1), CA.Value(U2) );
Handle(Geom_Line) L =
new Geom_Line(CA.Value(U1), gp_Dir(V));
gp_Vec V = gp_Vec(CA.Value(U1), CA.Value(U2));
Handle(Geom_Line) L =
new Geom_Line(CA.Value(U1), gp_Dir(V));
GeomToStep_MakeLine MkLine(L);
Gpms = MkLine.Value();
}
else {
// To Be Optimized : create an approximated BSpline
// using GeomAPI_PointsToBSpline
TColgp_Array1OfPnt Points(1,Nbpt);
TColStd_Array1OfReal Knots(1,Nbpt);
TColStd_Array1OfInteger Mult(1,Nbpt);
TColgp_Array1OfPnt Points(1, Nbpt);
TColStd_Array1OfReal Knots(1, Nbpt);
TColStd_Array1OfInteger Mult(1, Nbpt);
U1 = CA.FirstParameter();
U2 = CA.LastParameter();
for ( i=1; i<=Nbpt; i++ ) {
U = U1 + (i-1)*(U2 - U1)/(Nbpt - 1);
P = CA.Value(U);
Points.SetValue(i,P);
Knots.SetValue(i,U);
Mult.SetValue(i,1);
for (i=1; i<=Nbpt; i++) {
U = U1 + (i-1)*(U2 - U1)/(Nbpt - 1);
P = CA.Value(U);
Points.SetValue(i, P);
Knots.SetValue(i, U);
Mult.SetValue(i, 1);
}
//Points.SetValue(1, BRep_Tool::Pnt(Vfirst));
//Points.SetValue(Nbpt, BRep_Tool::Pnt(Vlast));
Mult.SetValue(1,2);
Mult.SetValue(Nbpt,2);
Handle(Geom_Curve) Bs =
new Geom_BSplineCurve(Points, Knots, Mult, 1);
Mult.SetValue(1, 2);
Mult.SetValue(Nbpt, 2);
Handle(Geom_Curve) Bs =
new Geom_BSplineCurve(Points, Knots, Mult, 1);
GeomToStep_MakeCurve MkCurve(Bs);
Gpms = MkCurve.Value();
}
}
// ---------------------------------------------------------
// Warning : if the edge is connected aGeom->Length = 2
// otherwise = 1 ;
@@ -244,12 +295,12 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
//:abv 25.01.00 CAX-IF TRJ3
// if PcurveMode is 1 (default), make surface_curve instead of simple 3d curve
if ( aTool.PCurveMode() != 0 ) {
if (aTool.PCurveMode() != 0) {
Handle(StepGeom_HArray1OfPcurveOrSurface) aGeom =
new StepGeom_HArray1OfPcurveOrSurface(1,2);
new StepGeom_HArray1OfPcurveOrSurface(1, 2);
Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString("");
if (!isSeam) {
Handle(StepGeom_SurfaceCurve) SurfaceCurve = new StepGeom_SurfaceCurve;
SurfaceCurve->Init(aName, Gpms, aGeom, StepGeom_pscrPcurveS1);
@@ -261,12 +312,12 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
Gpms = SeamCurve;
}
}
// Edge curve
Handle(StepShape_EdgeCurve) Epms = new StepShape_EdgeCurve;
Handle(TCollection_HAsciiString) aName = new TCollection_HAsciiString("");
Epms->Init(aName, V1, V2, Gpms, Standard_True);
aTool.Bind(aEdge, Epms);
myError = TopoDSToStep_EdgeDone;
myResult = Epms;
@@ -279,7 +330,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
// Purpose :
// ----------------------------------------------------------------------------
const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepEdge::Value() const
const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepEdge::Value() const
{
StdFail_NotDone_Raise_if (!done, "TopoDSToStep_MakeStepEdge::Value() - no result");
return myResult;
@@ -290,7 +341,7 @@ const Handle(StepShape_TopologicalRepresentationItem)& TopoDSToStep_MakeStepEdge
// Purpose :
// ----------------------------------------------------------------------------
TopoDSToStep_MakeEdgeError TopoDSToStep_MakeStepEdge::Error() const
TopoDSToStep_MakeEdgeError TopoDSToStep_MakeStepEdge::Error() const
{
return myError;
}

5
tests/bugs/step/bug31301 Normal file
View File

@@ -0,0 +1,5 @@
testreadstep [locate_data_file bug31301.stp] s
testwritestep bug31301_1.stp s
testreadstep bug31301_1.stp s1
checkshape s1 f
checkmaxtol s1 -ref 0.0078

View File

@@ -1,17 +1,16 @@
# !!!! This file is generated automatically, do not edit manually! See end script
puts "TODO CR23096 ALL: CHECKSHAPE : Faulty"
puts "TODO CR23096 ALL: TOLERANCE : Faulty"
set filename trj7_pm5-ug-214.stp
set ref_data {
DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 )
TPSTAT : Faulties = 0 ( 0 ) Warnings = 5 ( 184 ) Summary = 5 ( 184 )
CHECKSHAPE : Wires = 2 ( 0 ) Faces = 2 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
TPSTAT : Faulties = 0 ( 0 ) Warnings = 3 ( 184 ) Summary = 3 ( 184 )
CHECKSHAPE : Wires = 1 ( 0 ) Faces = 1 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 236 ( 236 )
STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 236 ( 236 ) FreeWire = 0 ( 0 )
TOLERANCE : MaxTol = 0.9036712735 ( 0.01854047103 ) AvgTol = 0.002850040066 ( 0.0006030086632 )
TOLERANCE : MaxTol = 0.004380869792 ( 0.01854047103 ) AvgTol = 0.000165684279 ( 0.0006030086632 )
LABELS : N0Labels = 1 ( 1 ) N1Labels = 34 ( 34 ) N2Labels = 0 ( 0 ) TotalLabels = 35 ( 35 ) NameLabels = 1 ( 1 ) ColorLabels = 35 ( 35 ) LayerLabels = 1 ( 1 )
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )
NCOLORS : NColors = 11 ( 11 )

View File

@@ -6,11 +6,11 @@ set filename test-m020306-v1.stp
set ref_data {
DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 )
TPSTAT : Faulties = 0 ( 0 ) Warnings = 153 ( 114 ) Summary = 153 ( 114 )
TPSTAT : Faulties = 1 ( 0 ) Warnings = 153 ( 114 ) Summary = 154 ( 114 )
CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 742 ( 742 )
STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 742 ( 742 ) FreeWire = 0 ( 0 )
TOLERANCE : MaxTol = 0.008481946718 ( 0.01167623167 ) AvgTol = 0.000132472064 ( 0.0003097606769 )
TOLERANCE : MaxTol = 0.008481946718 ( 0.01167623167 ) AvgTol = 0.0001322682241 ( 0.0003097606769 )
LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 )
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )
NCOLORS : NColors = 0 ( 0 )

View File

@@ -1,13 +1,16 @@
# !!!! This file is generated automatically, do not edit manually! See end script
puts "TODO CR23096 ALL: TPSTAT : Faulty"
set filename test-m020306-v2.stp
set ref_data {
DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 )
TPSTAT : Faulties = 0 ( 0 ) Warnings = 61 ( 157 ) Summary = 61 ( 157 )
TPSTAT : Faulties = 1 ( 0 ) Warnings = 63 ( 157 ) Summary = 64 ( 157 )
CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
NBSHAPES : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 956 ( 956 )
STATSHAPE : Solid = 1 ( 1 ) Shell = 1 ( 1 ) Face = 956 ( 956 ) FreeWire = 0 ( 0 )
TOLERANCE : MaxTol = 0.008481946718 ( 0.05394823207 ) AvgTol = 0.0001239210367 ( 0.0004089750747 )
TOLERANCE : MaxTol = 0.008481946718 ( 0.01167623167 ) AvgTol = 0.000123986292 ( 0.0003770309367 )
LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 )
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )
NCOLORS : NColors = 0 ( 0 )

View File

@@ -1,13 +1,16 @@
# !!!! This file is generated automatically, do not edit manually! See end script
puts "TODO CR23096 ALL: TPSTAT : Faulty"
set filename Inventor_Engine.stp
set ref_data {
DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 )
TPSTAT : Faulties = 0 ( 0 ) Warnings = 456 ( 560 ) Summary = 456 ( 560 )
TPSTAT : Faulties = 1 ( 0 ) Warnings = 455 ( 560 ) Summary = 456 ( 560 )
CHECKSHAPE : Wires = 6 ( 6 ) Faces = 6 ( 6 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
NBSHAPES : Solid = 47 ( 47 ) Shell = 47 ( 47 ) Face = 4454 ( 4454 )
STATSHAPE : Solid = 80 ( 80 ) Shell = 80 ( 80 ) Face = 5356 ( 5356 ) FreeWire = 0 ( 0 )
TOLERANCE : MaxTol = 2.37122237 ( 2.449305641 ) AvgTol = 0.002570949956 ( 0.002589629313 )
TOLERANCE : MaxTol = 2.371238233 ( 2.449305641 ) AvgTol = 0.001672277308 ( 0.002589629313 )
LABELS : N0Labels = 52 ( 52 ) N1Labels = 86 ( 86 ) N2Labels = 0 ( 0 ) TotalLabels = 138 ( 138 ) NameLabels = 136 ( 136 ) ColorLabels = 47 ( 47 ) LayerLabels = 0 ( 0 )
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )
NCOLORS : NColors = 11 ( 11 )

View File

@@ -7,11 +7,11 @@ set filename Z8INV5.stp
set ref_data {
DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 )
TPSTAT : Faulties = 0 ( 0 ) Warnings = 120 ( 620 ) Summary = 120 ( 620 )
CHECKSHAPE : Wires = 15 ( 16 ) Faces = 17 ( 18 ) Shells = 1 ( 1 ) Solids = 0 ( 0 )
NBSHAPES : Solid = 22 ( 22 ) Shell = 25 ( 24 ) Face = 1520 ( 1519 )
STATSHAPE : Solid = 22 ( 22 ) Shell = 25 ( 24 ) Face = 1520 ( 1519 ) FreeWire = 0 ( 0 )
TOLERANCE : MaxTol = 7.499684301 ( 7.499684301 ) AvgTol = 0.03452373473 ( 0.03544461059 )
TPSTAT : Faulties = 0 ( 0 ) Warnings = 121 ( 620 ) Summary = 121 ( 620 )
CHECKSHAPE : Wires = 15 ( 16 ) Faces = 18 ( 18 ) Shells = 1 ( 1 ) Solids = 0 ( 0 )
NBSHAPES : Solid = 22 ( 22 ) Shell = 25 ( 24 ) Face = 1521 ( 1519 )
STATSHAPE : Solid = 22 ( 22 ) Shell = 25 ( 24 ) Face = 1521 ( 1519 ) FreeWire = 0 ( 0 )
TOLERANCE : MaxTol = 7.499684301 ( 7.499684301 ) AvgTol = 0.03357316863 ( 0.03544461059 )
LABELS : N0Labels = 25 ( 25 ) N1Labels = 23 ( 23 ) N2Labels = 0 ( 0 ) TotalLabels = 48 ( 48 ) NameLabels = 48 ( 48 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 )
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )
NCOLORS : NColors = 0 ( 0 )