¢hris £und Posted February 21, 2020 Share Posted February 21, 2020 Hello all, My first attempt at a fZ/python script. (this is an Alpha and has known issues. ToDo List at the bottom of this message.) File attached. What is Match? Match will scale objects to match the Boundary Length (not yet functional), Area, or Volume. Not the bounding dimensions. Either Source/Master objects or a direct value in the UI can be used to determine the Target object sizes. Scaling is also allowed. Such as 1.5 x or .3333 of the Master. Match, is shape/form agnostic. That is, it doesn't care what the Target, nor Master shapes are, it will work as long as they have the topology you are trying to Match. i.e. a open poly line does not have a volume, so the script will not work if attempted. (currently, if an error is raised, nothing happens, including no indication of the error) A surface objects area could be matched to the surface of a Solid, if you have a reason to do that, and visa versa. Likewise a surface objects length can be matched to a open or closed line form and visa versa. Hope this is useful for someone besides myself. --------------------------- To use: (if the .pyc file doesn't work on a PC, let me know, I will provide the source if need be) Manually Install the script in the scripts folder (as far as I can tell, this cannot be in a sub-folder) Abstract case: Select the objects. Currently, Last object created will act as the Master/Source. All other objects selected will act as Targets. (This will be fixed in the future) So, cut and paste the object you want to be the master, so that fZ regards it as the last object in the modeling buffer. This will be fixed in the future. Here are three arbitrary objects all with differing Volumes. The Pyramidal shape will be the Master, as it is the last object created. Master. Target Target 1. Select the objects you want to transform as well as the Master. 2. Chose, Extension/Run Utility, Navigate to the Match.pyc script. the following dialog should appear. Select your options, In, this case, I am going to match the Volume Topology of the Pyramidal shape, with no scaling. Click the OK button, Now the objects all have the same Volumes. Note 1: the surface areas are all different, while the Volumes all "Match" TODO List. (I will need the API Documentation to finish) • Change UI to make sense. The order of the UI is a little awkward right now. • User configurable Units (currently only Imperial Units work and in Feet Only) (really only matters when inputing size manually into the UI. If matching to an existing volume, works as expected) • Use Pick Order (currently, the last object created is the Master that all other objects picked gets matched to) (Allow User to have first picked or Last Picked to be the Master by UI Choice) • Minor issue with the Volume, does not always make a perfect match. is sometimes off by a few thousands. (I do know how to fix it... just need to jump on it) • Undo doesn't work, Not sure if that is my problem or something • Clean up and Document Code The script was built from what I could glean from the examples provided by ADS. Realistically, this is a simple project, however it does hint at the power of what can be done. The future is bright! Next, I will show some examples of Why you would want to use it. Match.pyc Tech and Des 2 Quote Link to comment Share on other sites More sharing options...
¢hris £und Posted February 21, 2020 Author Share Posted February 21, 2020 Example Usage 1. Intake/Exhaust using Cross sections to generate final object. Here is the final object. This object has the same cross section throughout, regardless of the cross section shape. Except the final rectangle, it is reduced 75% of the intake (cropped circle). The Following is how I built it using the Match Script. First I created the rough source shapes, with no regard to their areas, and placed them roughly where I wanted them. There are 3 circles in the center, to help the loft tool maintain the desired cross section (can get a little wonky when changing shape types. it will bulge if only 2 circles are used.) Making sure the master shape is the last one created, I cut and paste one of the intake shapes (again, the cropped circle) Select all the objects I want to scale to the same area as the intake (all except the last of exhaust rectangles, I am saving that for another operation) Launch the script from the Extensions/Run Utility Menu Select Topology/surface. scale 1.0 Click OK. Areas of the 6 objects now match the intake. I repeat the process again, but this time only select the intake cross (it is still the last object created) section and the final exhaust port cross section. Run the script again and change the following settings: Topology/Surface. and Scale to .75 Click OK. Select the cross sections in order and apply the loft tool. more advanced examples. Tech and Des 2 Quote Link to comment Share on other sites More sharing options...
¢hris £und Posted February 21, 2020 Author Share Posted February 21, 2020 Example 2, without directions, as hopefully, it is now clear what the script is for. Here is a real world example. of matching a volume to a pre-specified volume via the UI. Was given the requirement that the balloon have a specific Volume. Enough to carry the weight of the basket, passengers, and the balloon itself. But not so big, that it became cost prohibitive to build. The actual volume was provided. (I used the same math to figure this out, as the script did not exist 15 years ago, but planted the seed for the script) Other Balloons for the same client, only Sylvester got built, albeit pupils in the wrong spot, and he decided not to put the tongue on. Des and Tech 2 Quote Link to comment Share on other sites More sharing options...
¢hris £und Posted February 21, 2020 Author Share Posted February 21, 2020 How I use Example 1: this is still a WIP, but should suffice as a concrete example. Will stop pestering all of you now. Des and Tech 2 Quote Link to comment Share on other sites More sharing options...
Tech Posted February 21, 2020 Share Posted February 21, 2020 Simply amazing work Chris! Thanks for sharing. Quote Link to comment Share on other sites More sharing options...
¢hris £und Posted February 21, 2020 Author Share Posted February 21, 2020 Thank you very much! Just thought I would give a little teaser on what is possible with a need and the will to solve that need. Considering this was done without the documentation, I am hoping it will highlight the accessibility that the new API offers. Once the documentation is available... to be cliche, the sky is the limit! I am truly excited to have scripting back! I fundamentally believe that it will allow the real brains to focus on the platform and allows us users to make tools that are more niche in nature, such as this. Looking at it realistically, tools like this probably aren’t in wide enough need for you to bother with. On the other hand, those of us who do, will save a lot of time and improve the work! Thank you for your hard work! It will be worth it and worth the wait for me! Have sooooo many questions! cheers! €hris £und Quote Link to comment Share on other sites More sharing options...
Jaakko Posted February 21, 2020 Share Posted February 21, 2020 Great work Chris! Thanks for sharing. ¢hris £und 1 Quote Link to comment Share on other sites More sharing options...
johnalexander1571 Posted February 21, 2020 Share Posted February 21, 2020 Hi Chris, that is just great, I enjoyed reading your report. Maybe I'll have a use for this! I totally enjoyed seeing the balloon itself. Your work is the most unique out there, due to the inflatable nature of them. Can you sometime post more of the stuff you did because that has to be some of the coolest form.Z made work out there. I can't image folks hanging off the bottom of something I created... The script is great too, tho. Good idea for a script. Quote Link to comment Share on other sites More sharing options...
¢hris £und Posted February 21, 2020 Author Share Posted February 21, 2020 (edited) Jaakko, John Alexander, Thank you very much! More scripts to come, And I do plan on ultimately converting them to plug-ins. Scripting is easier though. John, That is pretty much the extent of my Hot Air Balloon Designs. There are two others, but I do not have photos of them. One of those, I merely augmented an existing balloon. They are all Home builds, so they are classified as Experimental Aircraft. I am not a licensed aeronautical engineer, so am not legally allowed to design them. Home builds/experimental is the loophole. All the other designs are what are classified as cold air or forced air inflatables. Primarily for advertising purposes. Always considered myself a low grade industrial designer. Dan Manoim (sp) is the goto Guy for fZ industrial design. He pops in now and again (I think, DanM?) I have done other work, but mostly as the last guy on the list, so, clients never knew of me. Don't know if I am allowed to show any of that work. Some of that was, Denver International airport. (Flight Information Displays), Concepts for Arm and Hammer, Evian, Prototype This TV show (Personal Air Bag Safety device) Sadly only lasted 1 season, Intact Labs (project for NASA), JRF Visuals only, Evian water bottle, Hunter Douglas, Corona and some others. Most of the things on that list never amounted to anything. the FIDs got built, and the Prototype this got built. My anonymous claim to fame. here is some of the CABallon work, however. (I no longer do this work, company was purchased, and the new company moved all design and production to South America) Thanks for the interest! The Dragon was probably one of the funnest projects, as I got to do the electronics and write the code for it too. And, Yes FormZ was crucial in each of these projects. Me tweaking some of the Micro-controller code Video of the Dragon: http://www.neurascenic.com/Dragon2.m4v Edited February 21, 2020 by Chris lund Jaakko, Des and Justin Montoya 3 Quote Link to comment Share on other sites More sharing options...
¢hris £und Posted March 5, 2020 Author Share Posted March 5, 2020 So, just found out that the .pyc file format is not cross platform. I will update the script to a 1.0 and release it as source. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.