Machining |
Inserting Lathe Tool Motions in a Sequential Activity |
![]() |
This macro CAAMaiInsertLatheToolMotion shows you how to create a Sequential activity and insert tool motions inside this activity.
|
||||||||||||||
![]() |
CAAMaiInsertLatheToolMotion is launched in CATIA. Open the file 'PartLathe_ToolMotion.CATPart' located in the CAAScdMaiUseCases module, go to the Prismatic Manufacturing Programmer workbench and run the macro. CAAMaiInsertLatheToolMotion.CATScript is located in the CAAScdMaiUseCases module.
|
||||||||||||||
![]() |
CAAMaiInsertLatheToolMotion includes 7 steps:
Retrieve the open body of the CATPart
Retrieves the open body and sets it in the variable hybridShapes1. Retrieve the tool motions geometry
.Retrieves the geometry used to define the tool motions, using their names in the open body. Retrieve the active process and current setup
Retrieves the Manufacturing Setup and sets it in the variable Setup1 . Retrieve the Manufacturing Program and create a lathe machine
.Retrieves the Manufacturing Program and sets it in the variable Program1. Retrieves the product linked to the Setup and sets it in the variable "PartMachined", the variable will be useful to assign geometry on the activity. Creates a machine of type "MfgHorizontalLatheMachine". Insert a lathe sequential activity and assign its tool
Inserts a lathe sequential operation in the program "Program1" and assigns to it an External tool. Create a Go Standard tool motion and set its geometry
Inserts a Go standard tool motion ("MfgSeqMotionLatheGoStd") at the first position("1") in the tool motion list, use ("0") as second argument to create a tool motion at the end of the tool motion's list without specifying its position. Assigns the first check geometry using the SetGeometry method. We are using one point (PT1), from the geometry we retrieved at step 2,as second argument and the product which contains this geometry (PartMachined) as third argument. Use ("0") as last argument . Defines the first check element of a Go Standard motion by using the geometry type "Parts" as first argument in SetGeometry method. Create a Go Go tool motion on line D1 and line D2
Inserts a Go Go tool motion ("MfgSeqMotionLatheGoStd") , creates it at the second position ("2") of the tool motion's list. To assign the first check (D2) of Go Std or Go GO, uses SetGeometry with "Parts" as geometry type, "0" as last argument. To assign the second check (D1) of a Go Go tool motion , uses "SecondRelimitingElement" as geometry type.
Create an Indirv tool motion on line D4 and line D3
Inserts an Indirv tool motion ("MfgSeqMotionLatheIndirv") , creates it at the third position ("3") of the tool motion's list. To assign the first check (D4) of the Indirv tool motion , uses "Parts" as geometry type. To assign the drive (D3) of Indirv tool motion, uses SetGeometry with "FirstRelimitingElement" as geometry type, "0" as last argument. Create a Delta tool motion using point PT2 and PT3
Inserts a Delta tool motion ("MfgSeqMotionLatheDelta") , creates it at the fourth position ("4") of the tool motion's list. The attribute Delta Check Mode ("MfgLatheEODeltaCheckMode") is set in variable DeltaMode . This delta tool motion uses the "Distance between two points" mode, so DeltaMode contains the value "MfgLatheDeltaPtPt". In the distance between two point mode, by the SetGeometry method, we assign the first point (PT2) using "FirstRelimitingElement" as geometry type, and "1" as last argument. Which means that PT2 is stored in first position. We assign the second point (PT3) using "FirstRelimitingElement" as geometry type, and "2" as last element, to store it in second position in the same container. When using "Line and Distance" as Delta check mode, you will have to store a line using SetGeometry with "FirstRelimitingElement" as geometry type and "0" as last argument. Create a Go Go tool motion on line D6 and line D5
Inserts a Go Go tool motion ("MfgSeqMotionLatheGoStd") , creates it at the fifth position ("5") of the tool motion's list. We could have used "0" as last argument to create it at the end of current list. To assign the first check (D6) of Go Std or Go GO, uses SetGeometry with "Parts" as geometry type, "0" as last argument. To assign the second check (D5) of the Go Go tool motion , uses "SecondRelimitingElement" as geometry type. Create a Delta tool motion on line D5
Inserts a Delta tool motion ("MfgSeqMotionLatheDelta") , creates it at the sixth position ("6") of the tool motion's list. The attribute Delta Check Mode ("MfgLatheEODeltaCheckMode") is set in variable DeltaMode . This delta tool motion uses the "Line and Distance" mode, so DeltaMode is valuated by "MfgLatheDeltaLineDist". In the "Line and distance" mode, using the SetGeometry method, we assign the line (D5) using "FirstRelimitingElement" as geometry type, and "0" as last argument. The Distance attribute ("MfgLatheEOValueDistance") is set in variable DeltaValue . DeltaValue is set to "10". Create a Go Standard tool motion on line D6
Inserts an Go Standard tool motion ("MfgSeqMotionLatheGoStd" with only one check element) , creates it at the seventh position ("7") of the tool motion's list. Assigns the first check geometry using the SetGeometry method. We are using one line (D6) from the geometry we retrieved at step 2. To assign the drive (D6) of Go Standard tool motion, uses SetGeometry with "Parts" as geometry type, "0" as last argument. Create a Follow tool motion on line D7
Inserts an Follow tool motion ("MfgSeqMotionLatheFollow") , creates it at the eightth position ("8") of the tool motion's list. To assign the first check (D7) of the Follow tool motion , uses "Parts" as geometry type. Create a PP Word tool motion
Inserts an PP Word tool motion ("MfgSeqMotionPPWord") , creates it at the nineth position ("9") of the tool motion's list.
Retrieves the list of tool motions and sets it to the variable TMList, the method GetElement(number) enables to get the tool motion located at position "number" in a variable of "MfgToolMotions" type (list of tool motion). Count property enables to retrieve the number of elements of this tool motions list.
|
[Top]
This use case has shown how to create a lathe sequential activity, how to insert tool motions inside, and how to assign geometry to these tool motions.
[Top]
[1] | Replaying a macro |
[2] | Machining automation objects |
[Top] |
Copyright © 2003, Dassault Systèmes. All rights reserved.