tkeskita / swiftBlock

Blender add-on to generate OpenFOAM blockMeshDict
GNU General Public License v3.0
30 stars 7 forks source link

swiftBlock in Blender 2.8x preview does not show the mesh #2

Closed ms-saleh closed 4 years ago

ms-saleh commented 4 years ago

I really like swiftBlock 0.3 which is very easy to install on Blender 2.82 but the preview button does not show any mesh with the default setting or any other settings I entered in the swiftBlock side bar. Here is a screenshot showing the swiftBlock as it opens with default settings.

before

This is a screenshot after pressing the preview button.

2

To make sure I sourced OpenFOAM in the terminal before calling Blender and am sure that blockMesh is working. swiftBlock does not seem to like generating any mesh or at least it is not showing it. I tried all the view options solid/surface/wireframe/etc. but, none of them made a difference.

Please let me know your thoughts or if you have any suggestion.

tkeskita commented 4 years ago

Hi, If you try to preview mesh using the default cube, does it work? Do you see any error messages in the terminal?

ms-saleh commented 4 years ago

Hello,

Thank you for your prompt reply. Yes, I tried with a simple geometry box, prism, etc and still the problem persists.

Here is a screenshot of the terminal, it seems blender is doing something and trying to create a new mesh each time I hit the preview button.

[image: image.png]

Please let me know if you can see the screenshot correctly.

Thank you,

Sadeq Saleh, Graduate Research Assistant, The School of Mechanical Engineering Carnegie Mellon University Pittsburg, PA

On Fri, Oct 30, 2020 at 1:59 AM Tuomo Keskitalo notifications@github.com wrote:

Hi, If you try to preview mesh using the default cube, does it work? Do you see any error messages in the terminal?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tkeskita/swiftBlock/issues/2#issuecomment-719237215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMZH6F6CU67MKCM3OJAGCDSNJI3JANCNFSM4TEPY52Q .

tkeskita commented 4 years ago

Hi, sorry I don't see any images in your post. Can you please copy-paste the text from terminal?

ms-saleh commented 4 years ago

Just a quick update. I used paraview to see if any mesh was created using swiftBlock and it seems swiftBlock is working fine but for some reason the preview in Blender is not showing the mesh. here is another screenshot from paraview [image: image.png]

Any ideas on what setting in Blender might have been deactivated?

Thanks,

Sadeq Saleh, Graduate Research Assistant, The School of Mechanical Engineering Carnegie Mellon University Pittsburg, PA

On Fri, Oct 30, 2020 at 5:09 AM Sadeq Saleh mss.saleh@gmail.com wrote:

Hello,

Thank you for your prompt reply. Yes, I tried with a simple geometry box, prism, etc and still the problem persists.

Here is a screenshot of the terminal, it seems blender is doing something and trying to create a new mesh each time I hit the preview button.

[image: image.png]

Please let me know if you can see the screenshot correctly.

Thank you,

  • Sadeq

Sadeq Saleh, Graduate Research Assistant, The School of Mechanical Engineering Carnegie Mellon University Pittsburg, PA

On Fri, Oct 30, 2020 at 1:59 AM Tuomo Keskitalo notifications@github.com wrote:

Hi, If you try to preview mesh using the default cube, does it work? Do you see any error messages in the terminal?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tkeskita/swiftBlock/issues/2#issuecomment-719237215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMZH6F6CU67MKCM3OJAGCDSNJI3JANCNFSM4TEPY52Q .

ms-saleh commented 4 years ago

Sure, here is the text from the terminal:

