# Subtraction lists

**URL:** https://forum.dynamobim.com/t/subtraction-lists/6278
**Category:** Uncategorized
**Created:** [September 20, 2016, 2:52pm UTC](https://forum.dynamobim.com/t/subtraction-lists/6278 "2016-09-20T14:52:23Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![alex\_volt](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@alex\_volt](https://forum.dynamobim.com/u/alex_volt)
#### Post date: [September 20, 2016, 2:52pm UTC](https://forum.dynamobim.com/t/subtraction-lists/6278/1 "2016-09-20T14:52:23Z")

</div>

List 1 with 12 points (red in the picture)  
List 2 with 5 points (green in the picture)

subtraction —\> 7 points —\> List 3

It does not work the phrase (python image):

if not (math.fabs (r-ind) == 0):

r index List 1

ind index points to substract

indexes results (points [1], [5], [10], [11])

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/c/c5e6cfcc3448284666ea4c27ad69eb22565b55e6.jpg) ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/b/ba73e38f943c3d58f6ac167a2967b3287893c4e7.jpg)

---

<div class="post-metadata">

### Author: ![alex\_volt](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@alex\_volt](https://forum.dynamobim.com/u/alex_volt)
#### Post date: [September 20, 2016, 4:07pm UTC](https://forum.dynamobim.com/t/subtraction-lists/6278/2 "2016-09-20T16:07:10Z")

</div>

I solved  
with List.Remove Item Index node  
subtracting the indices

Python script —\> find indices:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/b/b025f1444c33c23feea948b33b97397ae862270a.jpg)

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [September 21, 2016, 3:09am UTC](https://forum.dynamobim.com/t/subtraction-lists/6278/3 "2016-09-21T03:09:09Z")

</div>

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/3/3c6edcdece38bb890e0c50632da9918180330fb5.png)

---

<div class="post-metadata">

### Author: ![alex\_volt](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@alex\_volt](https://forum.dynamobim.com/u/alex_volt)
#### Post date: [September 27, 2016, 3:05pm UTC](https://forum.dynamobim.com/t/subtraction-lists/6278/4 "2016-09-27T15:05:11Z")

</div>

Thanks for the answer  
Sometimes the node “SetDifference” does not work

---

<div class="post-metadata">

### Author: ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)
#### Post date: [September 29, 2016, 3:36am UTC](https://forum.dynamobim.com/t/subtraction-lists/6278/5 "2016-09-29T03:36:23Z")

</div>

@alex_volt It sometimes doesn’t work due to a precision issue.  
A workaround is to reconstruct the points after rounding off the X,Y and Z coordinate values to fewer decimal places

---

<div class="post-metadata">

### Author: ![alex\_volt](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@alex\_volt](https://forum.dynamobim.com/u/alex_volt)
#### Post date: [December 28, 2016, 8:42pm UTC](https://forum.dynamobim.com/t/subtraction-lists/6278/6 "2016-12-28T20:42:38Z")

</div>

Difference between lines:  
List No.1 —\> 12 lines  
List No. 2 —\> 8 lines  
4 equal number lines  
Unlike lists —\> appearance 8 lines instead output = list No.1  
any help ??

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/a/ea351ef7e0da239ff1d3dd4c1183e070bce92674.jpg)

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/2/0299219aaca32d5dd18f7f99bcb0fb7b986b5b6a.jpg)

![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/d/ed1150484c8cac5c04f9595ad225219fec21ab2c.jpg)
