CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[CAD formats] Blender export script for named ASCII STLbs

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2012, 04:04
Default Version for 2.63+, including import
  #21
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Hi,

I updated to work with 2.63 (bmesh modifications). Also includes import functions. Not 100% sure of surface normal handling or if snappyHexMesh cares.

See above for installation, and feel free to put it on the wiki. I leave it here.

/N
Attached Files
File Type: gz export_named_stl.tar.gz (5.7 KB, 235 views)
wyldckat likes this.
wikstrom is offline   Reply With Quote

Old   June 18, 2012, 17:02
Default
  #22
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Niklas,

Many thanks for sharing! I've added a link to your post, because I felt too lazy to download+upload

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 23, 2013, 08:36
Default Export to ASCII STL in Blender
  #23
New Member
 
Join Date: Sep 2010
Posts: 11
Rep Power: 16
Gary is on a distinguished road
Quote:
Originally Posted by wikstrom View Post
Hi,

I have extended the "default" STL import/export addon to include the option to export multi-solid ascii STL, similar to the above script. Still crude and I hope to extend the import functionality similarly, but have not don so yet.

I have tested this with blender 2.5.8. To activate this addon unpack the tgz in ~/.blender/<version>/
Code:
 ~/.blender/2.58/scripts
niklasw > tree
.
└── addons
    └── export_named_stl
        ├── blender_utils.py
        ├── __init__.py
        └── stl_utils.py
Then activate the addon in the blender user preferences.

/Niklas

Any one can help me how to activate this add on please?
I have unpacked the tgz and all files are in the right location, but just could not find the corresponding option from Blender user preference.
I am using version 2.62 on Ubuntu system.
Gary is offline   Reply With Quote

Old   January 23, 2013, 09:24
Default
  #24
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17
wikstrom is on a distinguished road
Did you put the files under ~/.blender/2.63/scripts/addons/export_named_stl ?

Maby a version thing. Do not remember what I have changed, if anything, to make it work for 2.63. Have a look at the attaches version, in your case to be unpacked in

~/.blender/2.62/scripts/addons/

/n
Attached Files
File Type: gz export_named_stl.tar.gz (15.5 KB, 121 views)
wikstrom is offline   Reply With Quote

Old   January 24, 2013, 10:58
Default
  #25
New Member
 
Join Date: Sep 2010
Posts: 11
Rep Power: 16
Gary is on a distinguished road
This does not work for 2.6.2 version.
Actually I made a mistake in my first post, the file tested OK with blender 2.5.8 by Niklas Wikstrom works for 2.6.2.
Many thanks again, Niklas Wikstrom.
Gary is offline   Reply With Quote

Old   August 11, 2015, 15:20
Default
  #26
New Member
 
Indiana
Join Date: Aug 2015
Posts: 1
Rep Power: 0
estrauss is on a distinguished road
I've been looking for a utility like this. I got it to work in Blender for export in version 2.75, but it seems to conflict with the import STL functionality. I tried disabling the standard STL import and still got the error. I can't post a screenshot of the errors, but here they are summarized. It was 4 errors and I was attempting to import an ASCII STL file.

Traceback (most recent call last):
File "C:\Program Files\Blender.....\export_named_stl\...

_init_.py, line 111, in execute
dataDict = stl_utils.read_stl_solid(path)

stl_utils.py, line 331, in read_stl_solid
for pt in gen(data):

stl_utils.py, line 170 in _ascii_solid_read
log("SOLID %s"%solid)

stl_utils.py, line 164, in log
with open('/tmp/blendertest.log','a') as fh:

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/blendertest.log'

location: <unknown location>:-1

There could be some typo's in my summary, but I could not select the error text and I'm freshly new to Blender.

Has anyone had this or know of a simple fix?
estrauss is offline   Reply With Quote

Old   April 22, 2023, 17:46
Default Work around for named surfaces in one file (.obj format)
  #27
New Member
 
Aqeel Ahmed
Join Date: Feb 2017
Posts: 5
Rep Power: 9
AqeelAhmed168 is on a distinguished road
In Blender 3.5 one workaround to retain the named surfaces is to export the file as obj(legacy). Activate 'OBJ Groups' from 'Object as' in the 'include' settings for the export.

To get the correct naming of surfaces, the object and mesh name should be the same in the Blender 'Collection' tree.
AqeelAhmed168 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic Data Export (ascii format) A Kourm FLUENT 4 March 7, 2021 15:08
[ANSYS Meshing] Export mesh as fluent msh by using script erkut ANSYS Meshing & Geometry 0 July 13, 2018 16:41
export ascii file with fluent Clementine FLUENT 3 August 2, 2012 10:52
WSS ASCII export problem Birkov FLUENT 1 July 27, 2009 15:09
Is there any way to quickly export ascii file? HVAC FLUENT 0 December 29, 2005 21:24


All times are GMT -4. The time now is 17:54.