Exporting surfaces and their names to an STL file

Next
 From:  Andrew (S195404)
4484.1 
Dear list,

I'm only new to MoI so please forgive such a basic question.

I have happily created a 3D building with surfaces I've named roof, walls, and floor.

When I select a surface and save it as an ASCII STL, the resulting file has just one solid in it, called OBJECT:


solid OBJECT

blah blah blah

endsolid OBJECT

(see the attached file for a cutdown example together with a screen shot showing what I assumed is the surface named "floor").

I want *each* surface to have its own solid-endsolid section in the STL file:

solid floor
...
endsolid floor

solid wall
...
endsolid wall

etc, etc

I would greatly appreciate any advice on how to go about this, please.

Kind regards,

Andrew Ward

PS. I am using MoI as a geometry creator for a CFD program (ICON FoamPro) which imports STL files. I will apply boundary conditions on each of the individual surfaces (for instance, a door might be open and I want to apply different constraints to it than I would to the walls, say).
Attachments:

Image Attachments:
Size: 141.2 KB, Downloaded: 28 times, Dimensions: 1366x728px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  twofoot
4484.2 In reply to 4484.1 
you can't name surfaces in an STL file. It is simply a mesh of a solid object.

EDITED: 5 Sep 2011 by TWOFOOT

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  chrisd (CHRIS_DORDONI)
4484.3 In reply to 4484.2 
While you can't name surfaces in an STL file, I believe you can name solids. This is the one advantage that I am aware of for using ASCII STL files as opposed to the binary type. Since I am a "future" Moi user and my trial has expired, I can't confirm that Moi allows for this in an ASCII STL export. Perhaps you can test this yourself.

Are you sure your other objects are solids?

Chris
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4484.4 In reply to 4484.1 
Hi Andrew,

> I want *each* surface to have its own solid-endsolid section in the STL file:
>
> solid floor
> ...
> endsolid floor
>
> solid wall
> ...
> endsolid wall


Unfortunately this is not allowed in the way that STL files are supposed to be structured - an STL file is only supposed to be a container that holds one solid object, so there is only supposed to be a single solid/endsolid section within the whole file.

Trying to write multiple solid/endsolid sections does not work very well because many STL importers are expecting there to only be a single section and will stop reading the file when they reach the endsolid marker.

See here for some more information: http://www.deelip.com/?p=255


I think it could be possible for me to update the STL exporter to use the object's name instead of just "OBJECT" for the case where you are exporting a single object to the STL file, I'll make a note to look into updating that for v3.

But the particular thing you're requesting of multiple solid/endsolid sections within a single stl file is not going to work since that's not how STL files are meant to be structured.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4484.5 In reply to 4484.1 
Hi Andrew - MoI does export object names though to the OBJ and LWO polygon-based formats.

It is possible to write only triangular polygons to either of those files, so doing that would have a data file with the information in it that you needed. But I don't know if the particular program that you are importing into supports those formats.

If not then you might see if some converter is available that can convert an .obj file into the kind of format that you can read, one that you could try is MeshLab:
http://meshlab.sourceforge.net/

Because STL format is so limited, it's not a great way to translate multi-object organized structures between programs - OBJ format works better for that.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Andrew (S195404)
4484.6 In reply to 4484.2 
Thanks for your response.

I simplified my description for the sake of the brevity. My building will have an open roof so I will model the flow around and within the building. Obviously I will need to create a ground object, as well as inlet, outlet, etc.

Regards,

Andrew Ward

PS. The software I am using is not mine, but rather a commercial product I have bought.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Andrew (S195404)
4484.7 In reply to 4484.5 
Dear Michael,

Thank you for your very quick and helpful response. I will obviously have to think more carefully about this.

The CFD software I am using recommend something like CATIA to prepare the geometry, but that seems way over the top (in functionality and cost) for my purposes.

Thanks again.

Regards,

Andrew Ward
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
4484.8 In reply to 4484.7 
Hi Andrew - also some times analysis software is able to take in NURBS data directly and generate its own mesh from that.

If that is supported by your software, look for stuff for either the IGES or STEP file formats - MoI can export to those formats as well.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All