Parametric Shapes¶
Rotated Shapes¶
RotateStraightShape()¶
- class RotateStraightShape(rotation_angle=360.0, color=(0.89, 0.101, 0.109), name='rotatestraightshape', **kwargs)¶
Bases:
paramak.parametric_shapes.rotate_mixed_shape.RotateMixedShape
Rotates a 3d CadQuery solid from points connected with straight connections.
- Parameters
rotation_angle – The rotation angle to use when revolving the solid (degrees).
RotateSplineShape()¶
- class RotateSplineShape(rotation_angle=360.0, color=(0.415, 0.239, 0.603), name='rotatesplineshape', **kwargs)¶
Bases:
paramak.parametric_shapes.rotate_mixed_shape.RotateMixedShape
Rotates a 3d CadQuery solid from points connected with splines.
- Parameters
rotation_angle – The rotation_angle to use when revolving the solid. Defaults to 360.0.
RotateMixedShape()¶
- class RotateMixedShape(rotation_angle=360.0, color=(0.121, 0.47, 0.705), name='rotatemixedshape', **kwargs)¶
Bases:
paramak.shape.Shape
Rotates a 3d CadQuery solid from points connected with a mixture of straight lines and splines.
- Parameters
rotation_angle – The rotation_angle to use when revolving the solid (degrees). Defaults to 360.0.
- create_solid()¶
Creates a rotated 3d solid using points with straight and spline edges.
- Returns:
A CadQuery solid: A 3D solid volume
RotateCircleShape()¶
- class RotateCircleShape(radius, rotation_angle=360.0, color=(1.0, 1.0, 0.6), name='rotatecircleshape', **kwargs)¶
Bases:
paramak.shape.Shape
Rotates a circular 3d CadQuery solid from a central point and a radius
- Parameters
radius – radius of the shape
rotation_angle – The rotation_angle to use when revolving the solid (degrees). Defaults to 360.0.
- create_solid()¶
Creates a rotated 3d solid using points with circular edges.
- Returns
A 3D solid volume
- Return type
A CadQuery solid
Extruded Shapes¶
ExtrudeStraightShape()¶
- class ExtrudeStraightShape(distance, color=(1.0, 0.498, 0.0), name='extrudestraightshape', **kwargs)¶
Bases:
paramak.parametric_shapes.extruded_mixed_shape.ExtrudeMixedShape
Extrudes a 3d CadQuery solid from points connected with straight lines.
- Parameters
distance – the extrusion distance to use (cm units if used for neutronics)
ExtrudeSplineShape()¶
- class ExtrudeSplineShape(distance, color=(0.984, 0.603, 0.6), name='extrudesplineshape', **kwargs)¶
Bases:
paramak.parametric_shapes.extruded_mixed_shape.ExtrudeMixedShape
Extrudes a 3d CadQuery solid from points connected with spline connections.
- Parameters
distance – the extrusion distance to use (cm units if used for neutronics).
ExtrudeMixedShape()¶
- class ExtrudeMixedShape(distance, extrude_both=True, rotation_angle=360.0, extrusion_start_offset=0.0, color=(0.2, 0.627, 0.172), name='extrudemixedshape', **kwargs)¶
Bases:
paramak.shape.Shape
Extrudes a 3d CadQuery solid from points connected with a mixture of straight and spline connections.
- Parameters
distance – the extrusion distance to use (cm units if used for neutronics)
extrude_both – If set to True, the extrusion will occur in both directions. Defaults to True.
rotation_angle – rotation angle of solid created. A cut is performed from rotation_angle to 360 degrees. Defaults to 360.0.
- create_solid()¶
Creates an extruded 3d solid using points connected with straight and spline edges.
- Returns:
A CadQuery solid: A 3D solid volume
ExtrudeCircleShape()¶
- class ExtrudeCircleShape(distance, radius, extrusion_start_offset=0.0, rotation_angle=360, extrude_both=True, color=(0.984, 0.603, 0.6), name='extrudecircleshape', **kwargs)¶
Bases:
paramak.shape.Shape
Extrudes a circular 3d CadQuery solid from a central point and a radius
- Parameters
distance – the extrusion distance to use (cm units if used for neutronics)
radius – radius of the shape.
rotation_angle – rotation_angle of solid created. a cut is performed from rotation_angle to 360 degrees. Defaults to 360.
extrude_both – if set to True, the extrusion will occur in both directions. Defaults to True.
- create_solid()¶
Creates a extruded 3d solid using points with circular edges.
- Returns
A 3D solid volume
- Return type
A CadQuery solid
Swept Shapes¶
SweepStraightShape()¶
- class SweepStraightShape(path_points, workplane='XY', path_workplane='XZ', force_cross_section=False, color=(0.698, 0.8745, 0.541), name='sweepstraightshape', **kwargs)¶
Bases:
paramak.parametric_shapes.sweep_mixed_shape.SweepMixedShape
Sweeps a 2D shape created from points connected with straight lines along a defined spline path to create a 3D CadQuery solid. Note, some variation in the cross-section of the solid may occur.
- Parameters
path_points – A list of XY, YZ or XZ coordinates connected by spline connections which define the path along which the 2D shape is swept
workplane – Workplane in which the 2D shape to be swept is defined. Defaults to “XY”.
path_workplane – Workplane in which the spline path is defined. Defaults to “XZ”.
force_cross_section – If True, cross-section of solid is forced to be shape defined by points in workplane at each path_point. Defaults to False.
SweepSplineShape()¶
- class SweepSplineShape(path_points, workplane='XY', path_workplane='XZ', force_cross_section=False, color=(0.992, 0.749, 0.435), name='sweepsplineshape', **kwargs)¶
Bases:
paramak.parametric_shapes.sweep_mixed_shape.SweepMixedShape
Sweeps a 2D shape created from points connected with spline connections along a defined spline path to create a 3D CadQuery solid. Note, some variation in the cross-section of the solid may occur.
- Parameters
path_points – A list of XY, YZ or XZ coordinates connected by spline connections which define the path along which the 2D shape is swept.
workplane – Workplane in which the 2D shape to be swept is defined. Defaults to “XY”.
path_workplane – Workplane in which the spline path is defined. Defaults to “XZ”.
force_cross_section (bool, optional) – If True, cross-setion of solid is forced to be shape defined by points in workplane at each path_point. Defaults to False.
SweepMixedShape()¶
- class SweepMixedShape(path_points, workplane='XY', path_workplane='XZ', force_cross_section=False, color=(0.792, 0.698, 0.839), name='sweepmixedshape', **kwargs)¶
Bases:
paramak.shape.Shape
Sweeps a 2D shape created from points connected with straight, spline or circle connections along a defined spline path to create a 3D CadQuery solid. Note, some variation in cross-section of the solid may occur.
- Parameters
path_points – A list of XY, YZ or XZ coordinates connected by spline connections which define the path along which the 2D shape is swept.
workplane – Workplane in which the 2D shape to be swept is defined. Defaults to “XY”.
path_workplane – Workplane in which the spline path is defined. Defaults to “XZ”.
force_cross_section (bool, optional) – If True, cross-section of solid is forced to be shape defined by points in workplane at each path_point. Defaults to False.
- create_solid()¶
Creates a swept 3D solid from a 2D shape with mixed connections.
- Returns
A 3D solid volume
- Return type
A CadQuery solid
SweepCircleShape()¶
- class SweepCircleShape(radius, path_points, workplane='XY', path_workplane='XZ', force_cross_section=False, color=(0.651, 0.808, 0.89), name='sweepcircleshape', **kwargs)¶
Bases:
paramak.shape.Shape
Sweeps a 2D circle of a defined radius along a defined spline path to create a 3D CadQuery solid. Note, some variation in the cross-section of the solid may occur.
- Parameters
radius – Radius of 2D circle to be swept.
path_points – A list of XY, YZ or XZ coordinates connected by spline connections which define the path along which the 2D shape is swept
workplane – Workplane in which the circle to be swept is defined. Defaults to “XY”.
path_workplane – Workplane in which the spline path is defined. Defaults to “XZ”.
force_cross_section – If True, cross-section of solid is forced to be shape defined by points in workplane at each path_point. Defaults to False.
- create_solid()¶
Creates a swept 3D solid from a 2D circle.
- Returns
A 3D solid volume
- Return type
A CadQuery solid