How to locate the Indexes of arcs in a polycurve

Hello how do I isoloate the indexes of these arcs after they are integrated into multiple poly curves? I dont even understand how this polycurve node knew to make two poly curves from the data (but I am glad that it did!) but what I need to do is extract the index number of these arcs as they appear in their respective polycurve list. Thanks in advance

Convert to string and search for “Arc”.

Yeah I know that i can do that, but the problem is that the list that I would be searching for “Arc” is a flattened list. meaning it contains the arcs for both of the curves. i dont need the indexes in the flattened list. I need the indexes in the nested lists. Does that make sense?

You could try using Group Curves from Archi-lab to group your list of lines and arcs first. Then use the OotB PolyCurve.ByJoinedCurves to create your polycurves. This should keep the same order and list structure.

Arhi-lab is one of those packages that I cant install. Here is all I have when I down load that package. I can only create these if I publish them locally myself.

I would highly recommend getting that sorted out. Archi-lab is full of useful nodes.

Here is the code from the Group Curves node.
#Copyright© 2015, Konrad Sobon
# @arch_laboratory, http://archi-lab.net

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN

inputCurves = IN[0]

#join/group curves function
def groupCurves(Line_List): 
	ignore_distance = 0.1 # Assume points this close or closer to each other are touching 
	Grouped_Lines = [] 
	Queue = set() 
	while Line_List: 
		Shape = [] 
		Queue.add(Line_List.pop()) # Move a line from the Line_List to our queue 
		while Queue: 
			Current_Line = Queue.pop() 
			Shape.append(Current_Line) 
			for Potential_Match in Line_List: 
				Points = (Potential_Match.StartPoint, Potential_Match.EndPoint)
				for P1 in Points: 
					for P2 in (Current_Line.StartPoint, Current_Line.EndPoint): 
						distance = P1.DistanceTo(P2) 
						if distance <= ignore_distance: 
							Queue.add(Potential_Match) 
			Line_List = [item for item in Line_List if item not in Queue]
		Grouped_Lines.append(Shape) 
	return Grouped_Lines

OUT = groupCurves(inputCurves)
1 Like

I concur! Unfortunately. It has been escalated to our “not-so-attentive” IT department. Considering what I have seen so far, it my never happen, unless someone on this website can tell me how to do it. Thanks for the node!

You can start another thread with that question. Someone might be able to help you out.

I thought I already did. In any case, I was afraid that people would just direct me to one of the other threads on this forum about the same problem. However I already tried all of those solutions and none of them worked. Namely deleting all previous versions of dynamo, only limiting the packages to one directory, an deleting all instances of the packages except for one. Nothing worked. Do you have to have Microsoft visual studio (or something) installed to read the .DLL files in these packages?

Dynamo can read the .dll all by itself. File > Import Library.
You could also try downloading the package separately and copying the files to your directory rather than installing through Package Manager.

Unfortunately I already tried that as well. lol

@mix can you link me to a post indicating everything you have tried? I vaguely recall someone indicating the installation order (and complete uninstalls) was key in resolving this.

@mix On the package manager, you could also search for tstngwtrs-GroupCurves .
If you aren’t able to install this custom node, the contents of the node can be pasted in a code block as shown below.


The code is available at …

2 Likes