@393920702 ,
Hi,
first a google translate from Chinese to English:😊
"Can the scale command be used to enlarge the product mesh in three different directions (XYZ)? For example: in Moldflow software, thermoplastic products, surface mesh. I hope that the product grid can be enlarged (0.5%, 0.7%, 0.5%). How to do it?"
The scale tool in Moldflow Synergy has one factor only.
Moldflow Insight Help | Scale tool | Autodesk
You could use Moldflow API to do an anisotropic scaling - Scale.
Scale()
Boolean Scale ( Object aEnts,
Object aRefPt,
Object aScale,
Boolean aCopy,
Boolean aMerge
)
Scales entities about a given reference point
Parameters
aEnts EntList object containing the entities to be scaled
aRefPt Vector object that specifies the reference point
aScale Vector object that specifies the scale factors in the three coordinate directions
aCopy specify True to copy entities; False to move them
aMerge specify True to merge nodes after the reflect operation
Returns
True if operation is successful; False otherwise
Example:
This example scales the curve C6 by a factor of 1.5 in all directions.
EntList.SelectFromString "C6"
Vector.SetXYZ 0, 0, 0
Vector_1.SetXYZ 1.5, 1.5, 1.5
Modeler.Scale EntList, Vector, Vector_1, False, False
This is an example that scales triangles.
'%RunPerInstance
'@ DESCRIPTION
SetLocale("en-us")
Dim SynergyGetter, Synergy
On Error Resume Next
Set SynergyGetter = GetObject(CreateObject("WScript.Shell").ExpandEnvironmentStrings("%SAInstance%"))
On Error GoTo 0
If (Not IsEmpty(SynergyGetter)) Then
Set Synergy = SynergyGetter.GetSASynergy
Else
Set Synergy = CreateObject("synergy.Synergy")
End If
Synergy.SetUnits "Metric"
Set Modeler = Synergy.Modeler()
Set EntList_T = Modeler.CreateEntityList()
Set Vector = Synergy.CreateVector()
Set Vector_1 = Synergy.CreateVector()
'* Select all triangles
Set PredicateManager = Synergy.PredicateManager()
Set Predicate1 = PredicateManager.CreateLabelPredicate("T:")
EntList_T.SelectFromPredicate Predicate1
'* This scales by different factor in X, Y, Z, from reference point 0,0,0
Vector.SetXYZ 0, 0, 0
Vector_1.SetXYZ 1.5, 2.0, 2.5
Modeler.Scale EntList_T, Vector, Vector_1, False, False
You could customize the script to suit your needs.
Hope this helps.
Regards,
Berndt
( If my comments are accepted, provide "Kudos" as appreciation. If your request is answered/resolved, please click the "Accept as Solution" button. Thanks.)