Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various typos (trivial, documentation, and source) #4770

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/update_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,11 +684,11 @@ class AddStatistic:
# this probably can be inside the Node class as an update method
# using context manager from contextlib has big overhead
# https://stackoverflow.com/questions/26152934/why-the-staggering-overhead-50x-of-contextlib-and-the-with-statement-in-python
def __init__(self, node: 'SvNode', supress=True):
""":supress: if True any errors during node execution will be suppressed"""
def __init__(self, node: 'SvNode', suppress=True):
""":suppress: if True any errors during node execution will be suppressed"""
self._node = node
self._start = perf_counter()
self._supress = supress
self._suppress = suppress

def __enter__(self):
return None
Expand All @@ -703,7 +703,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
self._node[UPDATE_KEY] = False
self._node[ERROR_KEY] = repr(exc_val)

if self._supress and exc_type is not None:
if self._suppress and exc_type is not None:
if issubclass(exc_type, CancelError):
return False
return issubclass(exc_type, Exception)
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/node_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ of them:
2. Socket is shown if other socket is connected.
3. Socket is shown if node has appropriate input data.

There are many ways to show / hide sockets. First of all it's possible ot use
There are many ways to show / hide sockets. First of all it's possible to use
Blender standard API for adding and removing sockets. Most resent nodes use
``hide_safe`` attribute of sockets. Disadvantage of this method is that sockets
are not really deleted and can be shown with `Ctrl+h` by user. The proper
Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/analyzer/distance_point_plane.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Outputs
* **In Plane**: Returns True if point is in the same plane as with input vertices.
* **Closest Point**: Returns the closest point in the plane
* **Closest in Triangle**: Returns true if the closest point is in the same plane as with input vertices.
* **Side**: True if Source Point on Normale side.
* **Side**: True if Source Point on Normal side.

.. image:: https://user-images.githubusercontent.com/14288520/195653818-3861a5ef-f779-4628-abcf-db26a06df34e.png
:target: https://user-images.githubusercontent.com/14288520/195653818-3861a5ef-f779-4628-abcf-db26a06df34e.png
Expand Down
6 changes: 3 additions & 3 deletions docs/nodes/curve/refine_nurbs_curve.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ number of knots in order to make it easier to manipulate with curve's shape.
Each knot can be inserted once or multiple times. Knots are distributed
according to one of algorithms, in order to make knots distribution more even.

After some modifications to refined curve shape were done, unneded knots can be
removed by use of "Remove excessive knots (Curve)" node.
After some modifications to refined curve shape were done, unneeded knots can
be removed by use of "Remove excessive knots (Curve)" node.

Inputs
------
Expand Down Expand Up @@ -65,7 +65,7 @@ This node has the following parameters:
* **As possible**. Each knot is inserted as many times as possible; that is,
`p-1` times, where `p` is the degree of the curve - if the new knot does
not coincide with any of existing knots; or smaller number of times, if the
new knot hapens to coincide with previously existing knot. This option is
new knot happens to coincide with previously existing knot. This option is
the default.

* **Specify Segment**. If checked, the node allows you to specify the range of
Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/generators_extended/pentagon_tiler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ In the N-Panel (and on the right-click menu) you can find:

**Angle Units**: Choose if the input angles will be interpreted as Degrees or Radians

**Flat output**: Flatten output by list-joining level 1 and unwraping it (default set to True)
**Flat output**: Flatten output by list-joining level 1 and unwrapping it (default set to True)

**Match List Global**: Define how list with different lengths should be matched. Refers to the matching of groups (level 1)

Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/generators_extended/triangle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ In the N-Panel (and on the right-click menu) you can find:

**Tolerance**: Removing Doubles Tolerance (only active when "Remove Doubles" is True)

**Flat output**: Flatten output by list-joining level 1 and unwraping it (default set to True)
**Flat output**: Flatten output by list-joining level 1 and unwrapping it (default set to True)

**Match List Global**: Define how list with different lengths should be matched. Refers to the matching of groups (level 1)

Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/list_main/func.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Logical OR Return True if any value in the list is logical True
Logical AND Return True if all values in the list are logical True
=================== ======================================

