HyperWorks14.0 API 更新说明

Blocks to Sets and Boxes


The RADIOSS keywords /GRBEAM/BOX/, /GRBEAM/BOX/, /GRBRIC/BOX/, /GRNOD/BOX/, /GRQUAD/BOX/, /GRSH3N/BOX/, /GRSHEL/BOX/, /GRSPRI/BOX/, /GRTRUS/BOX/, /LINE/BOX/ and /SURF/BOX/ (including /BOX2 keywords) have been mapped from the block entity to the set and new boxes entities.  Other keywords of this family are mapped to sets.  See the sets data names and boxes data names documentation for more details.

Scripts that created or queried the block entity for these keywords must be updated to use the sets and boxes entities.  To create one of these keywords, both a set and a box entity are required.  The set then refers to the box entity.  Below are a few examples.

 

To create a /GRSHELL/BOX keyword, first create a box entity with config 2 (rectangular box), and then a set with the GRSHELL card image referencing the box entity:

*createentity boxes config=2

*createentity sets cardimage=GRSHELL

*setvalue sets id=$set_id ids={boxes $box_id}

 

If this is to be a /GRSHELL/BOX2 then additionally set attribute 900 to 1 like below:

*setvalue sets id=$set_id STATUS=2 900=1

 

Similarly, for creating a rigid link, rigid body, admas, etc...boxes can also now directly be used:

*createmark boxes 1 "by id only" $box_id

*rigidlinkbycollector $masterNode boxes 1 123456

 

command.tcl


command.tcl文件更新格式,按照tcl格式文件输出,不在按照command格式输出。

增加输出显示控制命令:hm_writeviewcommands mode 输出模式。hm新文件选项 -nowriteviewcommands

命令包含如下::

*rotateabout

*view

*view_restoreprevious

*viewset

*window

增加命令 HM_COMMANDFILE_DIR控制命令文件输出.

增加命名 HM_COMMANDFILE_MODE 控制command文件输出模式.  参数 APPEND 输出命名到已存在的文件. 参数 OVERWRITE 删除存在的文件并新建一个.  参数UNIQUE 创建一个唯一的文件存放command内容.

增加命令hm_getcommandfile 获取command文件路径以及名称.

 

Current Collectors


当前组件不会因为新导入文件而改变

 

Groups to Constrained Extra Nodes


The LS-DYNA keywords *CONSTRAINED_EXTRA_NODES_NODE and *CONSTRAINED_EXTRA_NODES_SET have been mapped from the group entity to the newly added constrainedextranodes entity.  See the constrainedextranodes data names documentation for more details.

Scripts that created or queried the group entity for these keywords must be updated to use the constrainedextranodes entity.  Below are a few examples.

 

To create a *CONSTRAINED_EXTRA_NODES_NODE keyword, assign a rigid part ID, and a node ID:

*createentity constrainedextranodes config=101 compid=$comp_id entityid={nodes $node_id}

 

To create a *CONSTRAINED_EXTRA_NODES_SET keyword, assign a rigid part ID, and a set ID:

*createentity constrainedextranodes config=102 compid=$comp_id entityid={sets $set_id}

 

Groups to Cross-Sections


The LS-DYNA keywords *DATABASE_CROSS_SECTION_PLANE_ID and *DATABASE_CROSS_SECTION_SET_ID, the RADIOSS keyword /SECT have been mapped from the group entity to the newly added crosssections entity.  See the crosssections data names documentation for more details.

The RADIOSS keywords /SECT/CIRCLE and /SECT/PARAL, and the OptiStruct keyword SECTION are newly supported with the crosssection entity.

Scripts that created or queried the group entity for these keywords must be updated to use the crosssections entity.  Below are a few examples.

 

To create a *DATABASE_CROSS_SECTION_PLANE_ID keyword:

*createentity crosssections config=101

 

To create a *DATABASE_CROSS_SECTION_SET_ID keyword:

*createentity crosssections config=102

 

To create a /SECT/, /SECT/CIRCLE or /SECT/PARAL keyword:

*createentity crosssections config=201

 

To create a SECTION keyword:

*createentity crosssections config=301

 

History Undo/Redo


增加多步骤的撤销与重做功能。.

However, undo/redo support is disabled in 14.0 when running via Tcl.  Any commands that modify the database and are run via Tcl will automatically clear the history.  This includes Tcl scripts, the command window, etc...  However, in order to maintain legacy behavior, there is still one level of undo supported via the *rejectmark command for relevant commands run via Tcl.  There are a few caveats to be aware of:

*rejectmark will reject multiple steps in the history, if any exist, and is no longer limited to just the last action.  So it is important to keep this in mind and update any scripts to not call this command unnecessarily.

If history is turned off, *rejectmark is only supported for certain commands that still use the legacy reject mechanism.  It will not work for commands that use the new undo/redo mechanism.  The solution is to enable history again, for a minimum of 1 action.

 

