General InformationAnother existing Open ID DELMA_DetailedFastenStrategy_ID allows definition of the children of a Detailed Fasten. This openness supports the creation of only one Remove material under the Detailed Fasten. With the DELMA_DetailedFastenStrategyWithSplitDrill_ID openness, you can create multiple remove materials under the Detailed fasten. By default, DELMA_DetailedFastenStrategy_ID openness ID is considered for Detailed Fasten creation. However, when the openness ID DELMA_DetailedFastenStrategyWithSplitDrill_ID is implemented, the existing openness is ignored, and only the DELMA_DetailedFastenStrategyWithSplitDrill_ID openness is considered.This opening ID is used to create multiple remove materials to be able to assign each and every remove material to a different operation/step.
Input ObjectsInput objects must be of the following types:
OutputsOutput objects must be of the following types:
These output values are used by application to:
Sample
//-------------------------------------------------------------------------------------------------------------
// Open_ID : DELMA_DetailedFastenStrategyWithSplitDrill_ID
// Type : ProductOccurrence
//
// INPUTS
// ThisObject(ProductOccurrence) : The FastenerOccurrence for which the DetailedFasten is to be created
// iFastenOccurrence(MfgProcessOccurrence) : The instance of Fasten that is supposed to be replaced by the DetailedFasten. (NULL if called outside replace context)
// OUPUTS
// oListOfComponents(List) : the list of mounted components for input fastener
// oDrillType(List) : oDrillType[i] (integer) type of item number (i): PreDrill = 1 Drill = 2 NoDrill = 3 NoRemoveMaterial = 4
// oHoleDiameter(List) : oHoleDiameter[i] (Real) hole diameter of item number (i)
// oHoleDepth(List) : oHoleDepth[i] (Real) hole depth of item number (i)
// oHoleType(List) : oHoleType[i] (integer) Drill Type (Simple = 1 Counterbored = 2 Countersunk = 3) of item number (i) – 0 if oDrillType[i] <> 2
// oCBDiameter(List) : oCBDiameter[i] (Real) Drill counterbored diameter of item number (i) – 0.00 if oDrillType[i] <> 2
// oCBDepth(List) : oCBDepth[i] (Real) Drill counterbored depth of item number (i) – 0.00 if oDrillType[i] <> 2
// oCSAngle(List) : oCSAngle[i] (Real) Drill countersunk angle of item number (i) – 0.00 if oDrillType[i] <> 2
// oCSDepth(List) : oCSDepth[i] (Real) Drill countersunk depth of item number (i) – 0.00 if oDrillType[i] <> 2
//-------------------------------------------------------------------------------------------------------------
//include "MNODebug"
//---------------------------------------------------------------------------------------------
// INPUTS
let FixOccurrence(SpotAssyFastenerOccurrence)
let iFastenOccurrence(MfgProcessOccurrence)
//
// OUTPUTS
let ListOfComponents(List)
let DrillType(List)
let HoleDiameter(List)
let Depth(List)
let HoleType(List)
let CBDiameter(List)
let CBDepth(List)
let CSAngle(List)
let CSDepth(List)
DrillType->Append(4)
HoleDiameter->Append(2.5mm)
Depth->Append(15.00mm)
HoleType->Append(1)
CBDiameter->Append(0.00)
CBDepth->Append(0.00)
CSAngle->Append(0.00)
CSDepth->Append(0.00)
// Internal
let DEBUG(Boolean)
let Cst_NoDrillAtAssembly(string)
let Cst_Balanced(string)
let Cst_MostAtAssembly(string)
let Cst_Positionning(string)
let Cst_NONE(string)
set Cst_NoDrillAtAssembly="NoDrillAtAssembly"
set Cst_Balanced="Balanced"
set Cst_MostAtAssembly="MostAtAssembly"
set Cst_Positionning="Positioning"
set Cst_NONE="NONE"
let FastenerReference(SpotFastener)
//-----------------------------------------------------------------------------------------
//set DEBUG=MNODebug::DebugActive()
set DEBUG=true
if (DEBUG) {Trace(1,"DELMA_DetailedFastenStrategyWithSplitDrill 2022-11-29 START") }
//-----------------------------------------------------------------------------------------
// Input attribute not defined for this Open_ID
//-----------------------------------------------------------------------------------------
set iFastenOccurrence=Parameters.GetAttributeObject ("iFastenOccurrence")
set FixOccurrence=ThisObject
//-----------------------------------------------------------------------------------------
if (DEBUG)
{
if (NULL==iFastenOccurrence)
{
Trace(1,"iFastenOccurrence==NULL")
}
else
{
let ItemRef(DELFmiFunctionReference)
Set ItemRef=iFastenOccurrence.Reference
if (NULL <> ItemRef)
{
Trace(2,"iFastenOccurrence.V_Name =",ItemRef.V_Name)
}
else
{
Trace(1,"iFastenOccurrence.Reference==NULL")
}
}
if (NULL==FixOccurrence)
{
Trace(1,"cast(ThisObject,SpotAssyFastenerOccurrence)==NULL")
}
else
{
Trace(2,"ThisObject.Name = ",FixOccurrence.Name)
}
}
//---------------------------------------------------------------------------------------------------------------
// Retreive Manufacturing Fastener Strategy and Category
// a) in case of Replace, read on Fasten, adn also read Manufacturing Fastener Category
// b) in other cases (iFastenOccurrence==NULL), read from Fastener Bundle (Category assumed beeing NONE)
// in any case, for secondary fastener, Strategy and Category are assummed to be NONE
//-------------------------------------------------------------------------------------------------------------
let MF_Strategy(String)
let MF_Category(String)
let L_IsSecondary(Boolean)
set L_IsSecondary=false
set MF_Strategy=Cst_NONE
set MF_Category=Cst_NONE
if (NULL <> FixOccurrence)
{
L_IsSecondary=FixOccurrence->IsASecondaryFastener()
if (DEBUG) {Trace(2,"FixOccurrence->IsASecondaryFastener() = ",L_IsSecondary) }
}
if (NULL <> iFastenOccurrence and L_IsSecondary == false)
{
set MF_Strategy=iFastenOccurrence->GetFastenerStrategy()
if (DEBUG) {Trace(2,"iFastenOccurrence.V_MfgFastenerStrategy = ",MF_Strategy) }
let ItemInst(DELFmiFunctionInstance)
Set ItemInst=iFastenOccurrence
if (NULL <> ItemInst)
{
if (ItemInst->HasAttribute("V_FastenerCategory"))
{
MF_Category=ItemInst->GetAttributeString("V_FastenerCategory")
if (DEBUG) {Trace(2,"iFastenOccurrence.V_FastenerCategory = ",MF_Category) }
}
else
{
MF_Category=Cst_NONE
if (DEBUG) {Trace(1,"iFastenOccurrence.V_FastenerCategory Not Defined ") }
}
}
}
if (MF_Strategy == Cst_NONE and NULL <> FixOccurrence and L_IsSecondary == false)
{
let Bundle(BundleFastener)
let FastenList(List)
let FastenRef(Fasten)
set Bundle=FixOccurrence->Bundle
if (NULL <> Bundle)
{
set FastenList=GetListOfFastenInSessionFromBundle(Bundle)
if (DEBUG) {Trace(2,"GetListOfFastenInSessionFromBundle(Bundle).Size = ",FastenList->Size()) }
for FastenRef inside FastenList
{
MF_Strategy=FastenRef.V_MfgFastenerStrategy
}
}
if (DEBUG) {Trace(2,"FixOccurrence->Bundle.Fasten.V_MfgFastenerStrategy = ",MF_Strategy) }
}
if (DEBUG) {Trace(2,"FixOccurrence.MF_Strategy = ",MF_Strategy) }
if (DEBUG) {Trace(2,"FixOccurrence.MF_Category = ",MF_Category) }
//----------------------------------------------------------------------------
// Retreive Fastener Diameter from ThisObject
//----------------------------------------------------------------------------
if (NULL <> FixOccurrence)
{
let TmpProductOccurrence(ProductOccurrence)
set TmpProductOccurrence=FixOccurrence
//------------------------------------------------------------------
if (DEBUG)
{
if (NULL == TmpProductOccurrence)
{
Trace(1,"cast(FixOccurrence) in ProductOccurrence fails")
}
else
{
Trace(1,"cast(FixOccurrence) in ProductOccurrence OK")
}
}
//------------------------------------------------------------------
if (NULL <> TmpProductOccurrence)
{
set FastenerReference=TmpProductOccurrence.Reference
}
if (NULL<>FastenerReference)
{
HoleDiameter[1]=FastenerReference.V_Diameter
if (DEBUG) {Trace(2,"FastenerReference.V_Name = ",FastenerReference.V_Name) }
if (DEBUG) {Trace(2,"FastenerReference.V_Diameter = ",HoleDiameter[1])}
if ( HoleDiameter[1]<0.1mm)
{
HoleDiameter[1]=2.5mm
if (DEBUG) {Trace(2,"D<0.1mm => Corrected_FastenerDiameter = ",HoleDiameter[1])}
}
if ( HoleDiameter[1]>10cm)
{
HoleDiameter[1]=12mm
if (DEBUG) {Trace(2,"D>10cm => Corrected_FastenerDiameter = ",HoleDiameter[1])}
}
}
}
//----------------------------------------------------------------------------
// Set Output
// Stragtegy==NONE
// Mount All components
// No Drill
// Stragtegy==NoDrillAtAssembly
// Mount All non fixed components
// No Drill
// Stragtegy==MostAtAssembly
// Mount Mount All components
// Drill at Fastener Diameter
// Stragtegy==Balanced
// Mount Mount All components
// Drill at Fastener Diameter for Non Positionning Fasteners
//----------------------------------------------------------------------------
if (MF_Strategy==Cst_NoDrillAtAssembly)
{
if (NULL <> FixOccurrence)
{
ListOfComponents=FixOccurrence.GetComponents(false)
}
if (DEBUG) {Trace(2,"ListOfComponents.Size = ",ListOfComponents->Size())}
DrillType[1]=4
}
else if (MF_Strategy==Cst_Balanced)
{
if (NULL <> FixOccurrence)
{
ListOfComponents=FixOccurrence.AllComponents
}
if (DEBUG) {Trace(2,"ListOfComponents.Size = ",ListOfComponents->Size())}
if (MF_Category==Cst_Positionning)
{
DrillType[1]=4
}
else
{
//--------------------------------------------------------------------------
// If FastenRef name contains "_Tete-F_", "_Tete-A_" or "_Tete-CD_"
// Then 2 DRILL are to be added
//--------------------------------------------------------------------------
Let MATCHNameF(String)
Let MATCHNameA(String)
Let MATCHNameD(String)
Let FixName(String)
set MATCHNameF="_Tete-F_"
set MATCHNameA="_Tete-A_"
set MATCHNameD="_Tete-CD_"
FixName = ""
DrillType[1]=2
if (NULL<>FastenerReference)
{
FixName = FastenerReference.V_Name + FastenerReference.V_description
//--------------------------------------------------------------------------------
if (DEBUG)
{
Trace(2,"FastenerReference.V_Name = ",FastenerReference.V_Name)
Trace(2,"FastenerReference.V_description = ",FastenerReference.V_description)
Trace(2,"MATCHNameF = ",MATCHNameF)
Trace(2,"MATCHNameA = ",MATCHNameA)
Trace(2,"MATCHNameD = ",MATCHNameD)
}
//--------------------------------------------------------------------------------
}
if (DEBUG) {Trace(2,"FixName = ",FixName)}
if (0 <= FixName->Search(MATCHNameA))
{
//--------------------------------------------------
// Add a Counterbored Drill
// same D as Simple Drill
// CounterBoreDiameter = 10.00mm
// CounterBoreDepth = 1.00mm
//--------------------------------------------------
DrillType->Append(2)
HoleDiameter->Append(HoleDiameter[1])
Depth->Append(1.00mm)
HoleType->Append(2)
CBDiameter->Append(10.00mm)
CBDepth->Append(1.00mm)
CSAngle->Append(0.00)
CSDepth->Append(0.00)
}
if ( 0 <= FixName->Search(MATCHNameF))
{
//--------------------------------------------------
// Add a CounterSunk Drill
// same D as Simple Drill
// CounterSunkAngle = 50.00
// CounterBoreDepth = 2.00mm
//--------------------------------------------------
DrillType->Append(2)
HoleDiameter->Append(HoleDiameter[1])
Depth->Append(2.00mm)
HoleType->Append(3)
CBDiameter->Append(0.00)
CBDepth->Append(0.00)
CSAngle->Append(50.00deg)
CSDepth->Append(2.00mm)
}
if (0 <= FixName->Search(MATCHNameD))
{
DrillType->Append(2)
HoleDiameter->Append(HoleDiameter[1])
Depth->Append(1.00mm)
HoleType->Append(4)
CBDiameter->Append(10.00mm)
CBDepth->Append(1.00mm)
CSAngle->Append(64.00deg)
CSDepth->Append(0.00)
}
}
}
else if (MF_Strategy==Cst_MostAtAssembly)
{
if (NULL <> FixOccurrence)
{
ListOfComponents=FixOccurrence.AllComponents
}
if (DEBUG) {Trace(2,"ListOfComponents.Size = ",ListOfComponents->Size())}
DrillType[1]=2
}
else
{
DrillType[1]=4
if (NULL <> FixOccurrence)
{
ListOfComponents=FixOccurrence.AllComponents
}
if (DEBUG) {Trace(2,"ListOfComponents.Size = ",ListOfComponents->Size())}
}
//----------------------------------------------------------------------------
// End
//----------------------------------------------------------------------------
if (DEBUG)
{
Trace(1,"DELMA_DetailedFastenStrategyWithSplitDrill - Dump OUTPUT")
Trace(2,"ListOfComponents.Size() = ",ListOfComponents.Size())
Trace(2,"DrillType.Size() = ",DrillType.Size())
Trace(2,"HoleDiameter.Size() = ",HoleDiameter.Size())
Trace(2,"Depth.Size() = ",Depth.Size())
Trace(2,"HoleType.Size() = ",HoleType.Size())
Trace(2,"CBDiameter.Size() = ",CBDiameter.Size())
Trace(2,"CBDepth.Size() = ",CBDepth.Size())
Trace(2,"CSAngle.Size() = ",CSAngle.Size())
Trace(2,"CSDepth.Size() = ",CSDepth.Size())
let j(integer)
let size(integer)
size = DrillType->Size()
j = 1
for j while j <=size
{
Trace(4,"DrillType[",j,"] = ",DrillType[j])
Trace(4,"HoleDiameter[",j,"] = ",HoleDiameter[j])
Trace(4,"HoleDepth[",j,"] = ",Depth[j])
Trace(4,"HoleType[",j,"] = ",HoleType[j])
Trace(4,"CBDiameter[",j,"] = ",CBDiameter[j])
Trace(4,"CBDepth[",j,"] = ",CBDepth[j])
Trace(4,"CSAngle[",j,"] = ",CSAngle[j])
Trace(4,"CSDepth[",j,"] = ",CSDepth[j])
}
}
//----------------------------------------------------------------------------
// On set les outputs
//-----------------------------------------------------------------------------------------
Parameters.SetAttributeObject ("oDrillType",DrillType)
Parameters.SetAttributeObject ("oHoleDiameter",HoleDiameter)
Parameters.SetAttributeObject ("oHoleDepth",Depth)
Parameters.SetAttributeObject ("oHoleType",HoleType)
Parameters.SetAttributeObject ("oCBDiameter",CBDiameter)
Parameters.SetAttributeObject ("oCBDepth",CBDepth)
Parameters.SetAttributeObject ("oCSAngle",CSAngle)
Parameters.SetAttributeObject ("oCSDepth",CSDepth)
Parameters.SetAttributeObject ("oListOfComponents",ListOfComponents)
//-----------------------------------------------------------------------------------------
if (DEBUG) {Trace(1,"DELMA_DetailedFastenStrategyWithSplitDrill / END") }
//-----------------------------------------------------------------------------------------
| |||||||||||||||||||||||||||||||||||||||||||