Skip to content

Commit d3fd94e

Browse files
committed
Update tools and satisfy them
Rename 'types' to 'cbtyping'; Rename array to 'series' Fix bug #60 Fix bug #70 Fix bug #63
1 parent 8f29231 commit d3fd94e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+181
-197
lines changed

examples/complex/cyclone/geometry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
)
1717

1818
from classy_blocks.base.exceptions import GeometryConstraintError
19-
from classy_blocks.types import NPPointType
19+
from classy_blocks.cbtyping import NPPointType
2020
from classy_blocks.util import functions as f
2121
from classy_blocks.util.constants import vector_format as fvect
2222

examples/complex/cyclone/regions/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
import classy_blocks as cb
88
from classy_blocks.base.transforms import Transformation, Translation
9+
from classy_blocks.cbtyping import NPVectorType, PointListType, PointType
910
from classy_blocks.construct.point import Point
1011
from classy_blocks.construct.shapes.round import RoundSolidShape
11-
from classy_blocks.types import NPVectorType, PointListType, PointType
1212

1313

1414
class NineCoreDisk(cb.MappedSketch):

examples/complex/cyclone/regions/pipe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from regions.region import Region
66

77
import classy_blocks as cb
8-
from classy_blocks.types import NPPointType
8+
from classy_blocks.cbtyping import NPPointType
99
from classy_blocks.util import functions as f
1010

1111

examples/complex/cyclone/regions/skirt.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
from typing import List, Set
1+
from typing import List
22

33
from regions.region import Region
44

55
import classy_blocks as cb
6-
from classy_blocks.optimize.clamps.clamp import ClampBase
76

87

98
class Skirt(Region):

examples/shape/custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44

55
import classy_blocks as cb
6-
from classy_blocks.types import PointType
6+
from classy_blocks.cbtyping import PointType
77
from classy_blocks.util import functions as f
88

99
# an example with a custom sketch, yielding a custom shape (square with rounded corners);

examples/shape/cylinder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
cylinder.set_start_patch("inlet")
1818
cylinder.set_end_patch("outlet")
1919
cylinder.set_outer_patch("walls")
20-
cylinder.set_symmetry_patch('sym')
20+
cylinder.set_symmetry_patch("sym")
2121

2222
# if curved core edges get in the way (when moving vertices, optimization, ...),
2323
# remove them with this method:

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ src_paths = ["src", "tests"]
3131
[tool.ruff]
3232
target-version = "py38"
3333
line-length = 120
34-
35-
[tool.ruff.lint]
3634
select = ["E", "F", "N", "UP", "YTT", "B", "A", "ARG", "RUF"]
37-
ignore = ["RUF022"]
3835

3936
[[tool.mypy.overrides]]
4037
module = "scipy,scipy.*,parameterized.*"

src/classy_blocks/__init__.py

Lines changed: 62 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -45,96 +45,82 @@
4545
from .optimize.smoother import MeshSmoother, SketchSmoother
4646

