Offers a set of tools that change a solid by transformations.
Reset
Resets all internal values to their defaults.
Name ( name sObjectName )
Defines the name of the object, the transformation should be applied to.
AddName ( name sObjectName )
Defines one more name of an additional object, in addition to the previously defined object. This is only used for transformations of solids with Origin set to CommonCenter, for TransformAlign and RotateAlign.
TranslateCurve / ScaleCurve / RotateCurve / MirrorCurve
TranslateWire / ScaleWire / RotateWire / MirrorWire
TranslateCoil / ScaleCoil / RotateCoil / MirrorCoil
Translate / scale / rotate / mirror the selected object with all previously made settings.
Transform ( enum {"Shape","Port","Currentdistribution","Part"} what, enum {"Translate", "Rotate", "Scale", "Mirror", "Matrix", "GlobalToLocal", "LocalToGlobal"} how )
This execute a specified transform onto the given type of objects (named via Name and AddName). Note that not all transformations are applicable to all types of objects.
enum what |
description |
Shape |
this transforms solids |
Port |
this transforms all kinds of ports |
Currentdistribution |
this transforms nearfield sources |
Part |
this transforms a complete block in the 3D Layout View |
enum how |
description |
special methods |
Translate |
Moves the object along a given vector |
Vector, UsePickedPoints, InvertPickedPoints |
Rotate |
Rotates the object around one main axis, given the angle and an offset for the rotation axis (origin). |
Angle, Center, Origin |
Scale |
scales the object. The scaling center can be specified as well. For some types, only uniform scaling is allowed. |
ScaleFactor, Center, Origin |
Mirror |
mirrors the object on a mirror plane whose normal and offset is given |
PlaneNormal, Center, Origin |
Matrix
|
this applies a general matrix transformation onto a given object. Input is a 3 by 3 Matrix and an additional translation vector. |
Matrix, Vector |
LocalToGlobal |
After this transform that consists of translates and rotates internally, the position and orientation of the object in regard to the global coordinate system will match its position and rotation that it had to the local coordinate system before. |
|
GlobalToLocal |
This is the inverse operation to the one above. An object aligned to the x-y plane in the origin of the global coordinate system will afterwards be aligned to the u-v plane and translated to be in the origin of the local coordinate system. |
|
Note: To align some object in a completely user specified manner onto something else, you can follow this workflow:
Transform the local coordinate system to specify an anchor system for your object to be aligned.
Transform "LocalToGlobal" this object.
Align the local coordinate system to specify the target of your previously defined anchor coordinate system
Transform "GlobalToLocal" your object of interest.
TransformAlign ( bool previouslyPasted, bool noMoreRotate )
This method expects two faces to be picked and transforms a subset of all objects by translation and rotation so that the selected faces touch afterwards. Which parts of the objects are transformed depends on the bool previouslyPasted: if true the information of a previous copy-paste operation or of a subproject import are used. If false, all solids set by .Name and .AddName are used.
If noMoreRotate is true, the picks are deleted and left for a following RotateAlign.
RotateAlign ( bool previouslyPasted )
This method expects two faces and two points to be picked and twists a subset of all objects around the center of the second face. The twist angle is calculated by defining two lines starting at the center of the second face to the two given points which should be parallel afterwards. The rotation axis is perpendicular to the second face.
The selection of the model is done in the same way as described for TransformAlign.
Please Note: This method expects to be called after a TransformAlign so that the picked faces are already touching. The picks are cleared afterwards.
UsePickedPoints ( bool switch )
This method is valid for the translation of a selected shape and decides if a translation vector is defined by the two recently picked points (switch = True) or if the vector is given numerically (switch = False).
InvertPickedPoints
This method is valid for the translation of a selected shape by use of picked points. The resulting translation vector will be inverted (switch = True) or remains unchanged (switch = False).
MultipleObjects ( bool copy )
If switch is True, the new solid will be copied and the original will remain untouched. Else (copy = False), the original object will be deleted. In case of repeated execution by usage of the .Repetitions method, copy = True will result in number new objects plus the original object.
GroupObjects ( bool unite )
If new objects are created during the transformation (.MultipleObjects enabled), unite = True defines that every new object will be a united with the original object after the transformation. If unite = False all new objects will stay separately.
Origin ( enum {"ShapeCenter", "CommonCenter","Free"} key )
For scale, rotate and mirror transformations, this method defines, whether the origin for the transformation should be the shape center, the center of all named shapes (see .AddName), or a free point defined by the .Center method.
Center ( double u, double v, double w )
Sets the center for scale, rotate and mirror transformations. The working coordinate system will be used, if activated. Only applicable, if .Origin is set to "free".
Vector ( double u, double v, double w )
Sets the translation vector. The working coordinate system will be used, if activated. Use in case of translate transformation only.
ScaleFactor ( double u, double v, double w )
Sets the scale factor for each coordinate direction. The working coordinate system will be used, if activated. Use in case of scale transformation only.
Angle ( double u, double v, double w )
Sets the rotation angle in degrees around the respective axis. The working coordinate system will be used, if activated. Use in case of rotate transformation only.
PlaneNormal ( double u, double v, double w )
Sets the mirror plane normal. The working coordinate system will be used, if activated. Use in case of mirror transformation only.
Matrix ( double c11, double c12, double c13, double c21, double c22, double c23, double c31, double c32, double c33 )
Sets a 3 by 3 matrix for the matrix transformation column by column. c11 through c13 will define the transformation of the x vector.
Repetitions ( int number )
Defines the number of repetitions, the transformation will be applied to the selected object.
Component ( name name )
Sets the component for the new solid. The component must already exist.
Material ( name name )
Sets the material for the new solid. The material must already exist.
MultipleSelection ( bool switch )
This setting specifies whether the transformation should be performed only to one solid or to multiple selected objects. If you transform multiple objects history entries are created for every shape and if you transform by selected points the pickpoints will be deleted after an operation. This flag prevents the pickpoints from being deleted. If there are still solids to transform the flag is 'true' and in the last transform block it is 'false' so the pickpoints will be deleted.
UsePickedPoints (False)
InvertPickedPoints (False)
MultipleObjects (False)
GroupObjects (False)
Origin ("ShapeCenter")