I’ve been trying to make use of the HiddenLine class from RhinoCommon, to try to recreate the Make2D(Grasshopper) component.
I happen to get a few extra lines (geometry) from my code, which is not the case when I use the default Make2D component. Can someone let me know what I’ve missed?
Also, why is it that the python version-that only creates one type of lines(visible)- slower than the native component-that creates both visible and hidden_lines? Is this a Python vs C# issue?
EDIT: I tried to SolidUnion the input Geometry before passing it to the Python, and the extra lines disappear only if the Union is successful (i.e. if the outcome is a single geometry). But, doesn’t work for nearly-but-not intersecting geometries.
I actually wrote the same sample in both C# and Python. I get the expected result from the C# component, but not the Python. Not sure why. @piac do you have an idea what might be the issue here? 2020.12.09 - Make2D Cleanup_RI.gh (119.5 KB)
Thank you for your reply. I noticed that the C# script has a foreach loop (Line 38). So, I changed the geometry to ListAccess and added a similar loop. It seems to work as expected now.
line takes the maximum time, in calculating all types of lines irrespective of what we require. We then filter the ones we need and display them (if I’m not wrong). Is there any way to tweak that to compute only crv_vis lines?
Since I’m trying to automate >400 Drawings, with my current speed at 60 seconds per drawing. (~ 6 Hours of not knowing if the program froze, or it’s computing)
Ok, I see it now, the Python was processing the result one object at a time.
You can try to set “IncludeHiddenCurves” to false and see if that makes a difference.