There are a number of new commands added to support undo/redo, as listed in the New Commands section below.

While these commands are of limited use for 14.0, it is important to understand them as they will become important once undo/redo is supported also for running via Tcl.  In addition, code updates can begin happening now for updating Tcl scripts to best support undo/redo.  There are several commands of importance.

 

hm_historysupporttofile

hm_ishistorysupported

These provide information on the commands that are enabled for undo/redo support.  Additional commands will be supported in future releases.

There are a few commands which are generally supported for history undo/redo, except when the entity_type argument is set as the new "module" entity.  When these commands operate on modules, the history will be cleared.  These commands are:

*positionmark

*reflectmark

*reflectmarkwithoption

*rotatemark

*translatemark

*translatemarkwithsystem

 

*startnotehistorystate

*endnotehistorystate

These define the start and end of a block of commands that should be considered a single history action, regardless of what commands are run in between.  As long as those commands are supported, the entire block of operations is treated as a single undo/redo action.  For example:

*startnotehistorystate "Multi operation history action"

*createmark elems 1 1-100

*deletemark elems 1

*createmark elems 1 101-110

*maskentitymark elements 1 0

*endnotehistorystate "Multi operation history action"

This will show as a single undo/redo action with the name "Multi operation history action".

 

Any calls to *rejectclear clear the entire history.  It is therefore important to remove such calls unless they are absolutely necessary.

 

Users can begin to update their Tcl scripts with these in mind, even though they will not have any effect in 14.0.

 

Modules/Parts


在14.0中关于Modules/Part的相关的命令文件输出暂时不会出现,会在110补丁中出现。

For the 14.0 release, there are only a limited set of APIs available for creating, modifying and querying modules/parts.  You will notice that when certain operations are performed (e.g. import BOM, add/modify representations, etc...), nothing is written to the command file.  This is intentional for the 14.0 release.  A complete set of APIs, including full documentation, will be available in 14.0.110.

 

Parasolid Import/Export


In HyperMesh v14.0, all Parasolid import and export now utilizes the native Parasolid libraries.  There is no longer support available for using the third-party Parasolid import or export capabilities.

Because of this change, existing command files and Tcl scripts should be updated.  The following changes should be made:

#ct\parasolid_reader -> #parasolid\parasolid_reader

#ct\parasolid_writer -> #parasolid\parasolid_writer

 

For example, *feinputwithdata2 #ct\parasolid_reader... should be modified to *feinputwithdata2 #parasolid\parasolid_reader. If existing Tcl scripts or command files are run that reference the old reader or writer, the following will occur:

The native Parasolid reader or writer will automatically be used.

The command file will contain the updated syntax.  Scripts should be modified using this modified output.

This is to allow for compatibility with older scripts.  While this compatibility is maintained for the 14.0 release, it may be removed in a future release.  Therefore, it is recommended to modify scripts to use the native Parasolid reader and writer names during this limited transition period.

 

Undefined Entities


In HyperMesh v14.0, the import and export of referenced entities is fully supported for properties and materials.  Undefined entities exhibit the same behaviors as defined entities; they are visible in all relevant browsers and in the Entity Editor. The defined state simply controls the export of the entity.

If Defined is inactive, the entity not will be written to the solver deck.

If Defined is active, the entity will be written to the solver deck.

The export status of undefined entities cannot be changed.

If a solver deck contains undefined properties or materials, HyperMesh creates the appropriate entities and assigns a default Card Image upon import. The Defined state, attributes, and Card Image can be modified as per requirements of the user.

 

This new behavior may require some logic changes in Tcl scripts.  Some legacy scripts may attempt to:

Query the materialid or propertyid data names, and then use hm_entityinfo exist to check if that particular entity exists.

Compare the materialid or propertyid data names to the material.id or property.id data names to check for entity existence.

As undefined entities are actual entities in the database, this logic will no longer work as both cases will report that the actual entity exists.  Depending on the use case, you may need to additionally check if the entity is defined or not.  This can be done by using hm_getvalue to query the definedentity data name.

For example, to check if material with ID 100 is undefined:

hm_getvalue mats id=100 dataname=definedentity


Modified Commands


The following commands have modified behavior that potentially require script updates:

General/Core

hm_getentityinfo – Modified the supported syntax for querying specific data names.

 

The following commands have new options or enhanced capabilities.  Existing scripts are not affected and only need to be updated if usage of the new functionality is desired:

Collision

hm_collisioninit – The first argument now specifies a config value that determines the behavior of the collision detection.  All legacy options are supported as-is from previous releases.

hm_collisionwriteresultsfile – Enhanced the include_ignored option to allow for appending to results to an existing file, instead of overwriting.

Data names

global – Added new data name modelname.

nodes – The data name coordinates is now valid for *createentity and *setvalue.  It takes as input all 3 coordinates.  For example, *createentity nodes coordinates="100.0 200.0 300.0".

