Wrong spline when using Cadlib4

1
dalit
6/16/2021 3:34 PM

Hi,

I'm reading splines using GraphicsConfig :

C# Code:
void DrawSpline(DxfSpline spline)
{
DxfModel tmpModel = new DxfModel();
tmpModel.Entities.Add(spline);


GraphicsConfig gc = new GraphicsConfig();
gc.NoOfSplineLineSegments = maxNoOfSplineLineSegments;
DrawContext.Wireframe drawContext =
new DrawContext.Wireframe.ModelSpace(
tmpModel,
gc,
Matrix4D.Identity
);

m_currentPolys = new List<DxfLwPolyline>();

tmpModel.Draw(drawContext, this);

DxfLwPolyline curPoly = m_currentPolys[0];
}

Recently, we moved to CadLib 4, and the polyline I get from this function is less accurate,

I tried to use larger 'maxNoOfSplineLineSegments', it didn't help.

Is there a new behavior that I must be aware of in this version?

Thanks,

Dalit

dalit
6/16/2021 4:10 PM

I'm adding my graphicConfiguration parameters, may be I should change something in them


I see that changin the values of ShapeFlattenEpsilon and ShapeFlattenEpsilonForBoundsCalculation make spline works better.

Is there a documantaion for those parameters so I can understand the values that I should put there?

Thanks,

Dalit

1