<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello Christophe,<br>
    in the OCC documentation it says: <br>
    <p>"In addition to the translation of shapes implemented in basic
      translator, it [XDE] provides the following: [...]; Names of
      products are translated and assigned to assembly components and
      instances in XDE; [...]; Colors, layers, materials and validation
      properties assigned to parts or subparts are translated; [...];"</p>
    <p>As far as I understand, XDE is a certain STEP format which is
      generated by the CAD tool when selecting export colors/names/etc.
      If I open such a STEP-file in Salome I get these names. <br>
    </p>
    <p>See following links with some reference to this topic.</p>
    A post at the opencascade forum with code: <a
href="https://www.opencascade.com/content/import-step-export-mesh-wrong-placement-items">https://www.opencascade.com/content/import-step-export-mesh-wrong-placement-items</a><br>
    <code>STEPCAFControl_Reader aReader;</code><br>
    <code></code><code>aReader.SetColorMode(true);<br>
      aReader.SetNameMode(true);<br>
      aReader.SetLayerMode(true);</code><br>
    <br>
    A question on stackoverflow with some relevant code: <a
href="http://stackoverflow.com/questions/34021383/how-to-import-step-files-with-opencascade-and-display-with-coin3d-with-correct-c">http://stackoverflow.com/questions/34021383/how-to-import-step-files-with-opencascade-and-display-with-coin3d-with-correct-c</a><br>
    <code>STEPCAFControl_Reader stepReader;
      <br>
      stepReader.SetColorMode(true);
      <br>
      stepReader.SetNameMode(true);
      <br>
      stepReader.SetLayerMode(true);<br>
      <br>
    </code>I also found some code which shows how it is implemented in
    PythonOCC. I know it is not exactly what we are looking for, but
    since this is a python-wrapper for C++ the code for C++ obviously
    isn't so different.<br>
    <a
href="https://github.com/tpaviot/pythonocc-core/blob/master/examples/core_load_step_ap203_ocaf.py">https://github.com/tpaviot/pythonocc-core/blob/master/examples/core_load_step_ap203_ocaf.py</a><br>
    step_reader = STEPCAFControl_Reader()<br>
    step_reader.SetColorMode(True)<br>
    step_reader.SetLayerMode(True)<br>
    step_reader.SetNameMode(True)<br>
    step_reader.SetMatMode(True)<br>
    <p>I hope this helps. Let me know if you need more.</p>
    Best regards<br>
    Michael<br>
    <br>
    <div class="moz-cite-prefix">Am 29.08.2016 um 23:21 schrieb
      <a class="moz-txt-link-abbreviated" href="mailto:cgeuzaine@ulg.ac.be">cgeuzaine@ulg.ac.be</a>:<br>
    </div>
    <blockquote
      cite="mid:EADDC0E7-1A69-4AD2-8627-224374DB7653@ulg.ac.be"
      type="cite">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div><br>
      </div>
      <div><br>
        On 29 Aug 2016, at 22:33, Michael Hiller <<a
          moz-do-not-send="true" href="mailto:postanmichel@yahoo.com">postanmichel@yahoo.com</a>>
        wrote:<br>
        <br>
      </div>
      <blockquote type="cite">
        <div>
          <div style="color:#000; background-color:#fff;
            font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
            Lucida Grande, sans-serif;font-size:16px">
            <div id="yui_3_16_0_ym19_1_1472502500391_3448">Hello
              Christophe,</div>
            <div id="yui_3_16_0_ym19_1_1472502500391_3449">did you ever
              get an answer to following archived email?</div>
            <div id="yui_3_16_0_ym19_1_1472502500391_3471"><br>
            </div>
            <div id="yui_3_16_0_ym19_1_1472502500391_3450"><a
                moz-do-not-send="true"
                id="yui_3_16_0_ym19_1_1472502500391_3451"
                href="http://onelab.info/pipermail/gmsh/2013/007826.html">http://onelab.info/pipermail/gmsh/2013/007826.html<br>
              </a></div>
            <div id="yui_3_16_0_ym19_1_1472502500391_3472"><a
                moz-do-not-send="true"
                id="yui_3_16_0_ym19_1_1472502500391_3451"
                href="http://onelab.info/pipermail/gmsh/2013/007826.html"><br
                  id="yui_3_16_0_ym19_1_1472502500391_3452">
              </a></div>
          </div>
        </div>
      </blockquote>
      <div><br>
      </div>
      <div>No...</div>
      <br>
      <blockquote type="cite">
        <div>
          <div style="color:#000; background-color:#fff;
            font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
            Lucida Grande, sans-serif;font-size:16px">
            <div id="yui_3_16_0_ym19_1_1472502500391_3472"><a
                moz-do-not-send="true"
                id="yui_3_16_0_ym19_1_1472502500391_3451"
                href="http://onelab.info/pipermail/gmsh/2013/007826.html">
              </a></div>
            I am not a coding expert but I found following description
            on the occ-site which seems to be exactly what me and the
            Matthias were looking for:<br
              id="yui_3_16_0_ym19_1_1472502500391_3453">
            <br id="yui_3_16_0_ym19_1_1472502500391_3454">
            <a moz-do-not-send="true"
              id="yui_3_16_0_ym19_1_1472502500391_3455"