**Wrap:** Adds one level of wraping (output becomes [output])
**Wrap:** Adds one level of wrapping (output becomes [output])

Outputs
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/list_masks/mask_convert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Examples of usage

---------

Filter vertices and edges if some faces hided:
Filter vertices and edges if some faces hidden:

.. image:: https://user-images.githubusercontent.com/14288520/188969070-a084e68a-a657-4106-b9bf-a538f218a16c.png
:target: https://user-images.githubusercontent.com/14288520/188969070-a084e68a-a657-4106-b9bf-a538f218a16c.png
Expand Down
4 changes: 2 additions & 2 deletions docs/nodes/modifier_make/adaptive_polygons_mk3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ This node has the following inputs:
transform the donor objects. Available values are:

- **Map**. Interpolation between recipient object's vertex normals will be
used to deform the donor object. While this procuces smoother results, this
used to deform the donor object. While this produces smoother results, this
gives more deformation of donor object.
- **Face**. Recipient object's face normal will be used to orient the donor
object. While this gives less deformation of donor object, it can give gaps
Expand All @@ -98,7 +98,7 @@ Parameters

This node has some number of parameters, and most of them are accessible only in the N panel:

- **Join**. If checked, then all procuced copies of donor object will be merged
- **Join**. If checked, then all produced copies of donor object will be merged
into one mesh. Unchecked by default.
- **Remove doubles**. If checked, then "remove doubles" / "merge by distance"
function will be applied to the resulting mesh; i.e., vertices that have
Expand Down
4 changes: 2 additions & 2 deletions docs/nodes/pulga_physics/pulga_boundaries_force.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ Options & Inputs
Examples
--------

Preforming simulation in the surface of a torus:
Performing simulation in the surface of a torus:

.. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/pulga_physics/pulga_boundaries_force/blender_sverchok_pulga_boundaries_force_example_01.png


Preforming simulation in the surface of a plane and inside a bounding box:
Performing simulation in the surface of a plane and inside a bounding box:

.. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/pulga_physics/pulga_boundaries_force/blender_sverchok_pulga_boundaries_force_example_02.png
2 changes: 1 addition & 1 deletion docs/nodes/viz/viewer_draw_surface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This node has one main parameter:
.. image:: https://user-images.githubusercontent.com/14288520/190235190-86138e03-8423-4b86-9d35-4337b25513f3.png
:target: https://user-images.githubusercontent.com/14288520/190235190-86138e03-8423-4b86-9d35-4337b25513f3.png

Most of arameters of this node are groupped in rows; for each type of
Most of the parameters of this node are grouped in rows; for each type of
information this node can display, there are three parameters: whether to
display it, the color to be used, and point size / line width to be used.

Expand Down
4 changes: 2 additions & 2 deletions docs/old/lists_join wiki
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ ListLevels manual
[[(x0,y0,z0),(x1,y1,z1),(x2,y2,z2)][... ]...] that is how it looks ABCD
0 [ ] parameter from socket
1 [object 0 ][object 1]... objects, matrixes
here can be added levels for making poligons or smth
here can be added levels for making polygons or smth
2 (vert 0 ),(vert 1 ),(vert 2 ) (... ) vertices, edges, polygons, tuples
3 x0,y0,z0 x1,y1,z1 x2,y2,z2 coordinates, vert_indexes, matrix floats
... in future will be flaxiable levels
... in future will be flexible levels


