Đang tải...

Chúc các cụ cuối tuần vui vẻ bên gia đình và người thân!

"Vinh quang không phải là không bao giờ thất bại, mà là cách chúng ta đứng dậy sau mỗi lần gục ngã."

Catia Catia Tutorial - Multiple lines normal to surface script

Thảo luận trong 'Phần mềm kỹ thuật' bắt đầu bởi hochoi, 12/4/10.

Thành viên đang xem bài viết (Users: 0, Guests: 0)

  1. hochoi

    hochoi Tài xế O-H

    Tham gia ngày:
    Số km:
    Được đổ xăng:
    -2,491 lít xăng
    I’m not sure if this script exists in the help docs. At the time we developed this, we could not find it. Forgive us if this is duplicate.
    Please read how the script works, and then follow instructions to go get it.
    Step 1
    (assuming that you’ve downloaded the script, and stored it somewhere that you can find it)
    Segregate all of your data, for the purpose of clarity. You should have your points ordered in their own body, or geometrical set, as this script works on point selection, but the points MUST BE SELECTED IN THE TREE. (selecting in the workspace does not work - but this is a later step)
    Step 2
    You MUST rename the surface. In this example, and in the script, I have called the surface “NormSurface.” You may modify the script to name the surface whatever you like. Just be sure to pay attention to this.
    Create an open body, or geometrical set, called “vectors.” Make sure that it is attached to the top level in the tree, and not under another opoen body or geometrical set.
    Step 3
    Select the points that you will using to create the normal vectors, by SELECTING THEM IN THE TREE. After you have the points that you wish to use, hit “Alt+F8″ to open the “Macros” dialog box. Select the ” LineNormalToSurface.CATScript” from wherever you saved it.
    Push the “Run” button.
    Step 4
    If you followed the instructions in Step 1 and 2, you should now see script executing, (without error) vectors appearing at their respective points in chronological order, and the “vectors” open body or geometrical set being populated with lines.
    Until you see this….
    Congratulations. You are finished.
    Get the script here.
    1) You can edit the script at will by using the “Edit” function in the “Macros” dialog.
    2) Set hybridShapeSurfaceExplicit1 = parameters1.Item(”NormSurface”) - Default surface name, as specified in Step 2
    3) Set hybridShapeLineNormal1 = hybridShapeFactory1.AddNewLineNormal(reference1, reference2, 7.000000, 0.000000, False) - Parameters for line creation. Allows 2 limits per line. (if reference 1 from point is 7, and reference 2 from point is changed to 2, you would get a line 9mm long, with 2mm on one side, and 7mm on the other. True and False change the orientation of the vector)
    4) Set hybridBody1 = hybridBodies1.Item(”vectors”) - Default open body/geometrical set name for vectors created by script. Must be created manually. Value can be changed to suit. See Step 2.

Chia sẻ trang này