href="https://www.opencascade.com/doc/occt-6.7.0/overview/html/user_guides__step.html#occt_step_7_1_1">https://www.opencascade.com/doc/occt-6.7.0/overview/html/user_guides__step.html#occt_step_7_1_1</a><br
              id="yui_3_16_0_ym19_1_1472502500391_3456">
          </div>
        </div>
      </blockquote>
      <div><br>
      </div>
      <div>Isn't this describing another file format (XDE) ?</div>
      <div><br>
      </div>
      <div>If you find some examples showing code to extract useful
        coloring/grouping info from step or brep files don't hesitate to
        post them: it's still something we would like to explore (eg to
        define physical groups automatically)</div>
      <div><br>
      </div>
      <br>
      <blockquote type="cite">
        <div>
          <div style="color:#000; background-color:#fff;
            font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
            Lucida Grande, sans-serif;font-size:16px"> <br
              id="yui_3_16_0_ym19_1_1472502500391_3457">
            It would be great if you could implement color and name STEP
            import.<br id="yui_3_16_0_ym19_1_1472502500391_3458">
            <br id="yui_3_16_0_ym19_1_1472502500391_3459">
            There seems to be the possibility for layer import as well
            which would be a nice extra:<a moz-do-not-send="true"
              id="yui_3_16_0_ym19_1_1472502500391_3460"
href="https://www.opencascade.com/doc/occt-6.9.1/refman/html/class_s_t_e_p_c_a_f_control___reader.html#afa81144a8d9116e1ffa0af30a70f928e"><br
                id="yui_3_16_0_ym19_1_1472502500391_3461">
