Design
#
- class ansys.geometry.core.designer.design.Design(name: str, modeler: ansys.geometry.core.modeler.Modeler, read_existing_design: bool = False)#
Bases:
ansys.geometry.core.designer.component.Component
Provides for organizing geometry assemblies.
This class synchronizes to a supporting Geometry service instance.
- Parameters:
- name
str
User-defined label for the design.
- grpc_client
GrpcClient
Active supporting Geometry service instance for design modeling.
- read_existing_designbool, default:
False
Whether an existing design on the service should be read. This parameter is only valid when connecting to an existing service session. Otherwise, avoid using this optional parameter.
- name
Overview#
Add a material to the design. |
|
Save a design to disk on the active Geometry server instance. |
|
Export and download the design from the server. |
|
Export the design to an scdocx file. |
|
Export the design to a Parasolid text file. |
|
Export the design to a Parasolid binary file. |
|
Export the design to an FMD file. |
|
Export the design to a STEP file. |
|
Export the design to an IGES file. |
|
Export the design to a PMDB file. |
|
Create a named selection on the active Geometry server instance. |
|
Delete a named selection on the active Geometry server instance. |
|
Delete a component (itself or its children). |
|
Set the shared topology to apply to the component. |
|
Add a new beam circular profile under the design for creating beams. |
|
Add a mid-surface thickness to a list of bodies. |
|
Add a mid-surface offset type to a list of bodies. |
|
Remove a beam profile on the active geometry server instance. |
|
Insert a file into the design. |
The design’s object unique id. |
|
List of materials available for the design. |
|
List of named selections available for the design. |
|
List of beam profile available for the design. |
|
Whether the design is currently active. |
Represent the |
Import detail#
from ansys.geometry.core.designer.design import Design
Property detail#
- property Design.materials: beartype.typing.List[ansys.geometry.core.materials.material.Material]#
List of materials available for the design.
- property Design.named_selections: beartype.typing.List[ansys.geometry.core.designer.selection.NamedSelection]#
List of named selections available for the design.
- property Design.beam_profiles: beartype.typing.List[ansys.geometry.core.designer.beam.BeamProfile]#
List of beam profile available for the design.
Method detail#
- Design.add_material(material: ansys.geometry.core.materials.material.Material) None #
Add a material to the design.
- Parameters:
- material
Material
Material to add.
- material
- Design.save(file_location: beartype.typing.Union[pathlib.Path, str]) None #
Save a design to disk on the active Geometry server instance.
- Design.download(file_location: beartype.typing.Union[pathlib.Path, str], format: beartype.typing.Optional[DesignFileFormat] = DesignFileFormat.SCDOCX) None #
Export and download the design from the server.
- Design.export_to_scdocx(location: beartype.typing.Union[pathlib.Path, str] = None) str #
Export the design to an scdocx file.
- Design.export_to_parasolid_text(location: beartype.typing.Union[pathlib.Path, str] = None) str #
Export the design to a Parasolid text file.
- Design.export_to_parasolid_bin(location: beartype.typing.Union[pathlib.Path, str] = None) str #
Export the design to a Parasolid binary file.
- Design.export_to_fmd(location: beartype.typing.Union[pathlib.Path, str] = None) str #
Export the design to an FMD file.
- Design.export_to_step(location: beartype.typing.Union[pathlib.Path, str] = None) str #
Export the design to a STEP file.
- Design.export_to_iges(location: beartype.typing.Union[pathlib.Path, str] = None) str #
Export the design to an IGES file.
- Design.export_to_pmdb(location: beartype.typing.Union[pathlib.Path, str] = None) str #
Export the design to a PMDB file.
- Design.create_named_selection(name: str, bodies: beartype.typing.Optional[beartype.typing.List[ansys.geometry.core.designer.body.Body]] = None, faces: beartype.typing.Optional[beartype.typing.List[ansys.geometry.core.designer.face.Face]] = None, edges: beartype.typing.Optional[beartype.typing.List[ansys.geometry.core.designer.edge.Edge]] = None, beams: beartype.typing.Optional[beartype.typing.List[ansys.geometry.core.designer.beam.Beam]] = None, design_points: beartype.typing.Optional[beartype.typing.List[ansys.geometry.core.designer.designpoint.DesignPoint]] = None) ansys.geometry.core.designer.selection.NamedSelection #
Create a named selection on the active Geometry server instance.
- Parameters:
- name
str
User-defined name for the named selection.
- bodies
List
[Body
], default:None
All bodies to include in the named selection.
- faces
List
[Face
], default:None
All faces to include in the named selection.
- edges
List
[Edge
], default:None
All edges to include in the named selection.
- beams
List
[Beam
], default:None
All beams to include in the named selection.
- design_points
List
[DesignPoint
], default:None
All design points to include in the named selection.
- name
- Returns:
NamedSelection
Newly created named selection that maintains references to all target entities.
- Design.delete_named_selection(named_selection: beartype.typing.Union[ansys.geometry.core.designer.selection.NamedSelection, str]) None #
Delete a named selection on the active Geometry server instance.
- Parameters:
- named_selection
Union
[NamedSelection
,str
] Name of the named selection or instance.
- named_selection
- Design.delete_component(component: beartype.typing.Union[ansys.geometry.core.designer.component.Component, str]) None #
Delete a component (itself or its children).
- Parameters:
- id
Union
[Component
,str
] Name of the component or instance to delete.
- id
- Raises:
ValueError
The design itself cannot be deleted.
Notes
If the component is not this component (or its children), it is not deleted.
Set the shared topology to apply to the component.
- Parameters:
- share_type
SharedTopologyType
Shared topology type to assign.
- share_type
- Raises:
ValueError
Shared topology does not apply to a design.
- Design.add_beam_circular_profile(name: str, radius: beartype.typing.Union[pint.Quantity, ansys.geometry.core.misc.measurements.Distance], center: beartype.typing.Union[numpy.ndarray, ansys.geometry.core.typing.RealSequence, ansys.geometry.core.math.point.Point3D] = ZERO_POINT3D, direction_x: beartype.typing.Union[numpy.ndarray, ansys.geometry.core.typing.RealSequence, ansys.geometry.core.math.vector.UnitVector3D, ansys.geometry.core.math.vector.Vector3D] = UNITVECTOR3D_X, direction_y: beartype.typing.Union[numpy.ndarray, ansys.geometry.core.typing.RealSequence, ansys.geometry.core.math.vector.UnitVector3D, ansys.geometry.core.math.vector.Vector3D] = UNITVECTOR3D_Y) ansys.geometry.core.designer.beam.BeamCircularProfile #
Add a new beam circular profile under the design for creating beams.
- Parameters:
- name
str
User-defined label for the new beam circular profile.
- radius
Real
Radius of the beam circular profile.
- center
Union
[ndarray
,RealSequence
,Point3D
] Center of the beam circular profile.
- direction_x
Union
[ndarray
,RealSequence
,UnitVector3D
,Vector3D
] X-plane direction.
- direction_y
Union
[ndarray
,RealSequence
,UnitVector3D
,Vector3D
] Y-plane direction.
- name
- Design.add_midsurface_thickness(thickness: pint.Quantity, bodies: beartype.typing.List[ansys.geometry.core.designer.body.Body]) None #
Add a mid-surface thickness to a list of bodies.
- Parameters:
- thickness
Quantity
Thickness to be assigned.
- bodies
List
[Body
] All bodies to include in the mid-surface thickness assignment.
- thickness
Notes
Only surface bodies will be eligible for mid-surface thickness assignment.
- Design.add_midsurface_offset(offset_type: ansys.geometry.core.designer.body.MidSurfaceOffsetType, bodies: beartype.typing.List[ansys.geometry.core.designer.body.Body]) None #
Add a mid-surface offset type to a list of bodies.
- Parameters:
- offset_type
MidSurfaceOffsetType
Surface offset to be assigned.
- bodies
List
[Body
] All bodies to include in the mid-surface offset assignment.
- offset_type
Notes
Only surface bodies will be eligible for mid-surface offset assignment.
- Design.delete_beam_profile(beam_profile: beartype.typing.Union[ansys.geometry.core.designer.beam.BeamProfile, str]) None #
Remove a beam profile on the active geometry server instance.
- Parameters:
- beam_profile
Union
[BeamProfile
,str
] A beam profile name or instance that should be deleted.
- beam_profile
- Design.insert_file(file_location: beartype.typing.Union[pathlib.Path, str]) ansys.geometry.core.designer.component.Component #
Insert a file into the design.