{"id":1374,"date":"2022-01-13T01:34:47","date_gmt":"2022-01-13T09:34:47","guid":{"rendered":"https:\/\/gantovnik.com\/bio-tips\/?p=1374"},"modified":"2022-01-13T01:34:47","modified_gmt":"2022-01-13T09:34:47","slug":"210-parametric-curve-in-3d-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2022\/01\/210-parametric-curve-in-3d-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2\/","title":{"rendered":"#262 Example of Patran session file"},"content":{"rendered":"<p>This is an example of a session file that will create a fem model, make 4 groups and assign colors to them.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nuil_file_new.go( &quot;C:\\Program Files\\MSC.Software\\Patran_x64\\2020\/template.db&quot;,  @\r\n&quot;C:\\project\\wordpress\\ex260\\ex260.db&quot; )\r\nset_current_dir( &quot;C:\\project\\wordpress\\ex260&quot; )\r\nSTRING asm_create_grid_xyz_created_ids&#x5B;VIRTUAL]\r\nasm_const_grid_xyz( &quot;1&quot;, &quot;&#x5B;0 0 0]&quot;, &quot;Coord 0&quot;, asm_create_grid_xyz_created_ids )\r\n$# 1 Point created: Point 1\r\nasm_const_grid_xyz( &quot;2&quot;, &quot;&#x5B;10 0 0]&quot;, &quot;Coord 0&quot;,  @\r\nasm_create_grid_xyz_created_ids )\r\n$# 1 Point created: Point 2\r\nasm_const_grid_xyz( &quot;3&quot;, &quot;&#x5B;10 10 0]&quot;, &quot;Coord 0&quot;,  @\r\nasm_create_grid_xyz_created_ids )\r\n$# 1 Point created: Point 3\r\nasm_const_grid_xyz( &quot;4&quot;, &quot;&#x5B;0 10 0]&quot;, &quot;Coord 0&quot;,  @\r\nasm_create_grid_xyz_created_ids )\r\n$# 1 Point created: Point 4\r\nSTRING asm_line_2point_created_ids&#x5B;VIRTUAL]\r\nasm_const_line_2point( &quot;1&quot;, &quot;Point 1&quot;, &quot;Point 2&quot;, 0, &quot;&quot;, 50., 1,  @\r\nasm_line_2point_created_ids )\r\n$# 1 Line created: Line 1\r\nasm_const_line_2point( &quot;2&quot;, &quot;Point 2&quot;, &quot;Point 3&quot;, 0, &quot;&quot;, 50., 1,  @\r\nasm_line_2point_created_ids )\r\n$# 1 Line created: Line 2\r\nasm_const_line_2point( &quot;3&quot;, &quot;Point 3&quot;, &quot;Point 4&quot;, 0, &quot;&quot;, 50., 1,  @\r\nasm_line_2point_created_ids )\r\n$# 1 Line created: Line 3\r\nasm_const_line_2point( &quot;4&quot;, &quot;Point 4&quot;, &quot;Point 1&quot;, 0, &quot;&quot;, 50., 1,  @\r\nasm_line_2point_created_ids )\r\n$# 1 Line created: Line 4\r\nSTRING sgm_surface_2curve_created_ids&#x5B;VIRTUAL]\r\nsgm_const_surface_2curve( &quot;1&quot;, &quot;Curve 1&quot;, &quot;Curve 3&quot;,  @\r\nsgm_surface_2curve_created_ids )\r\n$# 1 Surface Created: Surface 1\r\nuil_toolbar.shaded_smooth(  )\r\nui_exec_function( &quot;mesh_seed_display_mgr&quot;, &quot;init&quot; )\r\nINTEGER fem_create_mesh_surfa_num_nodes\r\nINTEGER fem_create_mesh_surfa_num_elems\r\nSTRING fem_create_mesh_s_nodes_created&#x5B;VIRTUAL]\r\nSTRING fem_create_mesh_s_elems_created&#x5B;VIRTUAL]\r\nfem_create_mesh_surf_4( &quot;IsoMesh&quot;, 49152, &quot;Surface 1&quot;, 1, &#x5B;&quot;1&quot;], &quot;Quad4&quot;, &quot;#&quot;, @\r\n &quot;#&quot;, &quot;Coord 0&quot;, &quot;Coord 0&quot;, fem_create_mesh_surfa_num_nodes,  @\r\nfem_create_mesh_surfa_num_elems, fem_create_mesh_s_nodes_created,  @\r\nfem_create_mesh_s_elems_created )\r\nSTRING g1&#x5B;25],g2&#x5B;25],g3&#x5B;25],g4&#x5B;25]\r\nSTRING e1&#x5B;36],e2&#x5B;36],e3&#x5B;36],e4&#x5B;36]\r\nSTRING created_ids_list&#x5B;VIRTUAL]\r\nsys_poll_option( 2 )\r\ng1 = &quot;Group 1&quot;\r\ne1 = &quot;Elm 1:5 11:15 21:25 31:35 41:45&quot;\r\nga_group_create(g1)\r\nga_group_current_set(g1)\r\nuil_list_a.clear( )\r\nlist_create_target_list( &quot;lista&quot;, e1 )\r\nlist_create_node_ass_elem( e1, &quot;lista&quot;, created_ids_list )\r\nlist_save_group( &quot;lista&quot;, g1, FALSE )\r\nga_group_color_set(g1,1)\r\ng2 = &quot;Group 2&quot;\r\ne2 = &quot;Elm 6:10 16:20 26:30 36:40 46:50&quot;\r\nga_group_create(g2)\r\nga_group_current_set(g2)\r\nuil_list_a.clear( )\r\nlist_create_target_list(&quot;lista&quot;, e2)\r\nlist_create_node_ass_elem( e2, &quot;lista&quot;, created_ids_list )\r\nlist_save_group(&quot;lista&quot;, g2, FALSE)\r\nga_group_color_set(g2,2)\r\ng3 = &quot;Group 3&quot;\r\ne3 = &quot;Elm 51:55 61:65 71:75 81:85 91:95&quot;\r\nga_group_create(g3)\r\nga_group_current_set(g3)\r\nuil_list_a.clear( )\r\nlist_create_target_list(&quot;lista&quot;, e3)\r\nlist_create_node_ass_elem( e3, &quot;lista&quot;, created_ids_list )\r\nlist_save_group( &quot;lista&quot;, g3, FALSE )\r\nga_group_color_set(g3,5)\r\ng4 = &quot;Group 4&quot;\r\ne4 = &quot;Elm 56:60 66:70 76:80 86:90 96:100&quot;\r\nga_group_create(g4)\r\nga_group_current_set(g4)\r\nuil_list_a.clear( )\r\nlist_create_target_list(&quot;lista&quot;, e4)\r\nlist_create_node_ass_elem(e4, &quot;lista&quot;, created_ids_list)\r\nlist_save_group(&quot;lista&quot;, g4, FALSE)\r\nga_group_color_set(g4,7)\r\nuil_list_a.clear( )\r\ncoloring_method( 2 )\r\nsys_poll_option( 0 )\r\nuil_toolbar.shaded_smooth()\r\nuil_toolbar.wireframe(  )\r\nnode_size( 15 )\r\nuil_imaging_bw_reverse(  )\r\nui_repaint_tree( TRUE )\r\nuil_imaging_bw_reverse(  )\r\nga_view_aa_set( 0., 0., 0. )\r\nuil_viewport_post_groups.posted_groups( &quot;default_viewport&quot;, 4, &#x5B;&quot;Group 1&quot;, &quot;Group 2&quot;, &quot;Group 3&quot;, &quot;Group 4&quot;] )\r\nuil_primary_file.db_save( )\r\n<\/pre>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2022\/01\/ex260.png?resize=452%2C450&#038;ssl=1\" alt=\"\" width=\"452\" height=\"450\" class=\"alignnone size-full wp-image-1375\" srcset=\"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2022\/01\/ex260.png?w=452&amp;ssl=1 452w, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2022\/01\/ex260.png?resize=300%2C300&amp;ssl=1 300w, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2022\/01\/ex260.png?resize=150%2C150&amp;ssl=1 150w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is an example of a session file that will create a fem model, make 4 groups and assign colors to them. uil_file_new.go( &quot;C:\\Program Files\\MSC.Software\\Patran_x64\\2020\/template.db&quot;, @ &quot;C:\\project\\wordpress\\ex260\\ex260.db&quot; ) set_current_dir( &quot;C:\\project\\wordpress\\ex260&quot; ) STRING asm_create_grid_xyz_created_ids&#x5B;VIRTUAL] asm_const_grid_xyz( &quot;1&quot;, &quot;&#x5B;0 0 0]&quot;, &quot;Coord 0&quot;, asm_create_grid_xyz_created_ids ) $# 1 Point created: Point 1 asm_const_grid_xyz( &quot;2&quot;, &quot;&#x5B;10 0 0]&quot;, &quot;Coord 0&quot;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"yes","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[39],"tags":[],"class_list":["post-1374","post","type-post","status-publish","format-standard","hentry","category-patran"],"modified_by":"gantovnik","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-ma","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":700,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/09\/125-xdb-vs-op2-in-nastran\/","url_meta":{"origin":1374,"position":0},"title":"#125: xdb vs op2 in Nastran","author":"gantovnik","date":"2020-09-28","format":false,"excerpt":"#125: xdb vs op2 in Nastran xdb: Entry: PARAM,POST,0 Results are accessed through Direct Results Access (DRA) working directly with MSC Nastran results database 1) xdb files are compatible primarily with Patran and other MSC Software. 2) Time to read the xdb results into the Patran database is eliminated (accessed\u2026","rel":"","context":"In &quot;nastran&quot;","block_context":{"text":"nastran","link":"https:\/\/gantovnik.com\/bio-tips\/category\/nastran\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9440,"url":"https:\/\/gantovnik.com\/bio-tips\/2025\/04\/459-python-script-to-group-consecutive-numbers-into-ranges-like-in-msc-patran\/","url_meta":{"origin":1374,"position":1},"title":"#459 Python Script to Group Consecutive Numbers into Ranges Like in MSC Patran","author":"gantovnik","date":"2025-04-20","format":false,"excerpt":"This Python script reads a text file containing a list of numbers (such as node or element IDs), sorts them, removes duplicates, and groups consecutive numbers into compact ranges - just like MSC Patran's range format. It's a handy tool for preprocessing or organizing large ID lists efficiently. def read_numbers(filename):\u2026","rel":"","context":"In &quot;patran&quot;","block_context":{"text":"patran","link":"https:\/\/gantovnik.com\/bio-tips\/category\/patran\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":692,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/09\/123-difference-between-op2-and-enhanced-op2\/","url_meta":{"origin":1374,"position":2},"title":"#123: Difference between OP2 and enhanced OP2","author":"gantovnik","date":"2020-09-28","format":false,"excerpt":"#122: Difference between OP2 and enhanced OP2 There are two formats of OP2 that Nastran can generate. There is the old-style OP2 that is generated when you have PARAM, POST, -1 in the input deck and can only be read into Patran using the 'Read OP2' option. The results from\u2026","rel":"","context":"In &quot;nastran&quot;","block_context":{"text":"nastran","link":"https:\/\/gantovnik.com\/bio-tips\/category\/nastran\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":669,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/09\/113-how-to-create-surface-from-mesh-in-patran\/","url_meta":{"origin":1374,"position":3},"title":"#113: How to create surface from mesh in Patran?","author":"gantovnik","date":"2020-09-28","format":false,"excerpt":"#113: How to create surface from mesh in Patran? Menu: Geometry, Action: Create, Object: Surface, Method: Mesh","rel":"","context":"In &quot;nastran&quot;","block_context":{"text":"nastran","link":"https:\/\/gantovnik.com\/bio-tips\/category\/nastran\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":686,"url":"https:\/\/gantovnik.com\/bio-tips\/2020\/09\/120-sol200-extract-the-updated-element-thickness-during-topology-optimization\/","url_meta":{"origin":1374,"position":4},"title":"#120: SOL200 &#8211; Extract the updated element thickness during topology optimization.","author":"gantovnik","date":"2020-09-28","format":false,"excerpt":"#119: SOL200 - Extract the updated element thickness during topology optimization. 1) To extract the updated (modified) element thicknesses, use ECHO=PUNCH (NEWBULK) in the case control section. [code language=\"python\"] SOL 200 TIME 600 CEND PARAM,DESPCH,1 ECHO = PUNCH(NEWBULK) MAXLINES = 999999999 DESOBJ = 1 DESGLB = 1 ANALYSIS = STATICS\u2026","rel":"","context":"In &quot;nastran&quot;","block_context":{"text":"nastran","link":"https:\/\/gantovnik.com\/bio-tips\/category\/nastran\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1521,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/06\/210-parametric-curve-in-3d-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2-2-2-2-2-2-2-2\/","url_meta":{"origin":1374,"position":5},"title":"#288 MSC Patran and Nastran info","author":"gantovnik","date":"2022-06-28","format":false,"excerpt":"Nastran 2017 was the first version to support flexible glue. Nastran 2018 was the first version to support recovering GPForce data for contact. Patran 20221.3 was the first version to support glue contact for SOL400. Patran 2021.4 was the first version to support the linear solution sequences. \u00a0 \u00a0 \u00a0","rel":"","context":"In &quot;nastran&quot;","block_context":{"text":"nastran","link":"https:\/\/gantovnik.com\/bio-tips\/category\/nastran\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/1374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/comments?post=1374"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/1374\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=1374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=1374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=1374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}