sadeq@ubuntu:~/OpenFOAM/sadeq-7/run/frame$ blender Read prefs: /home/sadeq/.config/blender/2.82/config/userpref.blend Warning: Could not find a matching GPU name. Things may not behave as expected. Detected OpenGL configuration: Vendor: VMware, Inc. Renderer: SVGA3D; build: RELEASE; LLVM; Warning: <class 'swiftBlock-master.SWIFTBLOCK_PG_BlockProperty'> registration failed, continuing.. Warning: <class 'swiftBlock-master.SWIFTBLOCK_PG_ProjectionProperty'> registration failed, continuing.. Warning: <class 'swiftBlock-master.SWIFTBLOCK_PG_EdgeGroupProperty'> registration failed, continuing.. Warning: class BlockProperty contains a property which should be an annotation! /home/sadeq/.config/blender/2.82/scripts/addons/swiftBlock/init.py:309 assign as a type annotation: BlockProperty.id assign as a type annotation: BlockProperty.name assign as a type annotation: BlockProperty.verts assign as a type annotation: BlockProperty.enabled assign as a type annotation: BlockProperty.namedRegion Warning: class ProjectionProperty contains a property which should be an annotation! /home/sadeq/.config/blender/2.82/scripts/addons/swiftBlock/init.py:315 assign as a type annotation: ProjectionProperty.type assign as a type annotation: ProjectionProperty.id assign as a type annotation: ProjectionProperty.ob Warning: class EdgeGroupProperty contains a property which should be an annotation! /home/sadeq/.config/blender/2.82/scripts/addons/swiftBlock/init.py:332 assign as a type annotation: EdgeGroupProperty.group_name assign as a type annotation: EdgeGroupProperty.group_edges Warning: property 'release_confirm' not found in keymap item 'OperatorProperties' Read blend: /home/sadeq/Blender/Frame.blend initialize BMesh Beginning automatic block detection /home/sadeq/.config/blender/2.82/scripts/addons/swiftBlock-master/blockBuilder.py:54: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray v_in_edges = np.array(v_in_edge) Found 21 blocks in 0.4 seconds, used Numba=False Info: Number of blocks: 21

OpenFOAM temp directory: /tmp/tmpljxaz2mv running blockMesh Info: Cells in mesh: 19000

OpenFOAM temp directory: /tmp/tmp44o5t3yu running blockMesh Info: Cells in mesh: 152000

OpenFOAM temp directory: /tmp/tmp0xy6ocdh running blockMesh Info: Cells in mesh: 152000

tkeskita commented 4 years ago

OK, seems to work. Well, you can try this command to make sure it's not due to some Blender setting: blender --factory-startup, then enable add-on and try to preview with a cube.

tkeskita commented 4 years ago

Also, can you please update to latest Blender 2.83 LTS? There's some strange warnings in your output that I don't get.

ms-saleh commented 4 years ago

Thank you so much!! I think the problem was the Blender version I had installed on my system. 2.83 LTS works perfect and the preview button is working now.

athulskywalker commented 1 year ago

Hi, Is this issue solved for blender 3.5? I have trouble previewing my mesh.

tkeskita commented 1 year ago

Hi, SwiftBlock is currently supported using Blender LTS 3.3. I have not tested 3.5.

athulskywalker commented 1 year ago

image The issue persists with 3.5, 3.3 LTS and 2.83 LTS

athulskywalker commented 1 year ago

How do your source OpenFOAM and start Blender from it? I am new to both OpenFOAM and Blender so kindly help me.

tkeskita commented 1 year ago

Hi, the start-up procedure is described here in the docs. If you are new to OpenFOAM you should learn it first, please see links in the Help section in the docs. On Linux, my start-up commands in the terminal are:

source /opt/openfoam10/etc/bashrc
/path/to/blender-3.3/blender
athulskywalker commented 1 year ago

Hi, My case is different. I have installed Blender on windows and OpenFOAM on WSL. So the path cant be recalled on WSL. The version of OpenFOAM I use is 2212. I also tried installing Blender on WSL and and added Switfblock successfully but the screen is blank.

tkeskita commented 1 year ago

Ok, so that is a Windows issue. I'll create a separate issue for this and add this limitation to documentation. Thanks!

athulskywalker commented 1 year ago

Ok, so that is a Windows issue. I'll create a separate issue for this and add this limitation to documentation. Thanks!

Thank you very much.