Assembling Components
Methods Introduced:
The method
pfcAssembly.AssembleComponent() adds a specified component model to the assembly at the specified initial position. The position is specified in the format defined by the class
pfcTransform3D. Specify the orientation of the three axes and the position of the origin of the component coordinate system, with respect to the target assembly coordinate system.
|
|
If the transform matrix passed as the initial position of the component is incorrect and non-orthonormal, the method pfcAssembly.AssembleComponent() returns the error pfcExceptions.pfcXToolkitBadInputs. In such scenario, you can use the method MpfcBase.MakeMatrixOrthonormal() to convert this non-orthonormal matrix to an orthonormal matrix.
|
The method
pfcAssembly.AssembleByCopy() creates a new component in the specified assembly by copying from the specified component. If no model is specified, then the new component is created empty. The input parameters for this method are:
• LeaveUnplaced—If true the component is unplaced. If false the component is placed at a default location in the assembly. Unplaced components belong to an assembly without being assembled or packaged. These components appear in the model tree, but not in the graphic window. Unplaced components can be constrained or packaged by selecting them from the model tree for redefinition. When its parent assembly is retrieved into memory, an unplaced component is also retrieved.
• ModelToCopy—Specify the model to be copied into the assembly
• NewModelName—Specify a name for the copied model
The method
pfcComponentFeat.GetConstraints() retrieves the constraints for a given assembly component.
The method
pfcComponentFeat.SetConstraints() allows you to set the constraints for a specified assembly component. The input parameters for this method are:
• Constraints—Constraints for the assembly component. These constraints are explained in detail in the later sections.
• ReferenceAssembly—The path to the owner assembly, if the constraints have external references to other members of the top level assembly. If the constraints are applied only to the assembly component then the value of this parameter should be null.
This method modifies the component feature data and regenerates the assembly component.
The method
pfcComponentFeat.GetConstraintsWithCompPath() retrieves the constraints for a given assembly component using the input argument
CompPath which is the path to the owner assembly. Pass this input argument
CompPath, if the constraints have references to other members of the top level assembly. Pass it as
Null, if the constraints have references only to the owner assembly.