Part Computation Rule

This action rule is invoked when you use Update IPM.

This page discusses:

Attachment Line Alignment

General Information

This action rule is invoked when you use Update IPM.

Input Objects

Input objects must be of the following type:

Parameters correspond to the context object.

Example

The following example shows how to determine the opening type. You can use this example to make another script in the action rule.

  • If 0 is returned in the variable, then Molded is set as the orientation of the BSU.
  • If 1 is returned in the variable, then Thick is set as the orientation of the BSU.

let mfgProcItem(MfgProcessOccurrence)
let mfgItem(ElementaryEndItem)
let procOutput(VPMReference)
let SDDDesignProduct(VPMReference)
let DesignPlate(Structure_Plate) 
let DesignProfile(Structure_Stiffener) 
 
let listOFormedElement(List)
let plateThickness(LENGTH)
Let index(Integer)
let FormedElements(List)
 
set mfgProcItem= Parameters.GetAttributeObject("ManufacturedItem")
if mfgProcItem <> NULL
{
 set mfgItem = mfgProcItem.Reference
 set procOutput = mfgItem.GetProcessOutput() 
 set SDDDesignProduct = procOutput.GetStructureDesignObject()
 if SDDDesignProduct <> NULL
 {
  set DesignPlate = SDDDesignProduct
  set DesignProfile = SDDDesignProduct
  if DesignPlate <> NULL
  {        
   plateThickness = DesignPlate.V_StrThickness            
   mfgProcItem.GetFormedElements (listOFormedElement)
   set index=1
   for index while index <= listOFormedElement->Size()
   {
    let formedElem(Feature)
    set formedElem = listOFormedElement->GetItem(index)
    if(formedElem <> NULL)
    {                    
     let startRadius(LENGTH)
     let endRadius(LENGTH)
     let startAngle(ANGLE)
     let endAngle(ANGLE)
     let listOFormedElementValues(List)
     mfgProcItem.GetFormedElementValues (formedElem, startRadius,endRadius,startAngle,endAngle)
     let innerRadius(LENGTH)
     let formingAngle(ANGLE)
     set innerRadius=startRadius
     set formingAngle=startAngle
     if(innerRadius > 0mm and innerRadius == endRadius and formingAngle > 0deg)
     {
      let formedElemCreationMode(Integer)
      formedElemCreationMode=3 //both tangent lines and roll lines
      let formedElemCreationList(List)
      formedElemCreationList.Append(formedElem)
 
      if (innerRadius == 3*plateThickness and plateThickness <= 8mm)
      {
       formedElemCreationMode=2 //only roll lines
       formedElemCreationList.Append(formedElemCreationMode)
      }
      else if(innerRadius == 3* plateThickness and plateThickness> 8mm and plateThickness <= 20mm and formingAngle >= 160deg)
      {
       formedElemCreationMode=2 //only roll lines
       formedElemCreationList.Append(formedElemCreationMode)
      }
      else if(innerRadius == 3*plateThickness and plateThickness > 8mm and plateThickness <= 20mm and formingAngle < 160deg)
      {
       formedElemCreationMode=1 //only tangent lines
       formedElemCreationList.Append(formedElemCreationMode)
      }
      else if(innerRadius == 3*plateThickness and plateThickness >  20mm and formingAngle >= 170deg)
      {                            
       formedElemCreationMode=2 //only roll lines
       formedElemCreationList.Append(formedElemCreationMode)
      }
      else if(innerRadius == 3*plateThickness and plateThickness >  20mm and formingAngle < 170deg)
      {
        formedElemCreationMode=1 //only tangent lines
        formedElemCreationList.Append(formedElemCreationMode)
      }
      else
      {                            
        formedElemCreationMode=2 //only roll lines
        formedElemCreationList.Append(formedElemCreationMode)
      }
      FormedElements.Append(formedElemCreationList)                        
     }
    }
   }
  }
 }
}
Parameters.SetAttributeObject("FormedElements", FormedElements)

Tangent and Roll Line

General Information

This action rule is invoked when you use Update IPM and Update FTA.

Input Objects

Input objects must be of the following type:

Parameters correspond to the context object.

Example

The following example shows an EKL rule for TangentLine/RollLine creation. You can use this example to make another script in the action rule.

In formedElemCreationMode attribute:

  • If 0 is returned in the variable, then roll lines and tangent lines are not created.
  • If 1 is returned in the variable, then only tangent lines are created.
  • If 2 is returned in the variable, then only roll lines are created.
  • If 3 is returned in the variable, then both tangent lines and roll lines are created.

let mfgProcItem(MfgProcessOccurrence)
let mfgItem(ElementaryEndItem)
let procOutput(VPMReference)
let SDDDesignProduct(VPMReference)
let DesignPlate(Structure_Plate) 
let DesignProfile(Structure_Stiffener) 
 
let listOFormedElement(List)
let plateThickness(LENGTH)
Let index(Integer)
let FormedElements(List)
 