For dummies:
Expand Down
2 changes: 1 addition & 1 deletion nodes/color/color_in_mk1.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def fprop_generator(**altprops):
class SvColorsInNodeMK1(SverchCustomTreeNode, bpy.types.Node):
"""
Triggers: rgb, hsv, hsl -> color
Tooltip: Generator for Color data from color components.\n\tIn: R,G,B,A / H,S,V,A / H,S,L,A\n\tParams: Choise [RGB]/HSV/HSL, Use Alpha [On]/Off\n\tOut: Color
Tooltip: Generator for Color data from color components.\n\tIn: R,G,B,A / H,S,V,A / H,S,L,A\n\tParams: Choice [RGB]/HSV/HSL, Use Alpha [On]/Off\n\tOut: Color

"""
bl_idname = 'SvColorsInNodeMK1'
Expand Down
2 changes: 1 addition & 1 deletion nodes/color/color_mix.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def color_mix(params, constant, matching_f):
class SvColorMixNode(SverchCustomTreeNode, bpy.types.Node):
"""
Triggers: Colors Math
Tooltip: Mix colors with various methods.\n\tIn: Factor [0.0-1.0], Color A, Color B\n\tParams: Choise ([Mix]/Darken/Multiply/Burn,Add and other)\n\tOut: Color
Tooltip: Mix colors with various methods.\n\tIn: Factor [0.0-1.0], Color A, Color B\n\tParams: Choice ([Mix]/Darken/Multiply/Burn,Add and other)\n\tOut: Color
"""
bl_idname = 'SvColorMixNode'
bl_label = 'Color Mix'
Expand Down
4 changes: 2 additions & 2 deletions nodes/generators_extended/box_rounded.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ def round_cube(radius=1.0, arcdiv=4, lindiv=0., size=(0., 0., 0.), div_type=0, o

class SvBoxRoundedNode(SverchCustomTreeNode, bpy.types.Node):
'''Rounded Box
In: radius, arc div, lin div, Vector Size, div type, ood axis align
Out: Vertices, Poligons
In: radius, arc div, lin div, Vector Size, div type, odd axis align
Out: Vertices, Polygons
'''
bl_idname = 'SvBoxRoundedNode'
bl_label = 'Rounded Box'
Expand Down
2 changes: 1 addition & 1 deletion nodes/generators_extended/super_ellipsoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def sign(x): return 1 if x >= 0 else -1
"SPHERE": [1.0, 1.0, 1.0, 1.0, 1.0, 32, 32],
"CUBE": [1.0, 1.0, 1.0, 0.0, 0.0, 3, 5],
"CYLINDER": [1.0, 1.0, 1.0, 1.0, 0.0, 4, 32],
"OCTOHEDRON": [1.0, 1.0, 1.0, 1.0, 1.0, 3, 4],
"OCTAHEDRON": [1.0, 1.0, 1.0, 1.0, 1.0, 3, 4],
"SPINNING_TOP": [1.0, 1.0, 1.0, 1.0, 4.0, 32, 32],
"CUBIC_CONE": [1.0, 1.0, 1.0, 1.0, 2.0, 32, 32],
"CUBIC_BALL": [1.0, 1.0, 1.0, 2.0, 1.0, 32, 32],
Expand Down
36 changes: 18 additions & 18 deletions nodes/modifier_make/contour2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
("Long_Cycle", "Long Cycle", "Cycle through the shorter lists until match the longest list", 1)]

intersec_mode_items = [
("Circular", "Circular", "Intersecction based on distance (Slower)", 0),
("Poligonal", "Poligonal", "Intersecction dependent from num. of vertices (Faster)", 1)]
("Circular", "Circular", "Intersection based on distance (Slower)", 0),
("Polygonal", "Polygonal", "Intersection dependent from num. of vertices (Faster)", 1)]


def check_dist_to_verts(v, or_verts, or_radius, net, poli_ang_list, poly_ang_cos_list, mask_t):
Expand Down Expand Up @@ -362,10 +362,10 @@ def outside_angles(ang, ang_o, ang_f):
return ang <= ang_o or ang >= ang_f


def on_valid_angle_inter(ang, intersecctions):
def on_valid_angle_inter(ang, intersections):
out_side = True
for i in range(int(len(intersecctions)/2)):
out_side = out_side and outside_angles(ang, intersecctions[2*i][0], intersecctions[2*i+1][0])
for i in range(int(len(intersections)/2)):
out_side = out_side and outside_angles(ang, intersections[2*i][0], intersections[2*i+1][0])
if not out_side:
break

Expand All @@ -381,7 +381,7 @@ def on_valid_angle_connex(ang, net, connex):
return out_side


