Scene class
class compolyx.Scene(graph, model=None, name=”, id=None, title=”, view=None, parent=None, active_set=None)
Class to represent scene.property active_set
Set of active entities.property background
Background color.property background2
Background color 2.property camera
Camera settings.property changed
Status boolean. Set to true if the underlying data has been changed. Write only property.property descriptions_changed
Set toTrue if descriptions should be updated.
property fit_to_window
Reset the zoom of the window.property foreground
Foreground color.property logo_type
Logo type:default or black.
property mode
Current ACP mode (pre or post).property projection
Projection method:parallel or perspective.
save_snapshot(path, width=None, height=None, draw_background=False)
Create a snapshot of the scene.- Parameters:
- path: File path.
- width: Width in pixels of the snapshot.
- height: Height in pixels of the snapshot.
- draw_background: Boolean for whether to draw the background. If
False, the background is white.
property scale_factor
Scale factor of the deformed mesh.serialize()
Serialize to Python string.property show_element_type
Highlightshell or solid elements, or use automatic to select solid elements if the object belongs to a solid model. Note: Only analysis plies have solid elements. Shell elements are highlighted for modeling and production plies.
property show_global_coordinate_system
Toggle visibility of global coordinate system marker.property show_labeled_bounding_box
Toggle visibility of labeled bounding box.property show_selected_mesh
Specify whether to show/highlight currently selected elements.property show_silhouette
Whether to show the silhouette of currently selected elements.property status
Status of the object.property title
Scene title.update_direction_display_data(entities)
Function syncronizes the following direction plots with the added/removed entities given:orientationsref_directionsfiber_directionsdraped_fiber_directions
property uptodate
Apply a view to the scene. Write only.property view
Apply a view to the scene.View class
class compolyx.View(name, position=(0.0, 0.0, 0.0), orientation=(0.0, 0.0, 0.0), rotation_point=(0.0, 0.0, 0.0), parallel_scale=1.0, projection=‘perspective’, locked=False, parent=None)
ComPoLyX class to capture view properties.- Access: