Overview

The DigitalTwin class is used to create digital twins during manufacturing. The twins may be made by simulation or by reading manufacturing results.

DrillAndFillStackup()

System::Int64 DrillAndFillTwin(
    System::Int64 ws_or_fea_id
);
System::Int64 DrillAndFillTwinStackUpAdd(
    System::Int64 twin_id,
    System::String^ measurement_state
);
System::Int64 DrillAndFillLayerAdd(
    System::Int64 stackup_id,
    System::Int64 product_id,
    double start_dist,
    double end_dist
)

The DrillandFillXxx() functions make a digital twin for a round hole feature. In this first release the twin contains data about the stackup layers in the drill and fill.

The DrillandFillTwin() function starts a digital twin for a round hole feature. The feature can be given as the identity of the feature or the identity of a workingstep that uses that feature.

The DrillandFillTwinStackUpAdd() functions starts a Stackup for a Drill and Fill digital twin. The measurement state must have one of the following values.

  • "designed" if the stackup will be computed using design data.
  • "prediction" if the stackup will be computed using planning data.
  • "measured" if the stackup will be computed using as-measured manufacturing data.

    The DrillandFillLayerAdd() functions adds a layer to a Stackup. The layer includes a reference to the material, the distance of the hole top from the start of the layer, and the distance of hole top from the bottom of the layer.

    Arguments

    ws_or_fea_id
    The identity of a workingstep or feature. If the identity of a workingstep is given then the process feature of that workingstep will be twinned.
    twin_id
    The identity of a Drill and Fill twin.
    measurement_state
    A string describing how the stackup is being measured..
    stackup_id
    The identity of the Drill and Fill stackup.
    product_id
    The identity of the product that defines the material of the layer.
    start_dist
    The distance from the top of the hole to the top of the layer.
    end_dist
    The distance from the top of the hole to the bottom of the layer.

    Related Functions

    Common Errors

    StackupComputing()/StackupDrilling()/StackupFilling()

    double StackupComputing()(
        System::Int64 stackup_id
    );
    double StackupDrilling()(
        System::Int64 stackup_id
        double breakthru_increment,
        double tool_length_increment,
        double feed,
        double speed
    );
    double StackupFilling(
        System::Int64 stackup_id,
    

    The StackupComputing() function computes the drill depths for the different layers in the stackup. The total depth of all the layers is returned. This total may not be the same as the sum of the layers because of gaps and overlaps.

    The StackupDrilling() function makes a drilling operation for a stackup. The depth of the hole will be the same as the computed depth of the stackup. The drilling operation will continue for the breakthru_increment to ensure a clean finish. The operation will make a "virtual" drill for the operation which will have the diameter of the hole. The length of the tool will be the same as the computed depth of the stackup but with an increment added as defined by the tool_length_increment. The feed and speed of the drilling will be set to the given values.

    The StackupFilling() function makes round hole features for the different layers in the stackup. The number of layers is returned. The depth of each feature is the computed depth. The diameter is the same as the twin prototype. The feature starts at the top of the layer, and ends at the bottom.

    Arguments

    stackup_id
    The identity of the Drill and Fill stackup.

    Related Functions

    Common Errors

    FastenerAxisHole()/All()/FastenerAxisTwin()/All()

    	System::Int64 FastenerAxisHole(
    	    System::Int64 axis_id,
    	    double depth,
    	    double diameter
    	    );
    	System::Collections::Generic::List^ FastenerAxisHoleAll(
    	    System::Int64 set_id,
    	    double depth,
    	    double diameter
    	);
    	System::Int64 FastenerAxisTwin(
    	    System::Int64 axis_id,
    	    System::Int64 outer_id,
    	    double depth,
    	    double diameter
    	);
    	System::Collections::Generic::List^ FastenerAxisTwinAll(
    	    System::Int64 set_id,
    	    System::Int64 outer_id,
    	    double depth,
    	    double diameter
    	);
    

    The FastenerAxisHole() function makes a round hole feature for a fastener axis. The function makes the feature for an assembly. The start of the hole is on the outer part and continues through nested layers. All of the layers must belong to the current workpiece. The location of the hole is the location of the axis. The direction of the hole is the direction of the axis. The result is the identity of the new hole.

    The FastenerAxisHoleAll() function makes round holes for the axes given in a set.

    The FastenerAxisTwin() function makes a digital twin twin for a round hole at an axis point. The twin can be used to track the status of the hole as it is drilled and filled during manufacturing. The function returns the identity of the new twin which will be empty until the drilling starts.

    The FastenerAxisTwinAll() function makes drill and fill twins for all the axes in a geometric set.

    Arguments

    axis_id
    The identity of point and axis location defined for the fastener.
    outer_id
    The identity of the first material to be drilled by the operaton.
    depth
    The depth of the hole.
    diameter
    The diameter of the hole.
    set_id
    The identity of a geometric set containing locations and directions.

    Related Functions

    Common Errors

    FastenerPointHole()/FastenerPointTwin()

    	System::Int64 FastenerPointHole(
    	    System::Int64 point_id,
    	    double depth,
    	    double diameter,
    	    double i,
    	    double j,
    	    double k
    	);
    	System::Int64 FastenerPointTwin(
    	    System::Int64 point_id,
    	    System::Int64 outer_id,
    	    double depth,
    	    double diameter,
    	    double i,
    	    double j,
    	    double k
    	);
    

    The FastenerPointHole() function makes a round hole feature for a fastener axis. The function makes the feature for an assembly. The start of the hole is on the outer part and continues through nested layers. All of the layers must belong to the current workpiece. The location of the hole is the location of the axis. The direction of the hole is given as i, j and k vectors. The result is the identity of the new hole.

    Arguments

    point_id
    The identity of point location defined for the fastener.
    set_id
    The identity of a geometric set containing point locations for fasteners.
    outer_id
    The identity of the first material to be drilled by the operaton.
    depth
    The depth of the new feature.
    diameter
    The diameter of the new feature.
    i, j, k
    Direction of the drilling when the axis is not given by the fastener point.

    Related Functions

    Common Errors

    FastenerPointDrillingDirection()/FastenerPointDrillingDepth()

    	System::Int64 FastenerPointDrillingDirection(
    	    System::Int64 point_id,
    	    System::Int64 outer_id,
    	    double hole_diameter,
    	    System::Collections::Generic::List^ surface_normal
    	);
    	System::Int64 FastenerPointDrillingDepth(
    	    System::Int64 point_id,
    	    System::Int64 outer_id,
    	    double hole_diameter
    	    System::Collections::Generic::List^ drilling_direction
    	);
    

    The FastenerPointDrillingDirection() function computes a direction for a drilling point by computing the surface normal at that point. The function can be used to set the hole direction when that direction is not given in an axis. The surface_normal only needs to be approximate. Any normal that moves away from the surface is sufficient. The computed direction will move into the surface.

    The FastenerPointHoleDepth() function computes the fastener depth for a drilling point. The computed depth will be sufficient to fasten all the materials. The computation will cease when the gap between two materials is greater than 0.02 inches.

    Arguments

    point_id
    The identity of point location defined for the fastener.
    outer_id
    The identity of the first material to be drilled by the operaton.
    depth
    The depth of the hole.
    diameter
    The diameter of the hole.
    i, j, k
    Direction of the drilling.

    Related Functions

    Common Errors

    GetStackupComputedDepths()

    double GetStackupComputedDepth(
        System::Int64 stackup_id
    );
    System::String^ GetStackUpComputedDepthUnit(
        System::Int64 stackup_id
    );
    double SetStackupComputedDepth(
        System::Int64 stackup_id
    );
    

    The StackupDepths() functions return the depths computed for a stackup. There may be multiple depths for multiple measurement states.

    The ComputeStackupDepth() computes the depths of a stackup.

    The GetStackupComputedDepth() returns a previously computed depth for a stackup.

    The GetStackupComputedDepthUnit() returns the unit of the computed depth.

    The SetStackupComputedDepth() sets the computed depth for a stackup. This will override any previously compute depth and may create an inconsistency with the depths of the layers..

    Arguments

    stackup_id
    The identity of the Drill and Fill stackup.

    Related Functions

    Common Errors

    GeometrySetsOfProduct()/Name()/Size()/Points()/Axes()

    System::Collections::Generic::List^ GeometrySetsOfProduct(
       System::Int64 product_id
    );
    System::String^ GeometrySetName (
       System::Int64 set_id
    );
    System::Int64 GeometrySetSize (
       System::Int64 set_id
    );
    System::Boolean GeometrySetIsAxes (
       System::Int64 set_id
    );
    SSystem::Collections::Generic::List^ GeometrySetAxes (
       System::Int64 set_id
    );
    System::Boolean GeometrySetIsPoints (
       System::Int64 set_id
    );
    System::Collections::Generic::List^ GeometrySetPoints (
       System::Int64 set_id
    );
    

    The GeometrySet functions returns information that has been set in a design to describe the drill and fill points on a product.

    The GeometrySetsOfProduct() function returns all the geometry sets that have been defined for a product.

    The GeometrySetName() function returns the name of a geometry set which may be a simple way to select the set with the required functionality when a product contains multiple sets.

    The GeometrySetSize() function returns the size of a set. In the typical case there will be one axis or one point for each hole that will be drilled on the product.

    The GeometrySetIsAxes() function returns true if the set contains axes. An axis consists of a location and direction.

    The GeometrySetAxes() function returns all the axes in a set. There will be one for each hole that is to be drilled. The location gives the start point for the hole. The direction gives the drilling direction.

    The GeometrySetIsPoints() function returns true if the set contains points. A point only contains a location so the direction must be computed.

    The GeometrySetPoints() function returns all the points in a set. There will be one for each hole that is to be drilled. The point gives the start point for the hole.

    Arguments

    product_id
    The identity of a product.
    set_id
    The identity of a set.

    Related Functions

    Common Errors

    GroupFastener()/GroupOneUpAsssembly/GroupThreeFrame()/GroupBestFit()/GroupAllowable()

    System::Int64 GroupFastener (
       System::String^ phase,
       System::Int64 fastener,
       System::Int64 collar,
       System::Int64 washer
    );
    System::Int64 GroupOneUpAssembly (
       System::String^ phase,
       System::Int64 plan,
    );
    System::Int64 GroupOneUpAssemblyAddRobot (
       System::Int64 group,
       System::String^ robot_identifier
    );
    System::Int64 GroupOneUpAssemblyMustFollow (
       System::Int64 group,
       System::String^ robot_identifier
    );
    System::Int64 GroupThreeFrameReference (
       System::String^ phase,
       System::Int64 primary,
       System::Int64 secondary,
       System::Int64 tertiary
    );
    System::Int64 GroupBestFitReference (
       System::String^ phase,
    );
    System::Int64 GroupBestFitReferenceAddTwin (
       System::Int64 group,
       System::Int64 twin
    );
    System::Int64 GroupAllowableRobot (
       System::String^ phase,
       System::String^ robot_identifier,
       System::Int64 precedence
    );
    System::Int64 GroupSameAssembly (
       System::String^ phase,
    );
    System::Int64 GroupSameAssemblyAddPart (
       System::Int64 group,
       System::Int64 part
    );
    System::Int64 GroupFeatureAdd (
       System::Int64 group,
       System::Int64 feature
    );
    
    

    The Group functions describe information that enables a plan to be changed when robots and components become unavailable. Each group contains a set of manufacturing features.

    The GroupFastener function describes the products that can be used to fasten the features in this group.

    The GroupOneUpAssembly() function describes a set of holes that must be fastened together to meet the requirements of one-up assembly.

    The GroupOneUpAssemblyAddRobot() describes a robot that may be used for a one up assembly operation.

    The GroupOneUpAssemblyAddMustFollow function describes the one up assembly operations that must be completed before this operation.

    The GroupThreeFrameReference() function describes a geometry reference frame for the holes in a group using three reference points.

    The GroupBestFitFrameReference() function describes a geometry reference frame for the holes in a group by best fitting a set of points.

    The GroupAllowableRobot() function describes a robot that may be used to fasten a group of features.

    The GroupAllowableRobot() function describes a robot that may be used to fasten a group of features.

    The GroupSameAssembly() function describes features that fasten the same set of parts.

    The GroupFeatureAdd() function adds a feature to a manufacturing group.

    Arguments

    phase
    The applicable phase for this manufacturing group.
    precedence
    When a manufacturing feature is in two groups, the rules of the group with the higher precedence are prefered.

    Related Functions

    Common Errors

    GetDrillAndFillTwin()

    System::Int64 GetDrillAndFillTwinCount(
    );
    System::Int64 GetDrillAndFillTwinNext (
       System::Int64 index
    );
    System::Collections::Generic::List^ GetDrillAndFillTwinAll(
    );
    

    The GetDrillandFillTwinXXX() functions return information about the Drill and Fill Twins in a project. In this first release this information consists of data about the stackups in the twin as discussed in the next section. There will be more.

    Arguments

    index
    An index to select each twin.

    Related Functions

    Common Errors

    GetDrillAndFillTwinStackup()

    System::Int64 GetDrillAndFillTwinStackUpCount(
        System::Int64 stackup_id
    );
    System::Int64 GetDrillAndFillTwinStackupNext (
        System::Int64 stackup_id,
        System::Int64 index
    );
    System::Collections::Generic::List^ GetDrillAndFillTwinStackUpAll(
        System::Int64 stackup_id
    );
    System::String^ GetStackUpMeasurementState(
        System::Int64 stackup_id
    );
    System::Int64 GetStackUpOuterProduct(
        System::Int64 stackup_id
    );
    void StackUpOuterProductSet(
        System::Int64 stackup_id,
        System::Int64 product_id
    );
    System::Collections::Generic::List^ GetStackupProducts(
        System::Int64 stackup_id
    );
    System::Collections::Generic::List^ GetStackupStarts(
        System::Int64 stackup_id
    )'
    System::Collections::Generic::List^ GetStackupEnds(
        System::Int64 stackup_id
    );
    

    The GetDrillandFillTwinStackupXXX() functions return information about the Stackups in a Drill and Fill Twin. The stackups describe the depths of the holes drilled in an assembly. There is one layer in the stackup for each material being fastened.

    Many stackups can be measured for an assembly. The GetDrillAndTwinStackupCount/Next/All functions return the stackups. Each stackup has multiple layers which are returned by the GetDrillAndTwinLayerCount/Next/All functions.

    The GetDrillAndFillTwinStackupMeasurementState function returns the state of the stackup. The stackup state can be:

  • "designed" if the stackup was computed using design data.
  • "prediction" if the stackup was computed using planning data.
  • "measured" if the stackup was computed using as-measured manufacturing data.

    The GetStackUpOuterProduct function returns the identify of the outermost product. The outermost product is the one that is drilled first to make the drill and fill hole.

    The StackUpOuterProductSet function sets the identify of the outermost product. The outermost product is the one that is drilled first to make the drill and fill hole.

    The GetStackupStarts function returns the distance to the start of each layer from the top of the hole.

    The GetStackupEnds function returns the distance to the end of each layer from the top of the hole.

    The GetStackupProducts function returns the product being fastened at each layer.

    Arguments

    twin_id
    The identity of a drill and fill twin.
    stackup_id
    The identity of a stackup in a drill and fill twin.
    index
    An index to select each stackup.

    Related Functions

    Common Errors

    GetDrillAndFillLayer()

    double GetDrillAndFillTwinLayerStart(
        System::Int64 stackup_id,
        System::Int64 index
    );
    System::String^ GetDrillAndFillTwinLayerStartUnit(
        System::Int64 stackup_id,
        System::Int64 index
    );
    double GetDrillAndFillTwinLayerEnd(
        System::Int64 stackup_id,
        System::Int64 index
    );
    System::String^ GetDrillAndFillTwinLayerEndUnit(
        System::Int64 stackup_id,
        System::Int64 index
    );
    System::Int64  GetDrillAndFillLayerUsage(
    	System::Int64 stackup_id,
    	System::Int64 index
    );
    System::Int64  GetDrillAndFillLayerFeature(
    	System::Int64 stackup_id,
    	System::Int64 index
    );
    void  GetDrillAndFillLayerFeatureSet(
    	System::Int64 stackup_id,
    	System::Int64 index
    );
    

    The GetDrillandFillTwinLayerXXX() functions return information about each layer in a stackup. Other functions return the same informaton, but these ones may be easier to use in loops.

    The GetDrillAndFillTwinLayerStart function returns the distance to the start of each layer from the top of the hole.

    The GetDrillAndFillTwinLayerStartUnit function returns the unit of the start distance of each layer from the top of the hole.

    The GetDrillAndFillTwinLayerEnd function returns the distance to the end of each layer from the top of the hole.

    The GetDrillAndFillTwinLayerEndUnit function returns the unit of the end distance of each layer from the top of the hole.

    The GetDrillAnDFillTwinLayerUsage function returns the product being fastened at each layer.

    The GetDrillAnDFillTwinLayerFeature function returns the feature defined for the hole at this layer, if one has been set or computed.

    The DrillAnDFillTwinLayerFeatureSet function sets the feature for the hole at this layer.

    Arguments

    stackup_id
    The identity of a stackup in a drill and fill twin.
    index
    An index to select each layer.

    Related Functions

    Common Errors

    GetTwinOf()

    System::Int64 GetTwinOfWorkingstepFeature(
        System::Int64 ws_id
    );
    System::Int64 GetTwinOfFeature(
        System::Int64 fea_id
    );
    System::Int64 GetTwinOfStackup(
        System::Int64 stackup_id
    );
    System::Int64 GetTwinPrototype (
       System::Int64 twin_id
    );
    void SetTwinPrototype (
       System::Int64 twin_id
       System::Int64 fea_id
    );
    System::Boolean HasTwin (
       System::Int64 ws_or_fea_id
    );
    System::Boolean HasDrillAndFillTwin (
       System::Int64 ws_or_fea_id
    );
    

    The GetTwinOfWorkingstepFeature() function returns the twin of the process feature of a workingstep or 0.

    The GetTwinOfFeature() function returns the twin of a feature or 0.

    The GetTwinOfStackup() function returns the twin that owns a stackup.

    The GetTwinPrototype() function returns the feature that is the basis of a twin.

    The SetTwinPrototype() function sets the feature that is the basis of a twin.

    The HasTwin() function returns true if the feature has a digital twin. The feature may be given as the process feature of a workingstep.

    The HasDrillAndFillTwin() function returns true if the feature has a drill and fill digital twin. The feature may be given as the process feature of a workingstep.

    Arguments

    ws_id
    identity of a workingstep.
    fea_id
    identity of a feature.
    stackup_id
    identity of a stackup.
    twin_id
    identity of a digital twin.
    ws_or_fea_id
    identity of a workingstep or feature.

    Related Functions

    Common Errors

    GetProcessTwinElapsedTime()/Seconds()

    System::String^ GetProcessTwinElapsedTime (
    	System::Int64 ex_id
    	);
    
    double GetProcessTwinElapsedTimeSeconds (
    	System::Int64 ex_id
    	);
    

    The GetProcessTwinElapsedTime() functions return the time required to complete the executable which can be a workingstep, workplan or other program structure.

    The GetProcessTwinElapsedTime() function return the time as a string in days, hours, minutes and seconds.

    The GetPrpcessTwinElapsedTimeSeconds() function return the time as seconds in a double value..

    GetTwinEnd()/Start()

    System::String^ GetProcessTwinStart (
    	System::Int64 ex_id
    	);
    
    System::String^ GetProcessTwinEnd (
    	System::Int64 ex_id
    	);
    

    The GetProcessTwinStart() function gets the start time of the given executable in ISO 8601 format.

    The GetProcessTwinEnd() function gets the end time of the given executable in ISO 8601 format.

    Arguments

    ex_id
    The identity of an execuable which may be a workingstep, workplan or other program structure.

    Related Functions

    Common Errors

    GetProcessTwinException()

    System::String^ GetProcessTwinException (
    	System::Int64 ex_id
    	);
    

    If set then the execution of the executable was judged to have terminated before completion for the given reason.

    GetProcessTwinSource()

    System::String^ GetProcessTwinSource (
    	System::Int64 ex_id
    	);
    

    The name of the machine that executed the executable. This is useful information if the program was run by mulitple machines (robots).

    TwinProcessEnd()Start()Clear()

    void TwinProcessStart (
    	System::Int64 ex_id,
    	System::String^ source
    	);
    
    void TwinProcessStart (
    	System::Int64 ex_id,
    	System::String^ source,
    	System::String^ time_stamp
    	);
    
    void TwinProcessEnd (
    	System::Int64 ex_id
    	);
    
    void TwinProcessEnd (
    	System::Int64 ex_id,
    	System::String^ time_stamp
    	);
    
    void TwinProcessClear (
    	System::Int64 ex_id
    	);
    
    

    The TwinProcessStart() function is used to record the start time of an executable. If a time is given then it must be in a format compatible with ISO 8601, If no time is given then the system clock will be used to compute the start time. The time may be set using a value taken from an MTConnect stream. If there are many machines, then the source sets the machine used to perform the execution.

    The TwinProcessEnd() function is used to record the end time of an executable. If a time is given then it must be in a format compatible with ISO 8601, If no time is given then the system clock will be used to compute the start time. The time may be set using a value taken from an MTConnect stream.

    The TwinProcessClear() function is used to clear the twinning data in an executable so that a machining process, or machining simulaton process, can be restarted.

    Arguments

    ex_id
    The identity of an execuable which may be a workingstep, workplan or other program structure.
    source
    Optional string describing the machine executing the executable.
    time_stamp
    Time of the start or end in ISO 8610 compatible format.

    Related Functions

    Common Errors

    TwinProcessException()

    System::String^ TwinProcessException (
    	System::Int64 ex_id,
    	System::String^ explanation
    	);
    

    If an error has been detected then give an explanation. The twin is not ended. If the function is called multiple times then only the last exception will be saved. Multi-line explanation strings may be used for more comples cases.

    TwinReset()

    System::String^ TwinReset (
    	System::Int64 ex_id,
    	);
    

    Set all the twin data in the process back to its initial state.

    ReduceDrillingProcess()

    System::String^ ReduceDrillingProcess (
    	);
    

    Analyze the program to determine what drilling operations are not necessery because they already exist on the workpiece.

    A reduced size tool is generated for each operation. If the tool does not remove any material then the operation is determined to be redundant and its workingstep is disabled.

    The reduced sized tools are garbage collected when the file is saved, but not before.

    The function can be applied to other types of processes but is likely to produce incorrect results.