variable section meshing#
Create variable geometry for variable sections#
- opstool.preprocessing.var_line_string(pointsi, pointsj, path, n_sec=2, loc_sec=None, closure=False, y_degree=1, y_sym_plane='j-0', z_degree=2, z_sym_plane='j-0')[source]#
Returns the varied line string.
Parameters#
- pointsilist[list[float, float]]
I end line points.
- pointsjlist[list[float, float]]
J end line points.
- pathlist
Coordinate path of section normal, such as [(x1, y1, z1), (x2, y2, z2), … , (xn, yn, zn)].
- n_secfloat, optional
The number of sections within each line segment between two coords in Arg path, by default 2.
- loc_seclist or 1D numpy array, optional, default=None
The section position of each element in the range 0-1. If not None, it overwrites n_sec. If None, it will be evenly divided according to Arg n_sec.
- closure: bool, default=False
If True, the line is a closed loop.
- y_degreeint, optional
The polynomial order of the y-axis dimension variation of the section, 1=linear, 2=parabolic, by default 1.
- y_sym_planestr, optional, by default “j-0”
When `y_degree`=2, specify the position of the symmetry plane, where the derivative is 0. The format is “i-{d}” or “j-{d}”, which means that the distance from end i or end j is d. For example, “j-0” refers to end j, and “j-1.5” refers to the position 1.5 away from end j.
- z_degreeint, optional
The polynomial order of the z-axis dimension variation of the section, 1=linear, 2=parabolic, by default 2.
- z_sym_planestr, optional, by default “j-0”
When `z_degree`=2, specify the position of the symmetry plane, where the derivative is 0. The format is “i-{d}” or “j-{d}”, which means that the distance from end i or end j is d. For example, “j-0” refers to end j, and “j-1.5” refers to the position 1.5 away from end j.
Returns#
- list[list[list[float, float]]]
A list of lines, the number of which is determined by path and n_sec.
Variable Section Visualization#
- opstool.preprocessing.vis_var_sec(sec_meshes, path, n_sec=2, loc_sec=None, on_notebook=False, show_outline=True)[source]#
Visualize varied section meshes.
Warning
Please carefully check your section local axes. For visualization purposes, this function defaults to using vecxz=[-1,0,0] for vertical elements and vecxz=[0,0,1] for non-vertical ones.
Parameters#
- sec_mesheslist
Section meshes list generated by
opstool.preprocessing.SecMesh
.- pathlist
Coordinate path of section normal, such as [(x1, y1, z1), (x2, y2, z2), … , (xn, yn, zn)].
- n_secfloat, optional
The number of sections within each line segment between two coords in Arg path, by default 2.
- loc_seclist or 1D numpy array, optional, default=None
The section position of each element in the range 0-1. If not None, it overwrites n_sec. If None, it will be evenly divided according to Arg n_sec.
- on_notebookbool, optional, by default False
If True, display on the notebook.
- show_outline: bool, optional, by default False
If True, display bound outline.