Could the Free Function API and the Workplane API with the same function names be designed to have consistent parameter interfaces as much as possible?
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
Could the Free Function API and the Workplane API with the same function names be designed to have consistent parameter interfaces as much as possible? Here is a table of inconsistencies between the Free Function API and the Workplane API with the same function names:
|Items|Free Function API|CadQuery Workplane API|
| - | - | - |
|rect|def rect(w: float, h: float) -> Shape:|
def rect(
` `self: T,
` `xLen: float,
` `yLen: float,
` `centered: Union[bool, Tuple[bool, bool]] = True,
` `forConstruction: bool = False,
) -> T:
||circle|def circle(r: float) -> Shape:|def circle(self: T, radius: float, forConstruction: bool = False) -> T:|
|ellipse|def ellipse(r1: float, r2: float) -> Shape:|
def ellipse(
` `self: T,
` `x\_radius: float,
` `y\_radius: float,
` `rotation\_angle: float = 0.0,
` `forConstruction: bool = False,
) -> T:
||box|def box(w: float, l: float, h: float) -> Shape:|
def box(
` `self: T,
` `length: float,
` `width: float,
` `height: float,
` `centered: Union[bool, Tuple[bool, bool, bool]] = True,
` `combine: CombineMode = True,
` `clean: bool = True,
) -> T:
||cylinder|def cylinder(d: float, h: float) -> Shape:|
def cylinder(
` `self: T,
` `height: float,
` `radius: float,
` `direct: Union[Tuple[float, float, float], Vector] = Vector(0, 0, 1),
` `angle: float = 360,
` `centered: Union[bool, Tuple[bool, bool, bool]] = True,
` `combine: CombineMode = True,
` `clean: bool = True,
) -> T:
||sphere|def sphere(d: float) -> Shape:|
def sphere(
` `self: T,
` `radius: float,
` `direct: VectorLike = (0, 0, 1),
` `angle1: float = -90,
` `angle2: float = 90,
` `angle3: float = 360,
` `centered: Union[bool, Tuple[bool, bool, bool]] = True,
` `combine: CombineMode = True,
` `clean: bool = True,
) -> T:
|Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.