Body

I have a simple idea for grouping facets by its color. I suggest the following workflow:

  1. In the CAD model (e.g. in Solidworks), assign different colors for different materials.
  2. The colors are exported in the STL file.
  3. Load the STL file in MolFlow
  4. Have a dialog asking you what is the outgassing rate etc. of the surfaces with the recognized colors and assign the entered attributes to these surfaces.
  5. Additional feature: Allow to group the surfaces of the same color and allow to assign attributes to a group of surface later on.
Submitted by Marton Ady 8 years ago

Hello Christian,

Thanks for the suggestion!

I agree with you. Instead of the dialog (point 4), I would simply assign the different colors to different groups (do you know that you can already group facets in Molflow? See here)

Since it is very quick to select groups (ALT+1, ALT+2, ...), the user could easily go through these and assign different outgassings through the regular way, as you proposed in point 5.

I see two issues, though:

- An STL file is only a set of triangles. Any additional information, such as facet color, is non-standard. I would need an example Solidworks-exported file with colors to see how it is implemented. Maybe can you upload one here? In CERN we don't have SW license.

- When collapsing a file, color could only be preserved if merged facets had the same color.

- I should modify the Collapse algorithm to add outgassing of the merged facets and apply it to the new facets it creates.

I've noted the idea and will implement it.

Submitted by d7b2aed112766b16e867 8 years ago

Dear Marton,

thank you for the quick answer. You are rigtht, STL is not supporing colored surfaces. My idea originates from a small software I have written on my own that is doing basically the same as molflow but not so sophisticated. There, I am using a VRML (.wrl) file instead of a STL file. In VRML there is information about the color of the facets.

Another workaround would be a converter VRML to .geo. I am currently thinking about doing so, because I need a really fast solution. Selecting the surfaces in Molflow (with overlapping over 1500 Surfaces) is no fun :-(

 

#VRML V1.0 ascii
Separator {
MaterialBinding {
value PER_FACE_INDEXED
}
Material {
ambientColor [
 0.792157 0.819608 0.933333, 1.000000 0.000000 0.000000
]
diffuseColor [
 0.792157 0.819608 0.933333, 1.000000 0.000000 0.000000
]
emissiveColor [
 0.000000 0.000000 0.000000, 0.000000 0.000000 0.000000
]
specularColor [
 0.633726 0.655686 0.746667, 1.000000 0.000000 0.000000
]
shininess [
 0.312500, 0.310000
]
transparency [
 0.000000, 0.000000
]
}
Coordinate3 {
point [
 -0.050829 0.001986 0.000000, -0.050829 0.001986 0.010000, -0.050829 0.021423 0.000000, -0.050829 0.021423 0.010000, -0.014880 0.001986 0.000000,
 -0.014880 0.001986 0.010000, -0.014880 0.021423 0.000000, -0.014880 0.021423 0.010000
]
}
IndexedFaceSet {
coordIndex [
 1, 3, 0, -1, 0, 3, 2, -1, 5, 1, 4, -1,
 4, 1, 0, -1, 7, 5, 6, -1, 6, 5, 4, -1,
 3, 7, 2, -1, 2, 7, 6, -1, 5, 7, 1, -1,
 1, 7, 3, -1, 6, 4, 2, -1, 2, 4, 0, -1
]
materialIndex [
 0, 0, 0, 0, 0, 0,
 0, 0, 1, 1, 0, 0,
]
}
}

Submitted by d7b2aed112766b16e867 8 years ago

I have written a converter, that converts VRML files to molflow xml files. It currently only works for VRML 1.0 files that are exported from SolidWorks. It recognizes the points and the indexed facesets, given in the example above. Surfaces of similar color (hex color) are automatically grouped.

In the download an example VRML file (.wrl) and the disired output are included.

Download link: http://hendrich.org/tempfiles/vrml-to-molflow-converter_v1_1.zip

Submitted by Marton Ady 8 years ago

Hello Christian,

First of all, very nice job! It can be handy for people using Solidworks, and hopefully it provides the "quick solution" you were in need of.

As at CERN we don't have SolidWorks, I could only test it with the sample input VRML file you provided.

Two small remarks:

  • In your output file, at the <selection> tag, the "nb" attribute is always 2. It should be the number of facets in the selection. Currently this doesn't cause a problem because that number is not read by Molflow (only there for human readability), but if you keep working on your script then it might be useful to correct.
  • My bigger problem is that VRML export files seem to contain only triangles (similar to STL). Normally the first step with these files is to "collapse" them, i.e. merge the coplanar triangles into polygons. When this happens, my algorithm tries to keep selection groups, but there is no easy solution: if, for example, two facets of different selection groups are merged, there is no automatic way to figure out where the merged facet should belong to. In the example you provided, this doesn't cause an issue, but did you try with larger geometries?

Anyway, thank you very much for your input. Out of curiosity, can you tell what problem you are trying to use Molflow for?

Submitted by d7b2aed112766b16e867 8 years ago

Hi Marton,

concerning the frist remark: I will fix it. Concerning the triangles: My script only supports triangles, nothing more. I did  test the collapse functionality and it performed fine, even for very complex structures. We did tests with structures of thousands of triangles.

We are using the molflow for simulations of the vacuum needed for electron optics.