4747
__all__ = [
48-
# Base
49-
"Mirror",
50-
"Rotation",
51-
"Scaling",
52-
"Translation",
53-
"Shear",
54-
# curves
55-
"CurveBase",
56-
"DiscreteCurve",
57-
"LinearInterpolatedCurve",
58-
"SplineInterpolatedCurve",
5948
"AnalyticCurve",
60-
"LineCurve",
61-
"CircleCurve",
62-
# edges
63-
"Arc",
64-
"Origin",
6549
"Angle",
66-
"Spline",
67-
"PolyLine",
68-
"Project",
69-
"OnCurve",
70-
# Face
71-
"Face",
72-
# construct operations
73-
"Operation",
74-
"Loft",
75-
"Extrude",
76-
"Revolve",
50+
"Arc",
7751
"Box",
78-
"Wedge",
52+
"CircleCurve",
53+
"ClampBase",
7954
"Connector",
80-
# Sketches
81-
"MappedSketch",
82-
"Grid",
83-
"OneCoreDisk",
55+
"CurveBase",
56+
"CurveClamp",
57+
"Cylinder",
58+
"DiscreteCurve",
59+
"Elbow",
60+
"Extrude",
61+
"ExtrudedRing",
62+
"ExtrudedShape",
63+
"ExtrudedStack",
64+
"Face",
8465
"FourCoreDisk",
66+
"FreeClamp",
67+
"Frustum",
68+
"GeometricFinder",
69+
"Grid",
8570
"HalfDisk",
86-
"WrappedDisk",
87-
"Oval",
88-
"QuarterSplineDisk",
8971
"HalfSplineDisk",
90-
"SplineDisk",
91-
"QuarterSplineRing",
9272
"HalfSplineRing",
93-
"SplineRing",
94-
# construct shapes
95-
"Shape",
96-
"ExtrudedShape",
97-
"LoftedShape",
98-
"RevolvedShape",
99-
"Elbow",
100-
"Frustum",
101-
"Cylinder",
102-
"SemiCylinder",
103-
"QuarterCylinder",
104-
"ExtrudedRing",
105-
"RevolvedRing",
10673
"Hemisphere",
107-
"Shell",
108-
# Stacks
109-
"TransformedStack",
110-
"ExtrudedStack",
111-
"RevolvedStack",
112-
# The Mesh
113-
"Mesh",
114-
# Modification
115-
"GeometricFinder",
116-
"RoundSolidFinder",
117-
"ViewpointReorienter",
118-
# Optimization: Clamps
119-
"ClampBase",
120-
"FreeClamp",
74+
"LJoint",
12175
"LineClamp",
122-
"CurveClamp",
123-
"RadialClamp",
76+
"LineCurve",
77+
"LinearInterpolatedCurve",
78+
"LinkBase",
79+
"Loft",
80+
"LoftedShape",
81+
"MappedSketch",
82+
"Mesh",
83+
"MeshOptimizer",
84+
"MeshSmoother",
85+
"Mirror",
86+
"NJoint",
87+
"OnCurve",
88+
"OneCoreDisk",
89+
"Operation",
90+
"Origin",
91+
"Oval",
12492
"ParametricSurfaceClamp",
12593
"PlaneClamp",
126-
# Optimization: links
127-
"LinkBase",
128-
"TranslationLink",
94+
"PolyLine",
95+
"Project",
96+
"QuarterCylinder",
97+
"QuarterSplineDisk",
98+
"QuarterSplineRing",
99+
"RadialClamp",
100+
"Revolve",
101+
"RevolvedRing",
102+
"RevolvedShape",
103+
"RevolvedStack",
104+
"Rotation",
129105
"RotationLink",
130-
"SymmetryLink",
131-
# Optimization: optimizers and smoothers
132-
"MeshOptimizer",
106+
"RoundSolidFinder",
107+
"Scaling",
108+
"SemiCylinder",
109+
"Shape",
110+
"Shear",
111+
"Shell",
133112
"SketchOptimizer",
134-
"MeshSmoother",
135113
"SketchSmoother",
136-
# Assemblies
137-
"NJoint",
114+
"Spline",
115+
"SplineDisk",
116+
"SplineInterpolatedCurve",
117+
"SplineRing",
118+
"SymmetryLink",
138119
"TJoint",
139-
"LJoint",
120+
"TransformedStack",
121+
"Translation",
122+
"TranslationLink",
123+
"ViewpointReorienter",
124+
"Wedge",
125+
"WrappedDisk",
140126
]

src/classy_blocks/base/element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Dict, List, Optional, Sequence, TypeVar
44

55
from classy_blocks.base import transforms as tr
6-
from classy_blocks.types import NPPointType, PointType, VectorType
6+
from classy_blocks.cbtyping import NPPointType, PointType, VectorType
77

88
ElementBaseT = TypeVar("ElementBaseT", bound="ElementBase")
99

src/classy_blocks/base/transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import dataclasses
55
from typing import Optional
66

7-
from classy_blocks.types import PointType, VectorType
7+
from classy_blocks.cbtyping import PointType, VectorType
88

99

1010
@dataclasses.dataclass

0 commit comments

Comments
 (0)