Showing posts with label parameters. Show all posts
Showing posts with label parameters. Show all posts

Wednesday, 17 February 2016

Rounding Parameters, Part 2

If you have been struggling to use parameter functions like round, ceil, floor, isolate (which converts units for parameters) or similar then you will need to know this. I have been playing with this before and it was only recently that I have found some hidden help pages which explain why I had this problem and how to solve it.

round'n round


The more you live the mode you learn and I hope it stays this way for a long time; I know there is a regression curve but I don’t want to taste it. Avid for knowledge I am glad I learned something new so I had to write it down for you and me; I am in this way hoping it won’t perish in the back of my mind.

The solution I found last time was to increase precision by multiplying with10 or one if it’s powers, then use the function and then divide by that number again. Not elegant or good looking but it did the trick until I found the correct solution for this.

So it seems that units are evaluated before mean value of the parameter and in order to evaluate the numerical part you first need to get rid of the units.

How do we do that? We simply divide and multiply by the parameter units like this: "round(5.8 / 1 mm) * 1 mm"

Get rid of those units first.

The help page has a probably better example so shamelessly I will share it.

Units are evaluated before the arithmetic portion of an expression. Therefore, the power operator applies to a unit before it applies to an adjacent numeric value. For example:
2 m^2
does not evaluate to 4 square meters, but rather means 2 square meters. The correct syntax is:
(2 m)^2 = 4 m^2

There is a lot of info about syntax errors as well like when you mix units with unitless values without explicitly specifying this. That’s when you get that red text in the functions window so make sure you glimpse over the help pages here (2016) or here (2014), if the page is no more, search Google for “Formulas and equations for expressions reference” or “Expression Reference for Numeric Parameters”.

Later,

Ads.



photo credit: snowing (license)

Thursday, 10 September 2015

Linking parameters



                A lot of the times you will need to create matching features (like holes) on different parts. You could create a single sketch and then derive it into separate parts or you could use “Make Layout” on the Layout panel of the Sketch tab, also located in on the Manage tab. This will use sketch blocks or solid bodies but you need to think ahead, and prepare the project beforehand and it will not be covered here. I want to talk to you about all those cases when you would use project geometry while in an assembly to mimic the features of one part into others. While this is fast and well permitted for small assemblies it is not recommended for large assemblies.

                In fact in my Application Options I have stripped out this making sure that adaptivity and associative doesn’t become a memory hog killing Inventor and taking all the fun out.



                TIP: If you hold down CTL wile projecting you will get the opposite of what you settings are. If the settings are set to create adaptive / associative edges then using CTRL you will in fact create non-adaptive / non-associative edges and vice-versa.

                In those rare cases where you just want to copy geometry from one part to the other you still have a lot of options like linking parameters, deriving one’s parameters into the other, copy the features/bodies at the assembly level and all of these options will update automatically for you. 

                But, do you really want it to compute them all the time, when using operations like rebuild all, when opening files, or when you just click update on the quick access?

                What I like to do is derive the parameters of one part into the other, no bodies, no other features, just the parameters and the reason for this is because a derived part can have the option to Suppress the link or Break the link so I can control what gets updated and more important when gets updated.

                TIP: part edges can change with a simple operation like chamfer or fillet and if you rely solely on project geometry with adaptivity you will have broken links and references.

                Give you parameters a name either when dimensioning or by adding them manually in parameters. When the dimension pop-up window shows up you can create custom name parameters dynamically by entering the name with no spaces, just underscore, followed by = and the value you want like this: “Hole_Distance=30”.

stop adjunsting your monitor, the screenshot is not paralel to sketch plane


                When you create a similar part go to 3D Model tab, Insert panel or Create panel and use the Derive button.



                In the settings dialog don’t bring any bodies, expand parameters and tick the ones you need bringing in.
                Now you can dimension your new part and have it update automatically when the original one changes.
                TIP: For coordinated assemblies you should look into linking files with excel which will provide a single source of control for your file updates.

Later,
ADS