Smart Fragment

Предыдущая страницаВ началоСледующая страница

The Smart Fragment mechanism allows us to develop parametric library elements whose insertion scenario is described in the program stored directly in the file of the given library element or in the external module (DLL). Settings of T-FLEX CAD macros and also the program interface (Open API) allow us to describe settings in such a way that upon insertion of the file as a fragment or upon its editing/deletion the user-specified macro will be executed.

21SmartFragment1

The macro can contain code realizing the required logic of the user’s interface on insertion/editing/deletion of the given fragment. For example, the adaptive model «Groove» was developed that has a set of external variables and adaptive parameter – circular edge which must be substituted upon insertion of the fragment.

21SmartFragment3 21SmartFragment1S

21SmartFragment2

This model can be found in the examples library - Examples > 3D Assemblies > Smart fragment > Groove.grb.

The «Groove.grb» file contains the macro InsertGroove which performs selection of exclusively circular edges located at the intersection of the external cylinder and the planar face. Upon insertion of the given groove from the library the macro is launched automatically. Instead of regular command of insertion of a 3D fragment with the full interface, the simplest command is working at this moment that allows us to select the edges satisfying the given condition and to change the values of external variables of the inserted fragment.

21SmartFragment4 21SmartFragment2S

The result of insertion of the fragment by this scenario is the small groove on the shaft.

213DLayoutReal5S

This model can be found in the examples library - Examples > 3D Assemblies > Smart fragment > Shaft.grb.

This mechanism allows users-programmers to create the most convenient scenarios of fragments insertion in various applied fields.