# Welding inside a group

How can I weld vertices by threshold inside a group node?? I am writing a code which will attach all the same named objects (this part is already solved and discussed in this forum) and then weld the vertices by desired threshold (0.001)...it is working perfectly with geometries...but when those geometries are inside a "group"...it is not taling the thresold (welding is still working though)....since the threshold is an unknown property for group node. Any solution??

My code till now:

(
fn weldverts obj =
(
\$.weldThreshold = 0.001
polyop.weldVertsByThreshold obj #All
)

newworking = #()

for o in geometry do
(
if classof o == editable_poly do
(
append newworking o
)
)

i = 1

while i <= newworking.count do
(
b = newworking[i]
j = i + 1
while j<= newworking.count do
(
if (newworking[j].name == b.name) then
(
b.attach (newworking[j]) b
deleteItem newworking j
select b
weldverts b
)
else
(
j = j +1
)
)

i = i + 1
)

)

## Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

### I've learned all welding

I've learned all welding techniques upon enrolling in one of the prestigious welding classes here in Texas and I've gained so much knowledge from that. Welding is becoming more and more in-demand job here and abroad.

### Weld by Threshold

```weld = polyop.weldVertsByThreshold --keep interface operations outside for-loop
for o in geometry where isKindOf o editable_poly and not isGroupHead o do
(
o.weldThreshold = 0.01
weld o (o.verts as bitarray)
)```

barigazy

### Thanks barigazy!!!

Thanks barigazy!!!

## Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.