def create_valid_vert_edges(x, y, z, new_angs, intersecctions, net, connex):
def create_valid_vert_edges(x, y, z, new_angs, intersections, net, connex):
list_vert_x, list_vert_y, list_vert_z = [], [], []
edg_list = []
ed_ind = 0
Expand All @@ -390,14 +390,14 @@ def create_valid_vert_edges(x, y, z, new_angs, intersecctions, net, connex):
last_ang = 0

for ang_local, r, inter in new_angs:
out_side = on_valid_angle_inter(ang_local, intersecctions)
out_side = on_valid_angle_inter(ang_local, intersections)
if out_side and connex > 1:
out_side = on_valid_angle_connex(ang_local, net, connex)

if out_side:
if last_is_inter and inter:
mid_ang = normal_angle(last_ang + (ang_local - last_ang)*0.5)
if not on_valid_angle_inter(mid_ang, intersecctions)or not on_valid_angle_connex(mid_ang, net, connex):
if not on_valid_angle_inter(mid_ang, intersections)or not on_valid_angle_connex(mid_ang, net, connex):
edg_list.pop()

last_is_inter = inter
Expand All @@ -412,7 +412,7 @@ def create_valid_vert_edges(x, y, z, new_angs, intersecctions, net, connex):
if len(inter_list) > 0:
if inter_list[-1][0] and inter_list[0][0]:
mid_ang = normal_angle(inter_list[-1][1] + (inter_list[0][1] + 2*pi - inter_list[-1][1]) * 0.5)
if not on_valid_angle_inter(mid_ang, intersecctions)or not on_valid_angle_connex(mid_ang, net, connex):
if not on_valid_angle_inter(mid_ang, intersections)or not on_valid_angle_connex(mid_ang, net, connex):
edg_list.pop()
else:
edg_list[-1] = (edg_list[-1][0], 0)
Expand Down Expand Up @@ -453,8 +453,8 @@ class SvContourNode(ModifierLiteNode, SverchCustomTreeNode, bpy.types.Node):
min=-1.0, default=1.0e-5,
step=0.02, update=updateNode)

