*#// Fixed_1D_Beam_to_Solid_for.bas
*#
*#
*# Naplnění UniqueContactName správnými jmény
*Intformat "%i"
*# Vynulovat vsechno
*tcl(TK_InitContactName)*\
*# pri prvnim pruchodu naplnim pole UniqueContactName()
*loop Intervals
*Set Cond Fixed_1D_Beam_to_Solid_for_Point  *nodes *or(1,Real) *or(2,Real) *or(3,Int) *or(4,Int) *CanRepeat  
*Add Cond Fixed_1D_Beam_to_Solid_for_Line     *nodes *or(1,Real) *or(2,Real) *or(3,Int) *or(4,Int) *CanRepeat  
*Add Cond Fixed_1D_Beam_to_Solid_for_Surface    *nodes *or(1,Real) *or(2,Real) *or(3,Int) *or(4,Int) *CanRepeat 
*Add Cond Fixed_1D_Beam_to_Solid_for_Volume   *nodes *or(1,Real) *or(2,Real) *or(3,Int) *or(4,Int) *CanRepeat 
*If(CondNumEntities(Int)>0)
*loop nodes *OnlyInCond
*tcl(TK_CreateArraysContactName *Cond(ContactName))*\
*End nodes
*EndIf
*End Intervals
*tcl(TK_FinishArraysContactName)
*# Naplnění UniqueContactName správnými jmény END
*#
*#
*#
*#
*#
*#
*intformat "%d"
*Set Var nMasterSlaveIndex=0
*# *or(1) *or(2,Int) *or(3,Int) 
*Set Cond Fixed_1D_Beam_to_Solid_for_Point  *nodes *or(1,Real) *or(2,Real) *or(3,Int) *or(4,Int) *CanRepeat  
*Add Cond Fixed_1D_Beam_to_Solid_for_Line     *nodes *or(1,Real) *or(2,Real) *or(3,Int) *or(4,Int) *CanRepeat  
*Add Cond Fixed_1D_Beam_to_Solid_for_Surface    *nodes *or(1,Real) *or(2,Real) *or(3,Int) *or(4,Int) *CanRepeat 
*Add Cond Fixed_1D_Beam_to_Solid_for_Volume   *nodes *or(1,Real) *or(2,Real) *or(3,Int) *or(4,Int) *CanRepeat 
// selection has *CondNumEntities entities
*For(i=1;i<=GenData(UniqueContactName,Int);i=i+1)
*If(CondNumEntities(Int)>0)
// selection has *CondNumEntities entities
*If(Cond(Apply_in_Subincrement,int)==ApplyInSubincrement  || strcmp(GenData(Calculation_Analysis),"Static")==0) 
*# format "%d %d %20.10f"
*#  MASTER SLAVE NODAL LISTS "Master*IntervalIndex(int)" "Slave*IntervalIndex(int)" DISTANCE *GenData(MASTER_SLAVE_DISTANCE,REAL)

*loop nodes *OnlyInCond
*#
*Set Var oContactName=strcmp(Cond(ContactName),GenData(UniqueContactName,*i))
*If(oContactName==0)

BEAM_1D_TO_SOLID
   LIST_BEAM_NODES "*GenData(UniqueContactName,*i)_1D_Beam_to_solid_1D_BEAM_Interval*IntervalNum"  
   LIST_SOLID_NODES "*GenData(UniqueContactName,*i)_1D_Beam_to_solid_SOLID_Interval*IntervalNum"
   MAX_DISTANCE *tcl(GetDistanceValueForSelectionNameAbs *Cond(ContactName))
   SEARCH_RADIUS *tcl(GetSearchRadiusValueForSelectionName *Cond(ContactName)) 
   *tcl(GetAcceptOutsideElementValueForSelectionName *Cond(ContactName))    
   ROTATION_ARMS *Cond(Rotation_Arms,int) 
   *Cond(FIX_ROTATION_xx) 
   *Cond(FIX_ROTATION_HOR_xx) 
   /** BEAM_GROUP 2 EMBEDDED SOLIDS_GROUPS FROM 1 TO 1 **/
*#   
*If(Cond(Do_not_connect_selected_DoFs,int)==1)
   SKIP_DOFS_MASK *\
*Set Var Bit = 0 
*If(Cond(Do_NOT_Connect_Displacement_X,int)==1) 
*Set Var Bit=Operation(Bit+1)
*EndIf
*If(Cond(Do_NOT_Connect_Displacement_Y,int)==1) 
*Set Var Bit=Operation(Bit+2)
*EndIf
*If(Cond(Do_NOT_Connect_Displacement_Z,int)==1) 
*Set Var Bit=Operation(Bit+4)
*EndIf
*If(Cond(Do_NOT_Connect_Rotation_X,int)==1) 
*Set Var Bit=Operation(Bit+8)
*EndIf
*If(Cond(Do_NOT_Connect_Rotation_Y,int)==1) 
*Set Var Bit=Operation(Bit+16)
*EndIf
*If(Cond(Do_NOT_Connect_Rotation_Z,int)==1) 
*Set Var Bit=Operation(Bit+32)
*EndIf
   *Bit
*EndIf   
*#
*Set Var nMasterSlaveIndex=Operation(nMasterSlaveIndex+1)
*break  
*EndIf
*End nodes
*EndIf
*EndIf
*End
