stl geometry import error.

4 Ansichten (letzte 30 Tage)
sevgi
sevgi am 11 Mär. 2024
Beantwortet: Abhas am 25 Mär. 2024
I am trying to repeat the work in the link above. When I create the geometry on the script screen as in the video, the analysis gives correct results. However, when I create the geometry in Solid and import it in STL format, the two-piece geometry collapses into one piece. Could you help me to fix this error?

Antworten (1)

Abhas
Abhas am 25 Mär. 2024
Hi Sevgi,
To address the issue of a two-piece geometry collapsing into one when imported from an STL file into MATLAB, here are streamlined steps for resolution:
1. STL File Structure
  • Separate Bodies: Verify the STL contains two distinct bodies. Some CAD software can save multiple bodies in one STL, which must be defined separately.
  • Export Settings: Check CAD software export settings to ensure bodies are exported as separate files or maintain assembly structure.
2. Importing into MATLAB
  • Use MATLAB’s "importGeometry" function with the correct syntax to ensure the geometry maintains its structure upon import, adjusting for binary or ASCII STL files as needed.
3. Inspect Geometry in MATLAB
  • View Geometry: Utilize "pdegplot" or similar commands to visually confirm the geometry is imported as separate pieces.
  • Adjust if Needed: If MATLAB imports it as a single piece, manually define or adjust boundaries within MATLAB to separate the geometry.
4. Model Adjustment
  • Manual Separation: Manually adjust the model or script in MATLAB to define separate regions if automatic recognition fails.
  • Meshing Strategy: Re-meshing within MATLAB can offer better control and definition of parts.
You may refer to the following documentation links to have a better understanding on importing 3-D geometry from STL:
  1. https://www.mathworks.com/help/pde/ug/pde.pdemodel.importgeometry.html#bupbfb3
  2. https://www.mathworks.com/help/pde/ug/stl-file-import.html

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by