Subtraction component changes tree structure

When you use the subtraction component it cleans your tree of empty branches. This is not a desired behavior for me. I need my empty branches most times. is this on purpose?

Eh, sort of. It was designed this way but I think this is a case that should have been handled specially. The old subtraction component only ever had two inputs, both of which needed to be specified, this made it behave like any other component.

The new subtraction can have a variable amount of inputs, and because I don’t want the component to stop working if one or a few of those inputs are empty, they have to be made optional. This messes with the standard behaviour.

I logged this under RH-45811. Hoping to get through my 6.x backlog sometime this week.

1 Like

Can you get around the problem by using R5 Subtraction instead of R6? I don’t know how to do that other than copy/paste from an R5 document? The incompatibilities between R5 and R6 introduced by the trivial change of supporting multiple inputs on these basic math components is staggering! Highly inconvenient.

How do I find the old Rhiino5 components in Grasshopper?

On the double click popup window --> type #substraction will show you several obsolete components of previous versions.
shortcut

It can be hard to choose from the #obsolete components as they’re ordered randomly… try pasting this chunk of XML onto the canvas and save the resulting component as a .ghuser for future use

<?xml version="1.0" encoding="utf-8" standalone="yes"?><Archive name="Root"><chunks count="1"><chunk name="Clipboard"><items count="1"><item name="plugin_version" type_name="gh_version" type_code="80"><Major>0</Major><Minor>9</Minor><Revision>80</Revision></item></items><chunks count="2"><chunk name="DefinitionProperties"><items count="3"><item name="Date" type_name="gh_date" type_code="8">636609055734629040</item><item name="Description" type_name="gh_string" type_code="10"></item><item name="Name" type_name="gh_string" type_code="10">unnamed</item></items><chunks count="3"><chunk name="Revisions"><items count="1"><item name="RevisionCount" type_name="gh_int32" type_code="3">0</item></items></chunk><chunk name="Projection"><items count="2"><item name="Target" type_name="gh_drawing_point" type_code="30"><X>193</X><Y>251</Y></item><item name="Zoom" type_name="gh_single" type_code="5">0.7155418</item></items></chunk><chunk name="Views"><items count="1"><item name="ViewCount" type_name="gh_int32" type_code="3">0</item></items></chunk></chunks></chunk><chunk name="DefinitionObjects"><items count="1"><item name="ObjectCount" type_name="gh_int32" type_code="3">1</item></items><chunks count="1"><chunk name="Object" index="0"><items count="2"><item name="GUID" type_name="gh_guid" type_code="9">2c56ab33-c7cc-4129-886c-d5856b714010</item><item name="Name" type_name="gh_string" type_code="10">Subtraction</item></items><chunks count="1"><chunk name="Container"><items count="4"><item name="Description" type_name="gh_string" type_code="10">Mathematical subtraction</item><item name="InstanceGuid" type_name="gh_guid" type_code="9">63f76762-e357-4b46-b616-86ce6b826195</item><item name="Name" type_name="gh_string" type_code="10">Subtraction</item><item name="NickName" type_name="gh_string" type_code="10">A-B</item></items><chunks count="4"><chunk name="Attributes"><items count="3"><item name="Bounds" type_name="gh_drawing_rectanglef" type_code="35"><X>32</X><Y>23</Y><W>55</W><H>44</H></item><item name="Pivot" type_name="gh_drawing_pointf" type_code="31"><X>58</X><Y>45</Y></item><item name="Selected" type_name="gh_bool" type_code="1">true</item></items></chunk><chunk name="param_input" index="0"><items count="6"><item name="Description" type_name="gh_string" type_code="10">Item to subtract from (minuend)</item><item name="InstanceGuid" type_name="gh_guid" type_code="9">959c05ff-b99e-4d39-8358-d24a1e526962</item><item name="Name" type_name="gh_string" type_code="10">A</item><item name="NickName" type_name="gh_string" type_code="10">A</item><item name="Optional" type_name="gh_bool" type_code="1">false</item><item name="SourceCount" type_name="gh_int32" type_code="3">0</item></items><chunks count="1"><chunk name="Attributes"><items count="3"><item name="Bounds" type_name="gh_drawing_rectanglef" type_code="35"><X>34</X><Y>25</Y><W>9</W><H>20</H></item><item name="Pivot" type_name="gh_drawing_pointf" type_code="31"><X>40</X><Y>35</Y></item><item name="Selected" type_name="gh_bool" type_code="1">true</item></items></chunk></chunks></chunk><chunk name="param_input" index="1"><items count="6"><item name="Description" type_name="gh_string" type_code="10">Item to subtract (subtrahend)</item><item name="InstanceGuid" type_name="gh_guid" type_code="9">c2e56dae-6123-43aa-9d0a-dc27ea4162a6</item><item name="Name" type_name="gh_string" type_code="10">B</item><item name="NickName" type_name="gh_string" type_code="10">B</item><item name="Optional" type_name="gh_bool" type_code="1">false</item><item name="SourceCount" type_name="gh_int32" type_code="3">0</item></items><chunks count="1"><chunk name="Attributes"><items count="3"><item name="Bounds" type_name="gh_drawing_rectanglef" type_code="35"><X>34</X><Y>45</Y><W>9</W><H>20</H></item><item name="Pivot" type_name="gh_drawing_pointf" type_code="31"><X>40</X><Y>55</Y></item><item name="Selected" type_name="gh_bool" type_code="1">true</item></items></chunk></chunks></chunk><chunk name="param_output" index="0"><items count="6"><item name="Description" type_name="gh_string" type_code="10">The result of the Subtraction</item><item name="InstanceGuid" type_name="gh_guid" type_code="9">e0df16ae-d495-4199-8587-bf0d5189f656</item><item name="Name" type_name="gh_string" type_code="10">Result</item><item name="NickName" type_name="gh_string" type_code="10">R</item><item name="Optional" type_name="gh_bool" type_code="1">false</item><item name="SourceCount" type_name="gh_int32" type_code="3">0</item></items><chunks count="1"><chunk name="Attributes"><items count="3"><item name="Bounds" type_name="gh_drawing_rectanglef" type_code="35"><X>73</X><Y>25</Y><W>12</W><H>40</H></item><item name="Pivot" type_name="gh_drawing_pointf" type_code="31"><X>79</X><Y>45</Y></item><item name="Selected" type_name="gh_bool" type_code="1">true</item></items></chunk></chunks></chunk></chunks></chunk></chunks></chunk></chunks></chunk></chunks></chunk></chunks></Archive>

R5_math
R5_math.gh (4.0 KB)

All you need to do is drag the appropriate GUID into Grasshopper, you don’t need to embed it into an entire document.

2c56ab33-c7cc-4129-886c-d5856b714010
2 Likes

Ah yes, forgot about that one… (for what it’s worth, drag-and-drop still doesn’t work on GH for Mac)

It would be nice if pasting a GUID string onto the canvas also instantiates the component under the cursor :slight_smile:

RH-45811 is fixed in the latest Service Release Candidate