STEP¶
ISO STEP reader/writer.
- class design3d.step.Step(lines: List[str], name: str = '')[source]¶
Bases:
object
Defines the Step class.
- property all_connections¶
Returns all pairs of connections.
- context_dependent_shape_representation_to_next_assembly_usage_occurrence(node)[source]¶
Returns id of the next_assembly_usage_occurrence related to the given context_dependent_shape_representation.
- create_graph()[source]¶
Step functions graph.
- Returns:
A graph representation the step file structure.
- Return type:
networkx.DiGraph
- create_node_list(initial_nodes)[source]¶
Step functions graph as a list of nodes.
- Parameters:
initial_nodes (List[int]) – Initial list of shell nodes and assemblies entities.
- Returns:
A list of nodes in the right order of dependency.
- Return type:
List[int]
- draw_graph(graph=None, reduced=False)[source]¶
Draw a graph for Step data.
- Parameters:
graph (TYPE, optional) – DESCRIPTION, defaults to None
reduced (TYPE, optional) – DESCRIPTION, defaults to False
- Returns:
DESCRIPTION
- Return type:
TYPE
- classmethod from_file(filepath: str = None, name: str = '')[source]¶
Instantiate a Step object from a step file.
- get_assembly_data(assembly_usage_occurence, valid_entities, assembly_frame, object_dict)[source]¶
Helper function to get assembly data.
- get_frame_mapped_shell_node(node: int)[source]¶
Find the shell node in the assembly.
- Parameters:
node (int) – Assembly step entity node.
- Returns:
Shell ID.
- Return type:
int
- get_root_nodes()[source]¶
Returns a dictionary containing the nodes of the step file function that are used as start points.
- get_shell_node_from_representation_entity(id_representation_entity: int)[source]¶
Find the shell node ID related to a given representation entity.
- Parameters:
id_representation_entity (int) – Representation entity ID.
- Returns:
Shell ID.
- Return type:
int
- get_shell_node_from_shape_representation(id_shape_representation: int)[source]¶
Find the shell node ID related to a given shape representation.
- Parameters:
id_shape_representation (int) – Representation entity ID.
- Returns:
Shell ID.
- Return type:
int
- instantiate(name, arguments, object_dict, step_id)[source]¶
Gives the design3d object related to the step function.
- product_definition_to_product(id_product_definition)[source]¶
Returns the ID of the product entity related to the given product_definition ID.
- property root_nodes¶
Returns a dictionary containing the nodes of the step file function that are used as start points.
- shape_definition_representation_to_product_node(shape_definition_representation_id)[source]¶
Returns the ID of the product entity related to the given shape_definition_representation ID.
- shape_definition_representation_to_shell_node(shape_definition_representation_id)[source]¶
Returns the ID of the shell entity related to the given shape_definition_representation ID.
- to_volume_model(show_times: bool = False)[source]¶
Translate a step file into a design3d object.
- Parameters:
show_times (bool) – if True, displays how many times a given class has been instantiated and the total time of all the instantiations of this given class.
- Returns:
A design3d solid object.
- Return type:
- class design3d.step.StepFunction(function_id, function_name, function_arg)[source]¶
Bases:
object
Abstract class defining a step function.
- class design3d.step.StepReaderReport(step_name: str = ' ', total_number_of_faces: int = 0, faces_read: int = 0, sucess_rate: float = 0.0, errors: list = <factory>)[source]¶
Bases:
object
Data class to save a report after translating a step file to design3d object.
- errors: list¶
- faces_read: int = 0¶
- step_name: str = ' '¶
- sucess_rate: float = 0.0¶
- total_number_of_faces: int = 0¶