Model.axisymmetry#
- Model.axisymmetry(axisptx=0.0, axispty=0.0, axisptz=0.0, axisx=0.0, axisy=0.0, axisz=0.0, AxiSymmId=0, CrossSectionId=0, Delete=0, ImprintGeomCollection=Collection(), MainCrossSectionId=0, MainSurfaceCreate=0, MainSurfaceId=0, Modify=0, NumGeomInstances=0, SecondaryImprint=0, UserSurfaceCollection=Collection(), VolumeSurfaceCollection=Collection())#
Creates an axisymmetry main plane for selected surfaces based on the specified axis. Modifies an axisymmetry main plane by imprinting secondary plane on the main plane or by imprinting lines, surfaces, or solids on the main plane.
- Parameters:
axisptx (double) – The x coordinate of a point on the axis.
axispty (double) – The y coordinate of a point on the axis.
axisptz (double) – The z coordinate of a point on the axis.
axisx (double) – The x coordinate of the axis.
axisy (double) – The y coordinate of the axis.
axisz (double) – The z coordinate of the axis.
AxiSymmId (int) – The ID of the axisymmetry entity. Valid only when modified existing axisymmetry main plane.
CrossSectionId (int) – The ID of the cross-section entity representing the active secondary plane cross-section.
Delete (int) – The flag to delete the main plane. Valid value is 1.
ImprintGeomCollection (Collection) – The collection containing the line, surfaces or solid entities to be imprinted on the axisymmetry main plane.
MainCrossSectionId (int) – The ID of the cross-section entity representing the main plane cross section.
MainSurfaceCreate (int) – The flag to create main plane surface. Valid value is 1.
MainSurfaceId (int) – The ID of the main plane surface entity. Valid only when modified existing axisymmetry main plane.
Modify (int) – The flag to modify the main plane by imprinting secondary plane on the main plane or by imprinting lines, surfaces, solids on the main plane. Valid value is 1.
NumGeomInstances (int) – The number of solids instances to be imprinted on the main plane.
SecondaryImprint (int) – The flag to create first secondary plane imprint on the main plane. Valid value is 1.
UserSurfaceCollection (Collection) – The collection containing the entities.
VolumeSurfaceCollection (Collection) – The collection containing the entities.
Examples#
Create the axisymmetry main plane for selected surfaces based on the specified axis#import hm import hm.entities as ent model = hm.Model() # Defining the Axisymmetry entity axsym = ent.Axisymmetry(model, name="Axisymmetry", config=2) axsym.volumegeometries = [ent.Solid(model, 1)] model.ME_ModuleOccurrenceCreate(name="Axisymmetry", structural_type="part") ent.Component(model, name="Axisymmetry") axsym.Part = ent.Part(model, "Axisymmetry") # Creating main cross-section crosssect = ent.Crosssection(model, name="MainAxisymmetry", config=3, color=3) axsym.MainCrossSection = crosssect crosssect.geometrytype = 2 crosssect.basenode = [ 87.149991989135742, 9.8691298262565397e-06, -6.2505466758011607e-07, ] crosssect.normal = [0, 1, -4.3711388286737929e-08] crosssect.Offset = 9.8691307357512414e-06 crosssect.Edge = [-1, 0, 0] crosssect.Length = 112.79998779296875 crosssect.Width = 75.200004577636719 crosssect.DisplayMode = 1 # Collection surfaces surf_col = hm.Collection(model, ent.Surface, list(range(185, 217))) model.axisymmetry( MainSurfaceCreate=1, MainCrossSectionId=crosssect.id, AxiSymmId=axsym.id, VolumeSurfaceMark=surf_col, )
Create the secondary plane and imprint it on the axisymmetry main plane#import hm import hm.entities as ent model = hm.Model() # Defining the Axisymmetry entity axsym = ent.Axisymmetry(model, name="Axisymmetry", config=2) axsym.volumegeometries = [ent.Solid(model, 1)] model.ME_ModuleOccurrenceCreate(name="Axisymmetry", structural_type="part") ent.Component(model, name="Axisymmetry") axsym.Part = ent.Part(model, "Axisymmetry") # Creating main cross-section crosssect = ent.Crosssection(model, name="MainAxisymmetry", config=3, color=3) axsym.MainCrossSection = crosssect crosssect.geometrytype = 2 crosssect.basenode = [ 87.149991989135742, 9.8691298262565397e-06, -6.2505466758011607e-07, ] crosssect.normal = [0, 1, -4.3711388286737929e-08] crosssect.Offset = 9.8691307357512414e-06 crosssect.Edge = [-1, 0, 0] crosssect.Length = 112.79998779296875 crosssect.Width = 75.200004577636719 crosssect.DisplayMode = 1 crosssectSecond = ent.Crosssection(model, name="SecondaryAxisymmetry", config=3, color=7) axsym.SecondaryCrossSections = crosssectSecond crosssectSecond.geometrytype = 2 crosssectSecond.basenode = [ 87.149991989135742, 9.8691298262565397e-06, -6.2505466758011607e-07, ] crosssectSecond.normal = [0, 1, -4.3711388286737929e-08] crosssectSecond.Offset = 9.8691307357512414e-06 crosssectSecond.Edge = [-1, 0, 0] crosssectSecond.Length = 112.79998779296875 crosssectSecond.Width = 75.200004577636719 crosssectSecond.DisplayMode = 1 # Collection surfaces surf_col = hm.Collection(model, ent.Surface, list(range(185, 217))) model.axisymmetry( MainSurfaceCreate=1, MainCrossSectionId=crosssect.id, AxiSymmId=axsym.id, VolumeSurfaceMark=surf_col, SecondaryImprint=1, CrossSectionId=crosssectSecond.id, )
Modify the axisymmetry main plane by imprint lines , surfaces , or solids on the main plane#import hm import hm.entities as ent model = hm.Model() # Defining the Axisymmetry entity axsym = ent.Axisymmetry(model, name="Axisymmetry", config=2) axsym.volumegeometries = [ent.Solid(model, 1)] model.ME_ModuleOccurrenceCreate(name="Axisymmetry", structural_type="part") axsym.Part = ent.Part(model, "Axisymmetry") # Creating main cross-section crosssect = ent.Crosssection(model, name="MainAxisymmetry", config=3, color=3) axsym.MainCrossSection = crosssect crosssect.geometrytype = 2 crosssect.basenode = [ 87.149991989135742, 9.8691298262565397e-06, -6.2505466758011607e-07, ] crosssect.normal = [0, 1, -4.3711388286737929e-08] crosssect.Offset = 9.8691307357512414e-06 crosssect.Edge = [-1, 0, 0] crosssect.Length = 112.79998779296875 crosssect.Width = 75.200004577636719 crosssect.DisplayMode = 1 crosssectSecond = ent.Crosssection(model, name="SecondaryAxisymmetry", config=3, color=7) axsym.SecondaryCrossSections = crosssectSecond crosssectSecond.geometrytype = 2 crosssectSecond.basenode = [ 87.149991989135742, 9.8691298262565397e-06, -6.2505466758011607e-07, ] crosssectSecond.normal = [0, 1, -4.3711388286737929e-08] crosssectSecond.Offset = 9.8691307357512414e-06 crosssectSecond.Edge = [-1, 0, 0] crosssectSecond.Length = 112.79998779296875 crosssectSecond.Width = 75.200004577636719 crosssectSecond.DisplayMode = 1 model.rotatemark( collection=hm.Collection(model,ent.Crosssection,["SecondaryAxisymmetry"]), plane_normal=[1.0,0.0,0.0], plane_base=[87.1499863, 9.86912983e-06, -6.25054668e-07] ) model.axisymmetry(Delete=1,MainSurfaceId=217) ent.Component(model, name="Axisymmetry", color=6) # Collection surfaces surf_col = hm.Collection(model, ent.Surface, list(range(185, 217))) model.axisymmetry( MainSurfaceCreate=1, MainCrossSectionId=crosssect.id, AxiSymmId=axsym.id, VolumeSurfaceMark=surf_col, CrossSectionId=crosssectSecond.id, ) # Modify the axisymmetry surf_col = hm.Collection(model, ent.Surface, list(range(185, 217))) model.axisymmetry( Modify=1, MainSurfaceId=217, MainCrossSectionId=crosssect.id, AxiSymmId=axsym.id, VolumeSurfaceMark=surf_col, CrossSectionId=crosssectSecond.id, )
Modify the axisymmetry main plane by imprint lines , surfaces , or solids on the main plane#import hm import hm.entities as ent model = hm.Model() # Defining the Axisymmetry entity axsym = ent.Axisymmetry(model, name="Axisymmetry", config=2) axsym.volumegeometries = [ent.Solid(model, 1)] model.ME_ModuleOccurrenceCreate(name="Axisymmetry", structural_type="part") axsym.Part = ent.Part(model, "Axisymmetry") # Creating main cross-section crosssect = ent.Crosssection(model, name="MainAxisymmetry", config=3, color=3) axsym.MainCrossSection = crosssect crosssect.geometrytype = 2 crosssect.basenode = [ 87.149991989135742, 9.8691298262565397e-06, -6.2505466758011607e-07, ] crosssect.normal = [0, 1, -4.3711388286737929e-08] crosssect.Offset = 9.8691307357512414e-06 crosssect.Edge = [-1, 0, 0] crosssect.Length = 112.79998779296875 crosssect.Width = 75.200004577636719 crosssect.DisplayMode = 1 crosssectSecond = ent.Crosssection(model, name="SecondaryAxisymmetry", config=3, color=7) axsym.SecondaryCrossSections = crosssectSecond crosssectSecond.geometrytype = 2 crosssectSecond.basenode = [ 87.149991989135742, 9.8691298262565397e-06, -6.2505466758011607e-07, ] crosssectSecond.normal = [0, 1, -4.3711388286737929e-08] crosssectSecond.Offset = 9.8691307357512414e-06 crosssectSecond.Edge = [-1, 0, 0] crosssectSecond.Length = 112.79998779296875 crosssectSecond.Width = 75.200004577636719 crosssectSecond.DisplayMode = 1 model.axisymmetry(Delete=1,MainSurfaceId=217) ent.Component(model, name="Axisymmetry", color=6) # Collection surfaces surf_col = hm.Collection(model, ent.Surface, list(range(185, 217))) model.axisymmetry( MainSurfaceCreate=1, MainCrossSectionId=crosssect.id, AxiSymmId=axsym.id, VolumeSurfaceMark=surf_col, CrossSectionId=crosssectSecond.id, ) # Modify the axisymmetry surf_col = hm.Collection(model, ent.Surface, list(range(185, 217))) surf_col2 = hm.Collection(model, ent.Surface, [2]) model.axisymmetry( Modify=1, MainSurfaceId=217, MainCrossSectionId=crosssect.id, AxiSymmId=axsym.id, VolumeSurfaceMark=surf_col, CrossSectionId=crosssectSecond.id, ImprintGeomCollection=surf_col2 )