set mfgProcItem= Parameters.GetAttributeObject("ManufacturedItem")
if mfgProcItem <> NULL
{
 set mfgItem = mfgProcItem.Reference
 set procOutput = mfgItem.GetProcessOutput() 
 set SDDDesignProduct = procOutput.GetStructureDesignObject()
 if SDDDesignProduct <> NULL
 {
  set DesignPlate = SDDDesignProduct
  set DesignProfile = SDDDesignProduct
  if DesignPlate <> NULL
  {        
   plateThickness = DesignPlate.V_StrThickness            
   mfgProcItem.GetFormedElements (listOFormedElement)
   set index=1
   for index while index <= listOFormedElement->Size()
   {
    let formedElem(Feature)
    set formedElem = listOFormedElement->GetItem(index)
    if(formedElem <> NULL)
    {                    
     let startRadius(LENGTH)
     let endRadius(LENGTH)
     let startAngle(ANGLE)
     let endAngle(ANGLE)
     let listOFormedElementValues(List)
     mfgProcItem.GetFormedElementValues (formedElem, startRadius,endRadius,startAngle,endAngle)
     let innerRadius(LENGTH)
     let formingAngle(ANGLE)
     set innerRadius=startRadius
     set formingAngle=startAngle
     if(innerRadius > 0mm and innerRadius == endRadius and formingAngle > 0deg)
     {
      let formedElemCreationMode(Integer)
      formedElemCreationMode=3 //both tangent lines and roll lines
      let formedElemCreationList(List)
      formedElemCreationList.Append(formedElem)
 
      if (innerRadius == 3*plateThickness and plateThickness <= 8mm)
      {
       formedElemCreationMode=2 //only roll lines
       formedElemCreationList.Append(formedElemCreationMode)
      }
      else if(innerRadius == 3* plateThickness and plateThickness> 8mm and plateThickness <= 20mm and formingAngle >= 160deg)
      {
       formedElemCreationMode=2 //only roll lines
       formedElemCreationList.Append(formedElemCreationMode)
      }
      else if(innerRadius == 3*plateThickness and plateThickness > 8mm and plateThickness <= 20mm and formingAngle < 160deg)
      {
       formedElemCreationMode=1 //only tangent lines
       formedElemCreationList.Append(formedElemCreationMode)
      }
      else if(innerRadius == 3*plateThickness and plateThickness >  20mm and formingAngle >= 170deg)
      {                            
       formedElemCreationMode=2 //only roll lines
       formedElemCreationList.Append(formedElemCreationMode)
      }
      else if(innerRadius == 3*plateThickness and plateThickness >  20mm and formingAngle < 170deg)
      {
        formedElemCreationMode=1 //only tangent lines
        formedElemCreationList.Append(formedElemCreationMode)
      }
      else
      {                            
        formedElemCreationMode=2 //only roll lines
        formedElemCreationList.Append(formedElemCreationMode)
      }
      FormedElements.Append(formedElemCreationList)                        
     }
    }
   }
  }
 }
}
Parameters.SetAttributeObject("FormedElements", FormedElements)

Roll Line Direction and Strategy

General Information

This action rule is invoked when you use Update IPM and Synchronization.

Input Objects

Input objects must be of the following type:

Parameters correspond to the context object.

Example

The following example shows an EKL rule for the creation, direction and strategy management of roll lines. You can use this example to make another script in the action rule.

In RollLineCreationSide attribute:

  • If 1 is returned, then roll lines are created in one direction only.
  • If 2 is returned, then roll lines are created in both direction.
Note: If RollLineCreationSide is not defined in the rule, if the rule is not present, or if the parameter does not return a valid value, then by default, roll lines are created on one side only.

In RollLineCreationStrategy attribute:

  • If 1 is returned, then single roll line is created for multiple patches
  • If 2 is returned, then roll lines are created for individual patch only.

When the Generate roll line for individual patch option is enable in the App Options, the roll line strategy is determined by this rule based on the output of RollLineCreationStrategy. If this is not defined in rule, roll lines are created on individual patches, as defined in the Preferences.

If the option disable, then roll lines are created as single patch.

Note: For more information on Generate roll line for individual patch, see Structure Features

let mfgProcItem (MfgProcessOccurrence)
set mfgProcItem = Parameters.GetAttributeObject("ManufacturedItem")

if (mfgProcItem <> NULL)
{
	//****FUN164189 "
	let rollLineCreationSide (Integer)
	let PlateCurvatureType (Integer)
	let rollLineCreationStrategy (Integer)

	set mfgProcItem = Parameters.GetAttributeObject("ManufacturedItem")
	if mfgProcItem <> NULL
	{
		//set rollLineCreationStrategy = 1 // roll Line creation for single patch
		set rollLineCreationStrategy = 2   // roll Line creation for multi patches
		set PlateCurvatureType = 1          //Single Curvature Plate
		set rollLineCreationSide = 1        //Roll line on one Side

		mfgProcItem.GetPlateCurvatureType(PlateCurvatureType)

		if (PlateCurvatureType == 2)          //Double Curvature Plate
		{
			rollLineCreationSide = 2         //Roll line on Both Side
		}
	}
	Parameters.SetAttributeInteger("RollLineCreationSide", rollLineCreationSide)
	Parameters.SetAttributeInteger("RollLineCreationStrategy", rollLineCreationStrategy)
	//
}