HiddenLineDrawing.Compute Confusion

I’m confused. When I use HiddenLineDrawing sometimes it will create wrong curves in result. But after I move a little bit, the result is right.

void Create2DCurves(Plane viewPlane, List<RhinoObject> obj_List, ref List<Curve> result)
            var viewPort = new RhinoViewport();
            viewPort.SetToPlanView(viewPlane.Origin, viewPlane.XAxis, viewPlane.YAxis, false);
            viewPort.SetCameraLocations(viewPlane.Origin - viewPlane.Normal * 10000, viewPlane.Origin);
            var hld_params = new HiddenLineDrawingParameters
                AbsoluteTolerance = DocInfo.AbsoluteTolerance,
                Flatten = true,
                IncludeTangentSeams = false,
                IncludeTangentEdges = true,
                IncludeHiddenCurves = true
            foreach (var obj_prj in obj_List)
                if (obj_prj != null)
                    hld_params.AddGeometry(obj_prj.Geometry,  obj_prj.Id);
                var hld = HiddenLineDrawing.Compute(hld_params, true);
                if (hld != null)
                    Rhino.DocObjects.RhinoObject newObjInDft = null;
                    foreach (var hld_curve in hld.Segments)
                        if (hld_curve?.ParentCurve == null || hld_curve.ParentCurve.SilhouetteType == SilhouetteType.None)
                        var crv = hld_curve.CurveGeometry.DuplicateCurve();
                        if (crv != null)
                            newObjInDft = null;   
                            if (hld_curve.SegmentVisibility == HiddenLineDrawingSegment.Visibility.Visible)                                                            


wrong_1213.3dm (95.6 KB)

I don’t have experience with this function, but usually this kind of behavior is due to tolerances.
Tried increasing AbsoluteTolerance slightly to see if that has any impact.

i tried ,but seems it doesnt work ;(

Ok, sorry, I have no other ideas.
Maybe a developer will come by here…

That’s ok, thank you : )

Is there something wrong with Brep,when I use “brep.Faces.ShrinkFaces()”, the result seem much better!