|
[Sponsors] |
October 7, 2012, 15:58 |
|
#41 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Cool, 2.64 is out. I did not know. Let's give it a try. If the script gives errors, there might been changes in the API, normally rather easy to fix. I'll get back here if I find problems with 2.64.
2.62 works fairly OK. Only problem is that the shortest path algorithm there do not find the most short path. For simple objects I guess it works OK, though... but as precompiled versions are available, it should not be any problems installing latest versions. K |
|
October 11, 2012, 05:37 |
|
#42 |
Senior Member
|
Hi Kalle,
I have installed blender 2.64, I am trying to follow the procedure in the wiki link. I am not able to follow. In the very beginning step itself I am struggling. can you please tell me, that the swiftBlock and swiftSnap compatible with Blender 2.64? If you dont mind can you please give me some tutorial document. thanks and Regards, Sivakumar |
|
October 11, 2012, 14:21 |
|
#43 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi,
I've used SwiftBlock without problems (so far) in 2.64. SwiftSnap, I did not try yet, so there might be problems. I should work with 2.62, though. As 2.64 now is out I will update both (if needed) to assure they work, as soon as I find time. I have no tutorial to provide; all info available is in this thread and on the wiki. I've been thinking that I should maybe do a video and post on youtube. It is really quite easy to use the code if you are experienced with Blender and have understood the concept of block structured meshes. These two obstacles are unfortunately not insignificant though =\. Took me weeks before I could just zoom properly in Blender! (shift+middle mouse button). However, info on how o use Blender is available in large amounts on the web, and there I cannot make any useful contribution. I would however like to encourage anyone to learn Blender, not only for meshing. It's a great software. If you have trouble getting started, please let us know which step is troublesome, and I am confident we can solve it here. Probably a dozen other people have the same issue! Regards, Kalle Last edited by kalle; October 14, 2012 at 12:44. |
|
October 11, 2012, 15:40 |
|
#44 |
Senior Member
|
Hello kalle,
Thank you very much for the positive reply, I will degrade my blender software in to 2.62. Then I will try to use blender. if you upload any video regarding this please dont forget to sent the information. my email id is: sivakumar81.s@gmail.com thanks and regards, Sivakumar |
|
October 12, 2012, 02:11 |
|
#45 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Dear Sivakumar,
Before going back to 2.62, you can give 2.64+swiftsnap a try. Open the __init__.py file and search for "2.63" and edit the lines according to the instructions in the comment. There is a good chance the code will work in 2.64 then. SwiftBlock seems to run fine in 2.64. Regards, K |
|
October 12, 2012, 16:05 |
|
#46 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
I've just pushed an updated version of swiftSnap compatible with Blender 2.64. There were issues with feature detection and some other small annoying things due to changes in Blender's API. Now the script will remember save out location and settings too. I'd guess this is compatible with 2.63, but I have not tested.
Kalle |
|
October 21, 2012, 15:04 |
|
#47 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi folks,
I just pushed an update of SwiftBlock. A lot of small changes to grease the machinery were done. The user will see following changes:
Regards, Kalle |
|
November 7, 2012, 08:48 |
|
#48 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi again,
I made a minor edit to SwiftBlock; now the preview mesh consists of faces rather than just edges. Now it is a lot easier to see how the mesh actually looks like. Use the Z-key to switch from viewing edges or faces. Which of these two states the preview mesh ends up in depends on your current setting in Blender. When viewing faces, the mesh looks much like when you view the mesh in paraview; except that here you can also see internal faces of the mesh on block faces. As usual; let me know if there are problems. Regards, Kalle |
|
November 8, 2012, 11:57 |
|
#49 |
Member
Join Date: May 2012
Posts: 55
Rep Power: 15 |
Really great job! Could you please upload the blend file for the cylinder example?
|
|
November 8, 2012, 14:29 |
|
#50 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi,
You mean from the figure on the wiki? That is just a figure, but since you asked I have thrown together a similar case. I don't think I made it 100% circular, so only use it as an example! Kalle |
|
December 4, 2012, 16:31 |
|
#51 |
New Member
Join Date: Aug 2012
Posts: 10
Rep Power: 14 |
Hello,
I struggled to get the swiftBlock work on my geometry. The sample file (cylinder) worked without problem. However, when I tried to mesh my geometry using swiftBlock, it always meshed the interior void spaces instead of the fluid channel I want to mesh. Did I missed something regarding to the inside/outside of the meshing structure ? Attached is my blender file. Thanks in advance for your help. |
|
December 5, 2012, 02:23 |
|
#52 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi,
I see. Your blender object "DXFmesh" does not contain the block structure. You should create your block structure in a separate blender object, and then use "DXFmesh" to provide polyLines for your block's edges. I started in one corner for you, but you have to completely fill your computational domain with blocks. The block structure is in the object "Cube". I guess you can get a pretty good block mesh here, but it takes some thinking on how to place the blocks. K |
|
December 5, 2012, 06:24 |
|
#53 |
New Member
Join Date: Aug 2012
Posts: 10
Rep Power: 14 |
Hi Kalle,
Thanks for the quick reply. I have to admit that I am pretty novice in blender. According to what you suggested, I tried to put cubes inside my structure (dxfmesh) but the whole process is very inefficient. First, I couldn't manage to use vertices in the dxfmesh object to build new meshes in the cube object. I think I must missed some basic techniques here. Second, even with the possibility to select vertices in dxfmesh object and build new cubes from them in the cube object, it is still not an automated way to build mesh as I expected..... Is that the limitation for this swiftBlock method ? Cheers, |
|
December 5, 2012, 13:23 |
|
#54 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi,
You are right, this is no tool for automatically constructing block structures. You still have to provide that "intellectual" part of the work yourself. The efficiency is largely dependent on how comfortable the user is with blender. It has its fairly steep learning curve, but there is also a lot of help availble online, for instance on youtube. I myself use extruding a lot, but there are as many habits as there are users, I'd guess. For a 2D structure like this, I would create 2D block structure and then extrude it. Kalle |
|
December 7, 2012, 10:18 |
|
#55 |
New Member
Join Date: Aug 2012
Posts: 10
Rep Power: 14 |
I finally turned to your swiftSnap instead of swiftBlock. It is true that in terms of meshing efficiency, my structure could be meshed much faster via using blockMesh. But using snappyHexMesh via swiftSnap requires less user interventions.
Thanks again for your help and such great addons. p.s. The set locationinMesh function sometimes didn't update the 3d cursor position, see the attached file for example. |
|
December 7, 2012, 15:58 |
|
#56 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
You are welcome!
I think the addons are fairly self explaning for people who are familiar with how to set up snappyhexmesh and blockmesh by hand, i.e. writing all the entries in the dict in an editor. For people new to the meshers, some buttons and settings can be rather cryptic. The "Set locationInMesh" is one such button. When pressing it, the SwiftSnap internal vector variable "locinmesh" is set by copying the current value of the position of the blender 3D cursor. Later, when the snappyHexMeshDict is written, the value in "locinmesh" is used for the entry "locationInMesh". Hence this provides a way for the user to control which volume SHM should mesh in the current geometry. I use the 3D cursor, because it is the easiest way for a Blender user to communicate a space position to a blender script. Hence: the button is not supposed to update the position of the 3D cursor, it is the other way around, the cursor should update the internal variable. However, there is currently no feedback to the user that anything happened when the button was pressed... maybe I should add a popup window saying something like: "The locationInMesh was now set to (x, y, z), and the volume containing this point will be meshed" [OK]? Please let me know if I misunderstood your comment. Kalle |
|
December 7, 2012, 17:28 |
|
#57 |
New Member
Join Date: Aug 2012
Posts: 10
Rep Power: 14 |
Yes, having a message telling what are the actual coordinates set would be helpful. But the problem is that sometimes it just failed to take the current 3D cursor position when I press "set locationinMesh" and write the file.
I tried to use the python console and use "bpy.context.scene.cursor_location" to get the cursor location but it also failed to get the current position (wherever I moved the cursor, it always returned the same value). It seems to me it is related to the swiftSnap plugin, since there was no problem if I just open a fresh blender file. Maybe you can have a look at the attached file in my previous post. The cursor position won't update anymore in that file. |
|
December 8, 2012, 04:39 |
|
#58 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi,
Thanks for the detailed description. You are right, the bpy.context.scene.cursor_location is fixed in your blend file. Strange. I am not able to repeat it for a fresh SwiftSnap-enabled case. I have implemented a feedback to the user about updates in location in mesh (and pushed it to github). Further I now use bpy.context.scene.cursor_location.copy() to access the location. Before I did not use the copy() method. It is possible that the object's locinmesh variable was a reference, instead of an independent variable... but as I said, I was not able to repeat the behaviour in a fresh case... Let me know if you can find a way to cause the problem! Kalle |
|
December 17, 2012, 09:36 |
Visualization/selection of features for polylines
|
#59 |
New Member
RDG
Join Date: Feb 2011
Posts: 29
Rep Power: 15 |
Hi.
I've been playing a little bit with swiftblock and it seems an interesting tool. Is there anyway to visualized / specify which edges of your local mesh it takes to create the polylines? I've been trying to create a C-grid for a wing, but its taking polylines that blend into themselves, resulting in illegal cells. Thanks. Ricardo. |
|
December 17, 2012, 11:41 |
|
#60 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
You can unfortunately not specify that directly like you can in commercial block meshers. What you have to consider is that SwiftBlock will use the shortest path in the geometry object. If you use the magnetic tool in "snap to vertex"-mode you can see this for yourself in Blender by selecting the two vertices you have snapped to and, in Edit Mode, use the Select->Vertex Path. The path taken will then be selected.
If you instead use the magnetic tool in "snap to edge"-mode, SwiftBlock will create a temporary copy of your geometry object. In that object, vertices will be inserted at snapped edges, and then the "vertex path" function in Blender will be used. That object is later deleted. The only way to find out which path is taken is then to use the preview function (I guess you already do this, though). If you have an edge that you want to be straight, even though it's both vertices are snapped, you can explicitly tell it not to have a polyLine under the "Edge settings" button. Kalle |
|
|
|