intersecction_handle: EnumProperty(
Copy link
Collaborator

@Durman Durman Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name can't be changed

name="intersecction_handle",
intersection_handle: EnumProperty(
name="intersection_handle",
description="Intersection mode",
items=intersec_mode_items, default="Circular",
update=updateNode)
Expand Down Expand Up @@ -497,12 +497,12 @@ def draw_buttons_ext(self, context, layout):
layout.prop(self, "modeI", expand=True)
layout.prop(self, 'rm_doubles')
layout.prop(self, 'mask_t')
layout.prop(self, "intersecction_handle", expand=True)
layout.prop(self, "intersection_handle", expand=True)
layout.prop(self, "list_match", expand=True)
layout.prop(self, "remove_caps")


def build_net(self, verts_in, edges_in, v_len, radius, poligonal_inter):
def build_net(self, verts_in, edges_in, v_len, radius, polygonal_inter):
'''calculate radial intersections and connexion angles and orientations'''
net2 = []
for j in range(v_len):
Expand All @@ -514,7 +514,7 @@ def build_net(self, verts_in, edges_in, v_len, radius, poligonal_inter):
side_edges_angles(net2, verts_in, edges_in, radius)
# calculate orientation
orientation_angle(net2)
if not poligonal_inter and v_len > 1:
if not polygonal_inter and v_len > 1:
# calculate circular intersections
ciruclar_intersections(net2, verts_in, edges_in, v_len, radius)

Expand Down Expand Up @@ -613,10 +613,10 @@ def get_inputs(self):

return family

def adjust_parameters(self, params, v_len, actual_radius, poligonal_inter, edges_in):
def adjust_parameters(self, params, v_len, actual_radius, polygonal_inter, edges_in):
verts_in, _, vertices, _ = params
parameters = list_matcher([verts_in, vertices], self.list_match)
net = self.build_net(verts_in, edges_in, v_len, actual_radius, poligonal_inter)
net = self.build_net(verts_in, edges_in, v_len, actual_radius, polygonal_inter)
parameters = list_matcher([verts_in, vertices, actual_radius, net], self.list_match)
parameters = [data[0:v_len] for data in parameters]

Expand Down Expand Up @@ -650,7 +650,7 @@ def get_perimeter_and_radius(self, params):
def generate_outlines(self, output_lists, params):
verts_in, _, _, edges_in = params
is_edges_in_linked = self.inputs['Edges_in'].is_linked
poligonal_inter = (0 if self.intersecction_handle == "Circular" else 1)
polygonal_inter = (0 if self.intersection_handle == "Circular" else 1)

v_len = len(verts_in)
edges_in = [i for i in edges_in if i[0] < v_len and i[1] < v_len]
Expand All @@ -659,7 +659,7 @@ def generate_outlines(self, output_lists, params):

for i in range(perimeter_number):

net, parameters = self.adjust_parameters(params, v_len, actual_radius[i], poligonal_inter, edges_in)
net, parameters = self.adjust_parameters(params, v_len, actual_radius[i], polygonal_inter, edges_in)
verts_in, _, actual_radius[i], net = parameters
if is_edges_in_linked and self.remove_caps:
edges_num = adjacent_edg_pol_num(verts_in, edges_in)
Expand Down
2 changes: 1 addition & 1 deletion nodes/object_nodes/object_raycast2.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def sv_init(self, context):
so('SvVerticesSocket', "HitP")
so('SvVerticesSocket', "HitNorm")
so('SvStringsSocket', "FaceINDEX")
# self.inputs[2].prop[2] = -1 # z down # <--- mayybe?
# self.inputs[2].prop[2] = -1 # z down # <--- maybe?

def sv_draw_buttons_ext(self, context, layout):
row = layout.row(align=True)
Expand Down
8 changes: 4 additions & 4 deletions nodes/svg/dimensions_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ def draw_dimension_text(self, dim_loc_a, dim_loc_b, angle, document):
p_format = "{:10."+str(precision)+"f}"
text_svg += p_format.format((dim_loc_b - dim_loc_a).length)
else:
feets = (dim_loc_b - dim_loc_a).length//0.3048
if feets < 2:
feet = (dim_loc_b - dim_loc_a).length//0.3048
if feet < 2:
inches = ((dim_loc_b - dim_loc_a).length/0.0254)
else:
p_format = "{:10.0f}"
inches = (((dim_loc_b - dim_loc_a).length%0.3048)/0.0254)
text_svg += p_format.format(feets)
text_svg += p_format.format(feet)
text_svg += "ft"
p_format = "{:10."+str(precision)+"f}"
text_svg += p_format.format(inches)
Expand Down Expand Up @@ -217,7 +217,7 @@ class SvSvgDimensionNode(SverchCustomTreeNode, bpy.types.Node):

units_real: EnumProperty(
name='Units_real',
description='Dimentions feets or meters',
description='Dimensions feet or meters',
items=enum_item_4(['Metric', 'Imperialistic']),
default='Metric',
update=updateNode)
Expand Down
2 changes: 1 addition & 1 deletion nodes/viz/light_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class SvLightViewerNode(SvViewerNode, SverchCustomTreeNode, bpy.types.Node):
"""
Triggers: lamp light sun
Tooltip: Generate Lamp objects. Properties of lamps in Blender.\n\tIn: Origin, Size, Strength, Color\n\tParams: base name, Collection, Type (Point/Sun/Spot/Area)\n\tExtra: Cast Shaddow, Show cone (N-panel)\n\tOut: Objects
Tooltip: Generate Lamp objects. Properties of lamps in Blender.\n\tIn: Origin, Size, Strength, Color\n\tParams: base name, Collection, Type (Point/Sun/Spot/Area)\n\tExtra: Cast Shadow, Show cone (N-panel)\n\tOut: Objects
"""

bl_idname = "SvLightViewerNode"
Expand Down
2 changes: 1 addition & 1 deletion utils/yaml_parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Limited implementation of reading yaml files. Should be replaced when such
library is available in build-in Python source.
library is available in built-in Python source.
"""


Expand Down