Deformation Functions

An opening ID is an entry point used to customize business logic. The I3DxMdProductEKLPackage package provides functions on server side for Product Modeler you can use to know if a product is deformable or deformed and navigate on Deformed From relation.

This page discusses:

IsDeformed

This function allows you to evaluate if an object is deformed.

Signature

IsDeformed()

Arguments

Input/Output Required? Type Comment
Input VPMReference -
Output Boolean -

ReturnType

Boolean

The function returns TRUE if the input is deformed, FALSE if not.

Evaluating if an Object is Deformed

Let title (String)
Let description (String)
Let isDeformed (Boolean)
Let listModifiedObjects (List)
Let TargetObject (VPMReference)    


title = ThisObject.GetAttributeString("PLMEntity.V_Name")
description = ThisObject.GetAttributeString("PLMEntity.V_description")
isDeformed = ThisObject.IsDeformed()
if isDeformed 
{
    description = title + "_deformed"    
}
ThisObject.SetAttributeString(("PLMEntity.V_description"), description)
listModifiedObjects.Append("B" + ThisObject.GetAttributeString("physicalid"))     
ReportModifiedObjects(listModifiedObjects)

GetDeformable

This function allows you to retrieve the deformable object when providing a deformed object.

Signature

GetDeformable()

Arguments

Input/Output Required? Type Comment
Input VPMReference
Output VPMReference

This function must be associated with a deformable object.

If the function is called on an object that is not deformed, it returns null value.

If the function is called on a broken deformed object (the deformable object has been deleted or is not accessible), it returns null value.

Retrieve a Deformable Object

Let title (String)
Let description (String)
Let isDeformed (Boolean)
Let associatedDeformable (VPMReference)
Let listModifiedObjects (List)
Let TargetObject (VPMReference)    

title = ThisObject.GetAttributeString("PLMEntity.V_Name")
description = ThisObject.GetAttributeString("PLMEntity.V_description")
isDeformed = ThisObject.IsDeformed()
if isDeformed
{
description = title + "_deformed"  
 associatedDeformable = ThisObject.GetDeformable()
if (associatedDeformable<>NULL)
	{
	       associatedDeformableTitle =   associatedDeformable.GetAttributeString("PLMEntity.V_Name")
               description = description+ "_Deformable="+associatedDeformableTitle

	}
	else
	{

		description =  "brokenDeformed"
	}
}
ThisObject.SetAttributeString(("PLMEntity.V_description"), description)
listModifiedObjects.Append("B" + ThisObject.GetAttributeString("physicalid"))     
ReportModifiedObjects(listModifiedObjects)

IsDeformable

This function allows you to evaluate if an object is deformed.

Signature

IsDeformable()

Arguments

Input/Output Required? Type Comment
Input VPMReference -
Output Boolean -

ReturnType

Boolean

The function returns TRUE if the input is deformable, FALSE if not.

Checks if an Oobject is Deformed

Let title (String)
Let description (String)
Let isDeformable (Boolean)
Let listModifiedObjects (List)
Let TargetObject (VPMReference)    

title = ThisObject.GetAttributeString("PLMEntity.V_Name")
description = ThisObject.GetAttributeString("PLMEntity.V_description")
isDeformable = ThisObject.IsDeformable()
if isDeformable
{
    description = title + "_deformable"    
}
ThisObject.SetAttributeString(("PLMEntity.V_description"), description)
listModifiedObjects.Append("B" + ThisObject.GetAttributeString("physicalid"))     
ReportModifiedObjects(listModifiedObjects)

GetDeformeds

This function allows you to retrieve all the deformed products associated with the provided deformed product.

Signature

GetDeformeds ()

Arguments

Input/Output Required? Type Comment
Input VPMReference -
Output List List of the deformed references

If the function is called on a product that is not deformable, it returns an empty list.

Retrieve Deformed Products

Let title (String)
Let description (String)
Let isDeformable (Boolean)
Let isDeformed (Boolean)
Let associatedDeformeds (List)
Let nbAssociatedDeformeds (Integer)
Let associatedDeformable (VPMReference)
Let associatedDeformableTitle (String)

Let listModifiedObjects (List)
Let TargetObject (VPMReference)    


title = ThisObject.GetAttributeString("PLMEntity.V_Name")
description = ThisObject.GetAttributeString("PLMEntity.V_description")
isDeformable = ThisObject.IsDeformable()

if isDeformable
{
     associatedDeformeds = ThisObject.GetDeformeds()lll
     nbAssociatedDeformeds = associatedDeformeds.Size()
     description = title + "_deformable_" + nbAssociatedDeformeds + "_nbDeformed"
}
ThisObject.SetAttributeString(("PLMEntity.V_description"), description)

listModifiedObjects.Append("B" + ThisObject.GetAttributeString("physicalid"))     
ReportModifiedObjects(listModifiedObjects)