Skip to content

Extracting STEP file geometrical entities names with hierarchical view #805

Open
@BoshraKrout

Description

@BoshraKrout

i have to build a STEP viewer for my project in witch i can see the hierarchical structure of the step file geomertical entities.
For now i can only see the names of the entities with this code:

from OCC.Display.WebGl import x3dom_renderer
from OCC.Core.STEPControl import STEPControl_Reader

from OCC.Extend.DataExchange import read_step_file_with_names_colors
from OCC.Core.Quantity import Quantity_Color, Quantity_TOC_RGB
from OCC.Display.SimpleGui import init_display

step_reader = STEPControl_Reader()
status=step_reader.ReadFile('step/ASY-0039890.stp')
step_reader.TransferRoot(1)

shapes_labels_colors = read_step_file_with_names_colors('step/ASY-0039890.stp')

my_renderer = x3dom_renderer.X3DomRenderer()
for shpt_lbl_color in shapes_labels_colors:
	my_renderer.DisplayShape(shpt_lbl_color)

my_renderer.render()

the execution of this code:

components_names

select_component4

Now i want to see the names of the entities in this way:

hierarchicalView

Can any one help please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions