MoI discussion forum
MoI discussion forum

Full Version: Anyone wish to develop a custom script?

Show messages:  1-3  …  104-123  124-143  144-163  164-183  184-203  204-223

From: bemfarmer
15 Jan 2012   [#164] In reply to [#163]
Hi Michael,

Well, I am editing this post a lot. I managed to get the Delete key to work properly.
One line prevented "moi.geometryDatabase.removeObjects( airFoilProfile );" from working in the cleanup.

The culprit is: Cancel ( ControlPointsfactories ); occuring before the removeObjects line.
Do not know why... It contains points. The other 3 factories arrays contain curves. They CAN occur before the
removeObjects line.


Note: Replaced attachment 3 posts back, with modification.
From: Unknown user
25 Jan 2012   [#165] In reply to [#164]
hi brian,

i was wondering about something. i like the latest version of your script. but i was thinking it may be a lot easier if it started the process by asking which input file you wanted to use and then created the geometry. so it would be a little bit like the import point file script as far as how it starts up asking you to select a file. but after that the geo would just appear and that would be the end of the script.

the reason i think this would be easier is that you wouldn't have to transfer all the inputs from the input file to the moi html window. i have been working on PROP_DESIGN over the last few weeks and released a new version. PROP_DESIGN_GEO has been renamed PROP_DESIGN_XYZ. I took all the geometry creation parts out of the original code. So they now only exist in PROP_DESIGN_XYZ. This allowed me to package PROP_DESIGN_XYZ without causing confusion.

The basic process works by PROP_DESIGN_OPT determining the optimum geometry and creating an input file for PROP_DESIGN_XYZ. This is the same input file that you could read into your script, since it contains all the values you need.

Another option could be that you have inputs in an html window in MoI but the inputs would be for PROP_DESIGN_OPT. The code would run and generate the input file you need to make the geo. The only problem with this is that it takes several minutes for PROP_DESIGN_OPT to run. So I don't think that would be the best option.

The prop_design.zip file on my website contains all the source code and input files you would need to play with.

http://propdesign.weebly.com/primary-download.html

Note that I added a new input at the end of the input files. However, you don't need to use that input for what you are doing. It's there for reference right now.
From: bemfarmer
26 Jan 2012   [#166] In reply to [#165]
Hi Anthony,

Sounds like good ideas. I'll study on it a bit.
After our bad ice storm, puget sound region, Washington state, power is on again, but no internet at home yet :-)
From: Unknown user
26 Jan 2012   [#167] In reply to [#166]
Sorry to hear that. I've been through a few of those. No fun. Especially when your neighbors have power and you don't, lol. I was lucky that my gas fireplace worked for some reason, even though there was no power and there was no battery that powered it. So at least I didn't freeze to death.

I am working on an update to PROP_DESIGN. When I posted that file for you to use, I saw the examples I have were still not quite in sync. So I have been working on getting them the way I want. This shouldn't affect anything you have done or may do in the future. I should have the latest version uploaded in a few hours.
From: Anthony (PROP_DESIGN)
11 Feb 2019   [#168]
hi,

i'm back after many years away. my posts say unknown users, since I had Michael delete my account. at the time I started this thread I was evaluating moi v2. I ended up going with rhino because I thought it would be more inline with what PROP_DESIGN users may have wanted. however, after many years of using it, I have grown tired of the constant battle to get it to create valid solid models. when rhino 6 came out and the users panned it, I looked at MoI again. Everyone was raving about MoI v4. So I decided to make the switch to MoI. I had thought that since rhino worked with PROP_DESIGN xyz files out of the box and that there was a large amount of 3rd party plugins, rhino would be the way to go for most PROP_DESIGN users. However, the plugin community has pretty much died and MoI can work with xyz files. So I have already been recommending MoI for awhile now, instead of Rhino.

I am still making the blade models manually. Which can take a really long time. The worst part is the last step sometimes will never work. That is making the root fillet. It would often break the model in Rhino. Oddly, it's a model by model issue. Some models have no problems. Others you can fight with it for awhile and get a valid model. Other models will never make a valid solid. So it's nothing I am doing, as far as I can tell. I will be interested to see how MoI does. It can't be any worse, so I figure what the heck.

In any event, if anyone has spare time and would be interested in trying to completely automate the creation of solid propeller/fan/turbofan blades, let me know. I think this would be a very useful thing for a lot of people. If a blade model can be created automatically in a second or two. That will save at least an hour per blade model, if not more. That adds up over time. I made a video showing the issues involved. The main thing is I want to be able to read in the xyz files and then have a dialog to select what sort of profile you want to use. Then have the model created. The blade count would need to be known as well. This would be a very involved task. I don't know for sure if MoI can be automated to the extent needed. I just figured I would ask. If no one can do it or is willing to do it, that's ok too. I'm just glade to never have to use Rhino again. What a kick to the shorts that was.

The video talking about the things involved with the automation is here; https://www.youtube.com/watch?v=R5DF822U89w&index=2&list=PLzGiietqAECXnIFl6ngHvhzgBxgTrC_qW&t=0s

If you want to know about the version of PROP_DESIGN that makes the xyz files, that video is here; https://www.youtube.com/watch?v=jco0EqEa8Jw&t=0s&list=PLzGiietqAECXbwWGhodSW6Lni51Tj8Q_U&index=6

Also, note that there was many changes to PROP_DESIGN since bemfarmer recoded the xyz portion. So they would no longer be the same. I'm more interesting in the blade creation past the xyz files though. There isn't a need to recode xyz.

Sincerely,

Anthony Falzone

Developer of PROP_DESIGN
Public domain aircraft propeller/fan/turbofan design and analysis software
https://propdesign.jimdo.com/
From: bemfarmer
12 Feb 2019   [#169] In reply to [#168]
Welcome back Anthony.

- Brian
From: Anthony (PROP_DESIGN)
12 Feb 2019   [#170] In reply to [#169]
thanks brian
From: Karsten (KMRQUS)
14 Feb 2019   [#171] In reply to [#168]
Hello Anthony,

I saw the video - that's a very interesting project. Although I don't develop propellers, I downloaded your software. It is difficult to get a result without training. Nevertheless I took the existing files SPAN.xyz, Profile_A.xyz and so on and experimented with them. I used the nodeeditor for this. Some of the neccesary functionality is missing and I have to think about how to implement it and I have to look your Video a few times more to understand your complete workflow.
Another way can be to look at grasshopper for Rhino. I don't know.



Have a nice day
Karsten

Image Attachments:
prop.png 


From: Anthony (PROP_DESIGN)
14 Feb 2019   [#172] In reply to [#171]
Hi Karsten,

Thanks for looking into the node editor. That was something I was wondering about. If that can work too, that would be great. Sorry you are having trouble with PROP_DESIGN, if you have questions, you can message me here. The video after the CAD video also talks about how the projections work. I forgot to mention a few things during the CAD video. The XYZ video should hopefully explain how to use PROP_DESIGN. One thing I didn't touch on in the videos is how the updates affected the geometry creation. It used to be the radius always started at the origin. Now, chord distribution options 3-5 have radius values with a Z component. So the Z of the span applies to the radius as well. Chord distribution options 1 and 2 still have radius values from the origin. So those would be easier to work with.

I doubt grasshopper would be of any use, since rhino itself often can't function properly. There are so many problems with rhino that I have given up on it. I never did look into grasshopper though. I have been waiting for MoI v4 to make the switch to MoI. So I haven't yet got it on my machine. If I get impatient, I might just go ahead and switch early. But I am trying to save myself more work. I think I'll have to keep Rhino v5 around though. As, all my files were made in it. Some of them have dimensions. So I know that is something that will probably be an issue.

I'm thinking of doing an updated hovercar in MoI, as my first project with it. I wanted to change some things to give it better steering and braking, from the concept shown on my website.

As far as the automation of propellers/fans/etc... I was thinking, really just getting the base profile created and then copied and oriented for a loft or 2 rail sweep with multiple sections would be enough. The rest is fairly quick and easy. All the time is spent making and orienting the cross sections. So that would reduce the amount of work needed with the node editor or scripting. But if the entire process could be automated, that would save the most time. I've been making them manually for about 10 years. So it's not going to help me much, now that I'm done with the project. But I'm hoping this could save other people time. Certainly, automation is needed in a production environment. It's something that might help drive more sales of MoI too.
From: Karsten (KMRQUS)
14 Feb 2019   [#173] In reply to [#172]
Hello Anthony,
don't get me wrong - I don't have problems with your software - I'm was only focused to the geometric problem. So I took the first examples I found to play with them. I didn't have a closer look to the software itselve, what is calculated and how it works- so I first have to understand and use it, before I will have problems.

Have a nice day
Karsten
From: Barry-H
14 Feb 2019   [#174]
Hi Anthony,
could you post the curve file that requires the projecting onto cylinders (shown in your video) as a Moi drawing so I can try to understand the construction method that you want to be automated.
Cheers
Barry
From: Anthony (PROP_DESIGN)
14 Feb 2019   [#175] In reply to [#174]
hi barry,

thanks for taking the time to look into this. unfortunately, I don't have the xyz file associated with the model shown. I do however have the rhino file. I have attached that for you. The points that were imported are in the file. This was an old model that is no longer consistent with PROP_DESIGN. I showed it because it was setup already and showed some problems with rhino. After the screencast, I went back and tried some things to get the projected geometry to work. I couldn't find anything to make it work out. For some reason, rhino breaks the geometry when you add any sort of root fillet to it. The red model wasn't an issue. The green model was done with a flat plate cross-section using an ellipse for the le and te. I didn't talk about that in the screencast. So it's an additional profile you could work with if you wanted. So the overall profile selection needs to be something like:

1) naca 65a009 airfoil with original le (an ellipse) and original te (a small radius arc)
2) naca 65a009 airfoil with original le and increased radius te
3) naca 65a009 airfoil with the le connected with straight lines and the te going to a point (for simplified fea blade models)
4) flat plate with radius at le and te, user defined thickness (for stalled models like computer case fans and house fans)
5) flat plate with ellipse at le and te, user defined thickness
6) straight line (midplane fea model, this is super easy to do manually though so no real need to automate it)

the main thing that would save a lot of time is something where you could select and define what kind of profile you want. then have it copy and orient that cross-section in all the right places. then an option to project onto cylinders. if there is airfoil or blade sweep, the projected cross-sections need to be rotated into position. once you get that far, the rest isn't too time consuming to do manually.

when I first created xyz, it was done with the idea you could do a 2 rail sweep using one profile. however victor, the developer of mecway, noticed rhino wasn't working right. so since then, I have had to do either a loft with multiple sections or a 2 rail sweep using the sections you would with the loft. rhino often makes you fix the orientations if you do a loft. the 2 rail sweep seems to work better as far as any need for additional corrections. but in that case, you have to manually make new rails when the airfoils have been projected onto cylinders. rhino has all sorts of problems. I have had to work around them. too many to list or even remember. so i'm not sure how well moi will work. but it certainly can't be any worse than rhino. they have set the bar as low as humanly possible.

if you need, I can make a new file using the current version of prop_design. it takes quite a long time to do. and there are all sorts of blade options. so it's not really possible to manually make a model for every conceivable situation. usually, I use the swept computer case fan. however, some of the options will make the radius have a different z value for each location. so those types of blades will be even more of a time suck to setup. it use to be that the swept computer case fan was the most challenging geometry. that is why I have worked with it all this time. but now, there are a few more options that would be even harder to do. I tried to expose everything one would need to know about the blade. if I forgot something or if something could be done to make automation easier, I can make changes to xyz. as far as I know, it should be good enough to start the process off.

let me know if I can be of any more help.

thanks again

link to file shown in screencast; https://drive.google.com/open?id=1x6GDAmBHWd3J8uBcUfuC4RxMfm3TeraJ
From: Karsten (KMRQUS)
14 Feb 2019   [#176] In reply to [#172]
Hello Anthony,

In a first step I´ve written 2 new nodes to evaluate vectors from lines and create frames/coordinate system from two vectors.



Maybe at the weekend more!

Have a nice day
Karsten

Image Attachments:
prop2.png 


From: Anthony (PROP_DESIGN)
14 Feb 2019   [#177] In reply to [#176]
wow, very cool. thanks karsten.
From: Barry-H
15 Feb 2019   [#178] In reply to [#175]
Hi Anthony,
thanks for the file I can see the construction method better now. Based on that I can see it's possible to calculate the angles the airfoil profile needs to be rotated to be square to the circle (cylinder) for projecting onto the cylinder or I would suggest using Isect tool with a half circle and the airfoil profile.
I did a quick test using the node editor with the intersection node and that worked but it produces a surface and I need to be able to extract the edges from it and not sure how that is done at the moment. I have posted the problem on the forum and hopefully someone more able than me with the node editor will supply the answer.
It would be helpful if I could have the point file for the model you posted so I can do the maths for the rotations.
My thinking is that the Circle the rotation of the airfoil profile about origin and rotation (2 directions) of airfoil about it's own datum can be calculated to then Isect to give the desired profile that is the rotated back for the production of the blade.

Cheers
Barry
From: Anthony (PROP_DESIGN)
15 Feb 2019   [#179] In reply to [#178]
hi,

sorry for the slow reply. it's been one of 'those' days. the example was based on option 4 of the xyz settings file. however, it was done with an old version of prop_design. so I can't re-create the exact info any more. if you want, run option 4 and generate new data. it will be similar. the angle you want to know is output by xyz. it is the file 'GNUPLOT_2D_TOTAL_SWEEP_ANGLE.DAT' the first column is radius in mm the second column is the angle you want to know in degrees. also the rail points will have the same angle baked in but it's difficult to extract that way. also output is the twist angle.

you can make the example more challenging by changing the chord distribution option from 1 to 3-5. 2 is a little more challenging but it still has the radius starting at the origin. one thing with projecting the geometry onto cylinders is you may need to make new le and te rails. so that is harder to do when you have the tips going to a point.

if you need me to generate files for you let me know. it's probably easier just to run the code yourself. once you understand how it works it's extremely easy to run. only takes the blink of an eye to generate a design. if you are just creating geometry for art/games/etc... you don't need to do any analysis on the designs you come up with in xyz. installing gnuplot would be useful so you can see some of the plots. they have the units shown. so if you aren't sure what the units are you can look at the plots to see. also the midplane is created there as well. but just for viewing rather than for cad.
From: Karsten (KMRQUS)
16 Feb 2019   [#180] In reply to [#179]
Hello Anthony,

now I understood how to generate data with your software:-) Really quite simple. I took the A400 example to get more complex test data. I had to make some new nodes. There are some difficulties to evaluate all coordinate systems. And I'm not sure if anything is right. Especially the placement of the profile curves. Should they placed normal to the span curve or should the z-axis in the plane of the profile?

Please have a look to the attached result.

Have a nice weekend
Karsten
From: Anthony (PROP_DESIGN)
16 Feb 2019   [#181] In reply to [#180]
hi karsten,

thanks for continuing to look into this. i'm glad you find prop design easy to use. that was one of my main goals. unfortunately over time the inputs and settings grew. but there wasn't really anything I could do about that. i'll take a look at the file and get back with you. in the mean time. there is a video that covers a few things I forgot to mention the cad issues video. i'm not sure if you seen it or not. it may help to answer your question too. the links for the video is; https://www.youtube.com/watch?v=jNkNNawmfJ0
From: Anthony (PROP_DESIGN)
16 Feb 2019   [#182] In reply to [#180]
hmm, kinda hard to see what's going on in the model. that is a hard blade to model. I will model it manually and post the file for you to look at. I won't project onto cylinders though because that takes forever. with the tip going to a point, that makes it worse as well as far as projecting onto cylinders. but hopefully, the file i'll send you will help to see the default layout. the airfoils should align with the rail points that come out of prop design. if that makes sense. the orientations are always the same so once you get something working it should always work. I posted a file a few messages back for another user. it is the one shown in the screencast. it too may help you see the orientations. it has all of them in there too. so it is more thorough than what i'll send this time.
From: Anthony (PROP_DESIGN)
16 Feb 2019   [#183]
so that was useful. I started recording a screencast for you and right away ran into a bug with xyz. I fixed the bug but haven't posted the update yet. I finished the screencast too but have to upload it. I also have to finish working on the rhino file. So lots to do. Give me an hour or so to get everything done and I'll post the file when I'm finished with everything. Hopefully, this will all answer your question.

Show messages:  1-3  …  104-123  124-143  144-163  164-183  184-203  204-223