【旋转楼梯】之 参数化建模
导读:大家好,我是小狼老师,这次的主题是旋转楼梯之参化建模,后面会有更多关软件操作的技巧来分享给各位读者,下面简单来跟大家介绍下。

本篇是讲参数化建模,需要大家做的准备工作就是下面的两幅图片。

如果有小伙伴看过小编前面推送的文章,就会想起来在软件设置的那篇里,已经说过这个地方啦!没看过的童鞋请查看历史消息,不会查看历史消息的请问度娘。
接下来我们新建一个part文件,然后找到这个工具条

没有的话请右键工具栏空白的地方,把这个Knowledge选上。
然后,点那个f(x)的图标,就进到参数建立和编辑界面啦!每一项都是干啥的小编就不多说了,这几个单词应该还能看懂,实在不懂可以上百度谷歌一下!
比如,现在我们建立两个参数练练手:
①参数类型选成长度Length,②单值Single Value,然后③点前面那个New Parameter of type,就创建好了,④我们把参数的名称改为“长”。后面的值⑤那里写不写都行,退出后在特征树上双击参数也可以改这个值。
同样的方法建立一个参数叫宽,不过我们把Single Value那里选成Multiple Values,这时候再点新建参数,会出来下面这个对话框。
它的意思是,咱们可以为这个参数预设一些值,让用户使用这些参数时,只能从这些值里面选而不能手动输入。在上面的Textbox中(Sorry啊,忘了这不是VB),上面的文本输入区域中输入值后按Enter键或点击右面向下的箭头都可以把值添加到列表中。选中列表区域的值后用右面的箭头按钮,也可以对这些值排序。
上面的参数建完了,我们看一下特征树。双击特征树上的参数修改一下值试试~
参数建立完了也不能当花瓶摆着啊!我们得让它控制我们的几何特征。那我们就来画一个草图吧!随便找一个面,进去,画一个矩形,然后给它的长和宽标上尺寸。然后我们可以右键尺寸,选择object下的Edit Formula;
也可以双击进入尺寸值编辑界面,在文本输入区域右键,也有Edit Formula。

我们在保证光标处于输入位置的情况下,在特征树上点击参数,该参数就与这个尺寸发生了关联。这里,建议大家在使用参数的时候,尽量通过点选的方式,不要自己输入参数名,否则会出现不明错误。
当然,我们可以自己加一些运算,不过一定要:
带单位!!!
带单位!!!
带单位!!!
重要的事情说三遍!
比如,我们让这个矩形的长,等于我们这个“长”的参数加1的二倍,就应该这么写:
那个mm的单位!!!不知道有多少英雄好汉卡在这个上面了!
同样的方法关联另一个长度。在尺寸与函数关联后,会有一个白色的fx标识显示。
我们退出草图,用这个矩形拉伸一个长方体。在拉伸高度那里也进行参数的关联

然后我们双击修改参数,模型是会随之更新的。

欢迎大家关注,同时也欢迎老师投稿,撰写内容主题与案例有关联,详情咨询冯老师13126964530(微 信同号)。