mats/props – Added new data name definedentity.

General/Core

hm_getentityinfo – Added the ability to query data for specific entity configs.

hm_getmemoryinfo – Now also supported on Linux.

hm_info – Added new options rotationcenteroffscreen and writeviewcommands.

hm_collectordisplayed/hm_entitylist/hm_getentitytypes/hm_getincrementalname/hm_info - Now consider tags as named entities.

hm_nodelist – Added new option index for querying nodes of specific 2D edges or 3D faces.  Added new option order for querying all, corner or midside nodes.

hm_wadlinessetentities – Added support for running a front bumper only analysis, or providing all of the inputs in a single mark.

*appendmark/hm_appendmark – 增加新选项 "by face across t junctions".

*createentitysameas – The new entity is now properly placed into the same include, module and assemblies as the source entity.

*createmark/*appendmark/hm_createmark/hm_appendmark – Added new options "by all nodes", "by box entity", "by box entity id", "by box entity name", "by module", "by module id" and "by module name".  The "by elem" option has been enhanced to properly return all nodes for rigids with > 10k nodes.

*createmarkpanel/*editmarkpanel – Added new optional argument face_edge_mode to allow for specifying the face/edge selection method to use by default.

*findmark – Added new bit value for excluding group elements when finding elements.

*findmark – Added new bit value for excluding group elements when finding elements.

 

Geometry

hm_gettgofpointsonline/hm_getlinetgstartpoint/hm_getlinetgendpoint/hm_getlinetangentatcoordinate – The tangent vectors are now returned taking into account the line orientation.

*midsurface_display_plates – Replaced the previous reserved argument with plate_type.

*midsurface_extract_10 – Added additional supported values for extract_by_comp to maintain component transparency.  Added new supported value to the rerun_type argument to support the new "skin offset" method.  Added additional supported values to the new_or_curr_comp argument to allow for immediate sorting during midsurface extraction using negative values.

*midsurface_remove_display_plates – Replaced the previous reserved1 argument with remove_from_all_comps.

*sort_midsurfaces – Added new sorting mode 4.  Enhanced behavior so when creating new components for sorting, the new components are created a duplicates of the originals, and organized into the same parts, assemblies and includes as the originals.

*surfmark_trim_by_surfmark – 增加新的剪切模式mode 2.

*splinesurface/*surfacesplineonlinesloop/*surfacesplinefrompoints – Added new support to the options argument, for associating/stitching of existing meshes to new geometries/meshes.

Graphics/Visualization

hm_info – Added new options automeshcolormode, meshlinecolor, meshlodthreshold, meshtransparency, scalecolor, scaleheight, scaleposition, scalewidth and transparentwithmeshlines.

Meshing

*adaptive_wrapper_mesh – Added new options AcousticMeshType, AcousticMeshQualityHexJacobian, AcousticMeshQualityTetCollapse, ConsiderCavityByComps, SpanAngle and OrganizeWrapElemsByBaseComps.

*adaptive_wrapper_preview – Added new option num_cavities.

*compute_midmesh_thickness – Added new option MaxRelativeChordalDeviation.

*imprint_elements – Added new remesh_mode -1.

*splitelements – Added new split options.

*tetmesh – Added meshcontrols support.

Template Commands

*sortnodes() – Added new mode bysurfaceid.

Deprecated Commands


General/Core

*updateincludedata – Use *updateincludedata2 instead.

Geometry

*geomoutputdata – Use *geomoutputdata2 instead.

*surfacereversenormals – Use *surfacereversenormals2 instead.

*surfacesplineonnodesloop – Use *surfacesplineonnodesloop2 instead.

*writeh3d/*writeh3dtofile/*writeh3dwithorienttofile/*writeh3dwithtitlestofile – Use *writeh3dwithoptions instead.

Meshing

*linemesh_savedata – Use *linemesh_savedata1 instead.

*linemesh_savedata_bar – Use *linemesh_savedata_bar1 instead.

*normalsadjust – Use *normalsadjust2 instead.

Morphing

hm_morph_domaintypecount – Use hm_morph_getinfo instead.

hm_morph_getcountercurrent – Use hm_morph_getinfo instead.

hm_morph_getcountermaximum – Use hm_morph_getinfo instead.

hm_morph_getparameter – Use hm_morph_getinfo instead.

 

Safety

hm_orientseatbelt – No new command recommended.

*create2dseatbelt – Use *createseatbelt instead.

*create2dseatbeltwithmeshelementsize – Use *createseatbelt instead.

*create_sbelt – Use *createseatbelt instead.

*create_sbelt2D – Use *createseatbelt instead.

*createseatbeltline – Use *createseatbelt instead.

*createseatbeltsurfaceandlines – Use *createseatbelt instead.

Removed Commands


Manufacturing

*hm_trim – Use *hf_trim_multi instead.


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值