TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
When posting a problem be sure to include which version you are using.  Give as much information as possible.  If the problem is with a specific file be sure to attache it to your post.

parametric assembly that isn't a formal "TC parametric part" or a scripted .ppm
Read 231 times
* October 31, 2017, 09:10:33 PM
There's an occasional dispute over whether or not TC's a "parametric" program or not, that is, whether it's possible to model parts or assemblies with persistent relationships that can be varied with the model rebuilding, without having to be redrawn or corrected.  I've been fooling around with constraints, and I've found that it's possible to build some pretty involved parametric models using constraints, but without having to involve the formal "format|parametric part" process or scripting.  I haven't used TC's constraints before so I was doodling and experimenting in V17 (the old version, not 2017), and this is my first result.  It's incomplete, in that I haven't reasoned the relationship that will place the middle shelf midway between the benchtop rails yet, and I didn't bother to give it doors that can be opened to whatever angle.  What I wanted to do is build something that can be shaped by using overall dimensions and probable material thickness in the most obvious way, through the variables, without having to dig through the part tree or scripting.  I know that I've gotten some things wrong, because while it works in V17, I opened the file in 2015 and 2016, and something goes wonky when the HeightOA variable is altered, but not width or cabinet depth, so I'm theorising that something's changed slightly, or I've made an error, which is more likely.   I did dabble with Alibre a long time ago, and I do recall that there was a song-and-dance, which they called "data vault" at the time, to open a file built in an older version in a newer.  Whatever....
To circumvent the 2D, not 3D, constraint limitation, I used intersected simple extrusions.  This meant that the limits to the model's size are dictated by the value of the sweep, but I just gave them arbitrary, ridiculous values that won't be approached in the normal size range of such a cabinet.  Another thing that's notable about TC's constraints is that, although they're 2D you can associate values, like applying equal length and distance, radius and probably others that I haven't considered, for entities that aren't on the same plane, which means that some things have a sort-of-3D constrainability. 
The file is nicely compact, 120kB, not that that's anything worthy these days, and things that interested me about the result are:  it can be translated in x, y and z, but not rotated or scaled (d'uh.  It just occurred to me that scaling is trivial in the calculator/variables palette.  Possibly rotation too, with a little more thought) .
However, it can be resized and copied, which breaks the associations with the constraints, rotation and realignment is unconstrained afterwards. 
IMO, TC's got a lot of capability that's all but ignored, because it doesn't work like other programs that people are more familiar with, and for which there's a lot more documentation and learning material for their particular methodology. 

Logged


* November 01, 2017, 03:47:32 AM
#1
Really nice work Murray,  constraints did have a lot of potential when they were bought in, its a shame it wasn't exploited by the programmes to more easily convert into full 3D 

Logged


* November 01, 2017, 01:10:55 PM
#2
Thanks Andy.  There are pitfalls that are probably obvious to people who have experience with programming or scripting, like when I changed the name of variables, they stopped working in functions/expressions.  My rookie error was putting spaces in the new names, they don't work in functions if that's done.    I don't know if that's in the documentation, but it ought to be so prominent and repeated so frequently that it can't be missed. 
N
Another tip is that size changes, say to the side length of a rectangle, can extend in an unwanted direction, ie, the wrong end is fixed.  Deleting the variable/dimension and applying it to the opposite side of the rectangle corrected that for me. 
« Last Edit: November 01, 2017, 01:42:03 PM by murray dickinson »

Logged


* November 01, 2017, 09:24:13 PM
#3
Another way to stop things moving in the wrong direction is to use the anchor constraint.

There are  reasons I like taking this one step further and converting them to parametric parts.

1. extrude heights can be a parameter, rotation angles of a revolve can be a parameter etc - making it more 3d
2. with nested parametric parts you can move and rotate parts, as well as make copies of components.
3. You can use the math functions to work out number of copies, distances.
4. They are easy to drag into drawing from the library palette and change parameters of that specific object without having to try to figure out which parameter is relevant. You also avoid having conflicting variable names in the calculator palette.

But there are also disadvantages
1. You will need to explode them and turn them into groups or blocks - because they don't work well with the drafting palette, and the architectural section- elevation tool.
2. They don't always work in newer versions of the program.
3. the edit existing part has bugs - so you need to plan carefully, so that you don't need to use it
4. the mid constraint doesn't work
5. when you rotate a nested part using rotx roty or rotz it rotates about the center of extents of the original geometry including dimensions and  block marks - so you need to plan carefully.
« Last Edit: November 01, 2017, 11:00:35 PM by nikkipollard »

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* November 02, 2017, 05:07:11 AM
#4
I don't agree, Nikki.  This is a parametric assembly, not an assembly of parametric parts, so I used intersection instead of simple extrusion because the intersecting objects can both be constrained.  To coin your own term, it's even MORE "more 3D" than a constrained profile with what amounts to a thickness parameter.  The point of the parametric assembly is to be able to have the entire assembly compose itself, without having to attend to what some people call "granular" detail, ie extrusion length or material thickness for individual components.    The profiles can have linear, polynomial or compound interrelationships that can be predefined, you don't have to get "under the hood" to jigger the parameters because it's the driving dimensions, the overall height, width and depth, that are changed, the relationships of the components is already defined, although there are driving dimensions like material thickness or the material dimensions of individual components that can redefined together or separately.   Because of that, the fix geometry constraint overconstrains if it's used more than once in an assembly, because the fixed points can't alter their relationships.   
However, I'd be very interested to see if you can arrange an assembly of nested parametric parts to interact this way.  You'd know better than me if that's possible?  I deliberately built this cabinet to be similar to one that Don Cheke built in SolidWorks when this discussion flared up in a thread a while back.  Don reckoned it took him a quarter-hour or so in SW and that he did similar things regularly;  mine took me a day-and-a-half.  However,  this is the first time I've attempted it, I was teaching myself as I did it, and this afternoon I've figured out how to make the middle shelf place itself in the middle when the height is varied, how to rig parametric opening doors, and how to locate screw holes anywhere - but still not within the formal "TC parametric part" format.   I think that what I'm describing is novel use of TC, and I think that there's more to be discovered. 
« Last Edit: November 02, 2017, 05:17:36 AM by murray dickinson »

Logged


* November 02, 2017, 09:18:42 PM
#5
Try your method on a whole kitchen layout or building. It can get really complicated.

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* November 02, 2017, 10:30:39 PM
#6
Don't we use proxies like blocks, x-refs for that sort of thing?  :)

Logged


* November 03, 2017, 03:16:21 PM
#7
I've added door/s that can be opened, and experimented more, including using the object in later versions.  I also discovered that if the file is opened and saved to later versions, it functions as it should, but if the file is inserted or copied into a file, it behaves incorrectly, and that also applies if the file is inserted into its native version.   
« Last Edit: November 03, 2017, 03:33:20 PM by murray dickinson »

Logged