Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Does moldflow software could scale a part with uneven shrinkage value

393920702
Observer

Does moldflow software could scale a part with uneven shrinkage value

393920702
Observer
Observer

Moldflow software 能否通过 scale 命令来实现对产品网格进行(XYZ)三个方向不同的放大 例如:Moldflow软件中,热塑性产品,表面网格。希望可以将产品网格进行(0.5%,0.7%,0.5%)的放大,请问如何操作?

0 Likes
Reply
236 Views
1 Reply
Reply (1)

bernor_mf
Advisor
Advisor

@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.)