text
stringlengths
112
379
<s>[INST] Open a new document in PyCATIA. [/INST] Example code: ```python from pycatia import catia from pycatia.mec_mod_interfaces.part import Part from pycatia.mec_mod_interfaces.part_document import PartDocument catia = catia() active_document = catia.active_document part_document = PartDocument(active_document.com_object) part = Part(part_document.part.com_object) ``` </s>
<s>[INST] Print all parameters and their values. [/INST] Example code: ```python parameters = part.parameters for param in parameters: print(param.name, '=', param.value) ``` </s>
<s>[INST] Add a new point. [/INST] Example code: ```python point = hybrid_shape_factory.add_new_point_coord(0, 0, 0) ``` </s>
<s>[INST] Add a normal line. [/INST] Example code: ```python line = hybrid_shape_factory.add_new_line_normal(plane, center_point, 0, 10, True) ``` </s>
<s>[INST] Add a direction. [/INST] Example code: ```python hybrid_shape_factory.add_new_direction(line) ``` </s>
<s>[INST] Add a plane. [/INST] Example code: ```python plane = part.origin_elements.plane_xy plane = part.origin_elements.plane_zx plane = part.origin_elements.plane_zy ``` </s>
<s>[INST] Draw a circle. [/INST] Example code: ```python line = hybrid_shape_factory.add_new_line_normal(plane, center_point, 0, 10, True) hybrid_body_shape.append_hybrid_shape(circle) ``` </s>
<s>[INST] Draw a cylinder. [/INST] Example code: ```python cylinder = hybrid_shape_factory.add_new_cylinder(center_point, radius, 100, 100, direction) hybrid_body_shape.append_hybrid_shape(cylinder) ``` </s>
<s>[INST] Draw a sphere. [/INST] Example code: ```python sphere = hybrid_shape_factory.add_new_sphere(center_point, None, radius, -360, 360, -360, 360) hybrid_body_shape.append_hybrid_shape(sphere) ``` </s>
<s>[INST] Add an axis. [/INST] Example code: ```python hybrid_shape_factory.add_new_axis_line(direction) ``` </s>
<s>[INST] Fill an object. [/INST] Example code: ```python fill = hsf.add_new_fill() fill.add_bound(circle) hybrid_body_surface.append_hybrid_shape(fill) ``` </s>
<s>[INST] Create an intersection between two elements. [/INST] Example code: ```python hybrid_shape_factory.add_new_intersection(cylinder, sphere) ``` </s>
<s>[INST] Extrude an element. [/INST] Example code: ```python hybrid_shape_factory.add_new_extrude(circle, 0, 100, direction) ``` </s>
<s>[INST] Invert an element. [/INST] Example code: ```python hybrid_shape_factory.add_new_inverse(surface_1, 30) ``` </s>
<s>[INST] Revolve an element. [/INST] Example code: ```python revolve = hybrid_shape_factory.add_new_revol(spiral, 1, 50, direction) ``` </s>
<s>[INST] Rotate an element. [/INST] Example code: ```python hybrid_shape_factory.add_new_rotate(surface_1, XY_axis, 40) ``` </s>
<s>[INST] Project an element on a surface. [/INST] Example code: ```python hybrid_shape_factory.add_new_project(spline, plane_xy) ``` </s>
<s>[INST] Sweep a circle. [/INST] Example code: ```python hybrid_shape_factory.add_new_sweep_circle(guide1) ``` </s>
<s>[INST] Sweep a line. [/INST] Example code: ```python hybrid_shape_factory.add_new_sweep_line(guide1) ``` </s>
<s>[INST] Sweep a cone. [/INST] Example code: ```python hybrid_shape_factory.add_new_sweep_conic(guide1) ``` </s>
<s>[INST] Create a symmetry. [/INST] Example code: ```python hybrid_shape_factory.add_new_symmetry(circle, plane_xy) ``` </s>
<s>[INST] Translate an element. [/INST] Example code: ```python hybrid_shape_factory.add_new_translate(sphere, direction, 100) ``` </s>
<s>[INST] Join two elements. [/INST] Example code: ```python hybrid_shape_factory.add_new_join(element1, element2) ``` </s>
<s>[INST] Split two elements. [/INST] Example code: ```python hybrid_shape_factory.add_new_hybrid_split(sphere, cylinder, direction) ``` </s>
<s>[INST] Extrapolate an element. [/INST] Example code: ```python hybrid_shape_factory.add_new_extrapol_length(boundary, to_extrapol, length) ``` </s>
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
0
Edit dataset card