Chem4Word / Version3-2

Version 2022 (3.2) of Chem4Word - A Chemistry Add-In for Microsoft Word
https://www.chem4word.co.uk
Other
21 stars 2 forks source link

Can't see the bond after changing the hydrogen placement #32

Closed tomyan112 closed 2 years ago

tomyan112 commented 2 years ago

Describe the bug Can't see the bond after changing the hydrogen placement

To Reproduce

  1. image

  2. image

  3. image

Expected behavior image

Edit: Add markdown to format cml properly CML Data

<cml:cml xmlns:conventions="http://www.xml-cml.org/convention/" xmlns:cml="http://www.xml-cml.org/schema" xmlns:cmlDict="http://www.xml-cml.org/dictionary/cml/" xmlns:nameDict="http://www.xml-cml.org/dictionary/cml/name/" xmlns:c4w="http://www.chem4word.com/cml" conventions="convention:molecular">
  <c4w:customXmlPartGuid>3f0f6e68835b4b109cd05b2a60633116</c4w:customXmlPartGuid>
  <cml:molecule id="m1">
    <cml:formula id="m1.f0" concise="C 2 H 4" />
    <cml:formula id="m1.f1" convention="chem4word:ResolvedFormula" inline="C2H4" concise="C 2 H 4" />
    <cml:formula id="m1.f2" convention="chem4word:ResolvedSmiles" inline="C=C" concise="C 2 H 4" />
    <cml:name id="m1.n1" dictRef="chem4word:CalculatedInchi">1S/C2H4/c1-2/h1-2H2</cml:name>
    <cml:name id="m1.n2" dictRef="chem4word:CalculatedInchikey">VGGSQFUCUMXWEO-UHFFFAOYSA-N</cml:name>
    <cml:name id="m1.n3" dictRef="chem4word:ResolvedIupacname">ethene</cml:name>
    <cml:atomArray>
      <cml:atom id="a1" elementType="C" x2="429.25" y2="563.5" c4w:hydrogenPlacement="East" />
      <cml:atom id="a2" elementType="C" x2="459.25" y2="563.5" />
    </cml:atomArray>
    <cml:bondArray>
      <cml:bond id="b1" atomRefs2="a1 a2" order="D" />
    </cml:bondArray>
  </cml:molecule>
</cml:cml>
MikeWilliams-UK commented 2 years ago

This will be due to the clipping algorithm removing parts of the bond lines which the H2 characters are obscuring.

Solution is to either make the bond longer or set the H to anything other than "E"ast on the left most Carbon atom.

Colsing as this is by design.