https://www.opencascade.com/doc/occt-6.9.1/refman/html/class_s_t_e_p_c_a_f_control___reader.html#afa81144a8d9116e1ffa0af30a70f928e</a><br
              id="yui_3_16_0_ym19_1_1472502500391_3462">
            <br id="yui_3_16_0_ym19_1_1472502500391_3463">
            Let me know if I can check or provide more information.<br
              id="yui_3_16_0_ym19_1_1472502500391_3464">
            <br id="yui_3_16_0_ym19_1_1472502500391_3465">
            Thank you and best regards<br
              id="yui_3_16_0_ym19_1_1472502500391_3466">
            Michael
            <div id="yui_3_16_0_ym19_1_1472502500391_3020"
              class="qtdSeparateBR"><br>
              <br>
            </div>
            <div style="display: block;"
              id="yui_3_16_0_ym19_1_1472502500391_3017"
              class="yahoo_quoted">
              <div id="yui_3_16_0_ym19_1_1472502500391_3016"
                style="font-family: HelveticaNeue, Helvetica Neue,
                Helvetica, Arial, Lucida Grande, sans-serif; font-size:
                16px;">
                <div id="yui_3_16_0_ym19_1_1472502500391_3015"
                  style="font-family: HelveticaNeue, Helvetica Neue,
                  Helvetica, Arial, Lucida Grande, sans-serif;
                  font-size: 16px;">
                  <div id="yui_3_16_0_ym19_1_1472502500391_3014"
                    dir="ltr"> <font
                      id="yui_3_16_0_ym19_1_1472502500391_3019"
                      face="Arial" size="2">
                      <hr id="yui_3_16_0_ym19_1_1472502500391_3018"
                        size="1"> <b><span style="font-weight:bold;">From:</span></b>
                      Michael Hiller <<a moz-do-not-send="true"
                        href="mailto:postanmichel@yahoo.com">postanmichel@yahoo.com</a>><br>
                      <b><span style="font-weight: bold;">To:</span></b>
                      "<a moz-do-not-send="true"
                        href="mailto:gmsh@geuz.org">gmsh@geuz.org</a>"
                      <<a moz-do-not-send="true"
                        href="mailto:gmsh@geuz.org">gmsh@geuz.org</a>>
                      <br>
                      <b><span style="font-weight: bold;">Sent:</span></b>
                      Thursday, August 25, 2016 12:55 PM<br>
                      <b><span style="font-weight: bold;">Subject:</span></b>
                      STEP import // tangent surface selection<br>
                    </font> </div>
                  <div id="yui_3_16_0_ym19_1_1472502500391_3377"
                    class="y_msg_container"><br>
                    <div id="yiv1147198876">
                      <div id="yui_3_16_0_ym19_1_1472502500391_3376">
                        <div id="yui_3_16_0_ym19_1_1472502500391_3375"
                          style="color:#000;background-color:#fff;font-family:HelveticaNeue,
                          Helvetica Neue, Helvetica, Arial, Lucida
                          Grande, sans-serif;font-size:16px;">
                          <div dir="ltr"
                            id="yiv1147198876yui_3_16_0_1_1472122474905_2487">Dear
                            Gmsh developers, dear users,<br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2558">
                            <br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2559">
                            first of all I want to thank you for fixing
                            the higher order compound feature – it works
                            like charm now!<br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2560">
                            <br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2561">
                            I am trying to find a solution how to easily
                            define "Compound Surfaces" now. I have a
                            solid STEP model with almost 1500 surface
                            patches. In the end I want all patches that
                            share a tangent edge to be meshed together
                            as a single compound mesh.<br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2562">
                            <br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2563">
                            At the moment I have to manually select the
                            patches. It helps to hide by group selection
                            with pressing STRG and drawing a rectangular
                            box in the GUI. But still this is cumbersome
                            for the complete part.<br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2564">
                            <br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2565">
                            So I was thinking maybe there is something
                            like "Reclassify 2D" for STEP files which I
                            couldn’t find.<br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2566">
                            <br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2567">
                            Unfortunately I also cannot use some helpful
                            STEP options like exporting feature names or
                            surface colors. With the first option I
                            could do the compound definitions inside
                            CAD. This would generally be a neat feature:
                            you could parametrically define interfaces
                            inside CAD and use them in GMSH for physical
                            entities. I think that the OCC kernel
                            provides option.<br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2568">
                            <br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2569">
                            Also I don't see an obvious way how to
                            change the surface IDs stored inside the
                            STEP file. This could help by writing a
                            little python script to group surfaces by
                            ordering them inside the step file.<br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2570">
                            <br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2571">
                            I would be very happy if anyone could
                            provide some further ideas on how to
                            approach this more conveniently.<br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2572">
                            <br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2573">
                            Thank you and best regards<br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2574">
                            Michael<br
                              id="yiv1147198876yui_3_16_0_1_1472122474905_2575">
                            <br>
                          </div>
                        </div>
                      </div>
                    </div>
                    <br>
                    <br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </blockquote>
    </blockquote>
    <br>
  </body>
</html>