Points are likely coincident

Hey all,

I am unable to create a polycurve because of the “Points are likely coincident” warning.
Prune Points does not work.

Any ideas?

Points are coincident.dwg (2.8 MB)

@Sofie_Kopolla is the geometry working range set to Medium?

1 Like

It is. I amend the settings but i have the same issue.

What is the distance from the internal origin?

@Sofie_Kopolla Try this.

Python_Polyline to PolyCurve.dyn (6.2 KB)

4 Likes

Hello @Sofie_Kopolla, sometimes applying previously OVERKILL command in AutoCAD in your polyline works, and the error disapear in dynamo.

2 Likes

Happy New year @Paolo_Emilio_Serra1 and Civil3D forum!

TEST.dwg (2.9 MB) WFD_ObjectDataToExcel.dyn (65.3 KB)

Paolo thanks for your help, very impressive skillset!!
I am trying to modify your script and collectively prune and regenerate the null polycurves.
Would you be able to have a look at the code, please?

@Sofie_Kopolla happy 2020 to you too.

this looks like a good starting point for what you are trying to do https://forums.autodesk.com/t5/net/commandended-event-handling-with-overkill/m-p/3768606#M33312

Thanks Paolo,

I have tried overkilling the file but it doesn’t really do the trick.
Is there any method i can follow to regenerate a list of null objects via Dynamo?

Thanks in advance for your time,
Sofia

if they are null… I don’t think so as I cannot call any method on a null object.

You can continue with the Python approach I shared previously but you need to keep an eye on indentation (lines 83-84 in your code should be indented).
Also you need to make sure you are processing only Polyline3d objects, you can add a line like this:
if not isinstance(obj, Polyline3d): continue

1 Like

Hello Paolo,

Great solution.

Now I am trying to import the polyline from the layers, but it the python script is not working. I need to change the code line: obj = dyn.InternalDBObject #t.GetObject

I am not a Python expert. Please could you advice how should I change the code?

image

I believe you get the error because of the list structure of your input. In your case it seems that obj is a list containing the polyline instead of the polyline it self, so the code is trying to execute on the list instead of the polyline. Try the following suggestion to get around this issue.

Modifying the pythoncode in the .dyn from this post: Points are likely coincident

Try swapping

OUT = my_function(IN[0])

with

def ProcessList(_func, _list):
    return list(map(lambda x: ProcessList(_func, x) if type(x)==list else _func(x), _list ))

def tolist(obj):
    if not isinstance(obj, list):
        return [obj]
    else:
        return obj

_result = ProcessList(my_function, tolist(IN[0]))

if len(_result ) == 1 and not isinstance(IN[0],list):
    _result  = _result[0]

OUT = _result

Hope it works :slight_smile:

2 Likes

it is working! Awesome! Thanks so much for your time and help!

1 Like

Hi Andre,

I am trying almost the same, but I have a different list structure. When I run the python script it seems that the number of curves are not the same at it should be with the Object.Geometry node. Do you know the reason behind this?

Many thanks!

My guess would be it has to do with the code that actually does the work here, which is the code posted earlier. What I posted simply helps handling different list structures as input.
From the image you posted I cannot really tell what the difference is as you describe it. Could you post something that shows the difference a bit more clearly?

Andre,

I have attached the dwg and the dynamo files. At the end I want to avoid the error (*Warning: Object.get_Geometry operation failed. *
Unable to create Line. Points are likely coincident)

With the python script I get close polylines

DYN_LINES.dyn (34.9 KB) CIVIL3D-LINES.dwg (430.2 KB)

1 Like

Do you have 8 “null” values in the “Object.Geometry” Node output? If so my guess is that you have 8 lines that have start point - end point on top of eachother.

I don’t use Civil 3D as I am a Revit user so I cannot use the correct version of Dynamo to test, I am sorry.

Thanks for the answer.

The start point and the end point of the polylines are not the same. I think it is something regarding polylines with worldwide coordinates (far from the 0,0,0)

@enrique.sg have you got to use Python? Can’t you use the Toolkit?

2 Likes

Solved! I did not know about this specific node within the Toolkit

Regards