<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Dear colleagues,<div><br></div><div>I’m writing to report probably undesired behavior of McStasScript we discovered together with <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif;">Chuyi Huang from JCNS</span>.</div><div><br></div><div>In McStas if I make a COPY of a component, which also used EXTEND block, this additional code is not copied as well. I believe this is the correct approach since it allows e.g. to put different SCATTERED flags on each of the copied components separately, which comes handy.</div><div><br></div><div>However when McStasScript generates an instrument based on the same code, it will copy EXTEND block as well. In more complex situations where WHEN conditions are used this could lead to unexpected behavior. </div><div><br></div><div>Please find attached two files. Compare lines 255-286 in the native one and lines 268-307 in the generated one.</div><div><br></div><div>Best regards,</div><div>Peter Konik</div><div><br></div><div></div></body></html>