I have a surface that I meshed, simple planar surface, nothing exotic. I would like to translate the surface and all its associated entities in one operation. So far I can't find a way to accomplish this. When I translate (move by) the surface the surface moves but the mesh does not travel with it.
Ideally, l would like to take a group which has both geometry and fem entities and translate or rotate everything all in one shot. Is there a way I can accomplish this?
This is the "long term wishlist" that I send always year by year to FEMAP developers to implement in the FEMAP software, but not success yet. Move (translate) all entities (both geometry & mesh) is easy, the Predictive Engineering guys did a macro, by hand simply use MODIFY > MOVE BY > SOLID and repeat MODIFY > MOVE BY > ELEMENT and you are done because mesh & geometry remains associated, but we need a flag to add to any operation with geometry commands to tell FEMAP that if any mesh exist associated to that geometry to perform the same operation to the mesh as well, then either you MOVE/COPY/REFLECT/ROTATE, etc.. any geometry to include the mesh as well, not to have to repeat command for the mesh again....
Well, lets see if been more than one that request this feature we are heard, this is basic ...!!.
The following API should do what you want. Let me know if you have any questions.
Option Explicit Sub Main Dim App As femap.model Set App = feFemap() Dim fSetSurf As femap.Set Set fSetSurf=App.feSet Dim rc As zReturnCode rc=fSetSurf.Select(FT_SURFACE,True,"Select Surface(s) with Associated Mesh to Move Along Vector") If rc=FE_CANCEL Then Exit Sub Dim vecLength As Double Dim vecBase As Variant Dim vecDir As Variant rc=App.feVectorPick("Select Vector to Move Along",False,vecLength,vecBase,vecDir) If rc=FE_CANCEL Then Exit Sub App.feMoveBy(FT_SURFACE,fSetSurf.ID,False,vecLength,vecDir) Dim fSetNode As femap.Set Set fSetNode=App.feSet fSetSurf.Reset fSetNode.Clear Do While fSetSurf.Next fSetNode.AddNodesOnGeometry(FT_SURFACE,fSetSurf.CurrentID,False,True,False) Loop App.feMoveBy(FT_NODE,fSetNode.ID,False,vecLength,vecDir) End Sub