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

refactor: Use {affiner} #327

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

refactor: Use {affiner} #327

wants to merge 9 commits into from

Conversation

trevorld
Copy link
Member

@trevorld trevorld commented May 9, 2023

Refactor code to use new WIP {affiner} package

Closes #326

Exported functions re-written to use {affiner} features:

* `AA_to_R()`
* `R_to_AA()`

Internal functions re-written to use {affiner} features:

* `arccos()`
* `at_ps_grob()`
* `pp_cfg()$get_grob_transformation()`

Now superfluous (internal) functions removed:

* `at_get_angle()`
* `at_height()`
* `at_is_flipped()`
* `at_label_face_coords()`
* `at_origin()`
* `at_rotate()`
* `at_shear_sx()`
* `at_trans()`
* `at_translate_to_origin()`
* `at_viewport()`
* `at_vp_info()`
* `at_width()`
* `at_x()`
* `at_y()`
* `cross_matrix()`
* `ppn()`
* `pnp()`
* `npp()`
* `shift_idx()`
* `trace()`
* `transformationGrob()`

progress on #326
`Point2D` now confined to `R/utils-geometry.R`

Internal functions re-written to use {affiner} features:

* `add_bounding_box()`
* `basicPyramidSide()`
* `basicPyramidTop()`
* `d4TopGrob()`
* `d4t_xyz()`
* `d10TopGrob()`
* `d12TopGrob()`
* `d20TopGrob()`
* `get_shapes()`
* `halmaMatGrobFn()`
* `ps_xyz()`
* `pt_xyz()`
* `save_2s_obj()`
* `save_peg_doll_obj()`
* several `Token2S` methods
* `visible_die_faces()`

New helper functions written:

* `npc_to_in()`

progress on #326
Internal functions re-written to use {affiner} features:

* `aabb_piece()`
* `Polygon$op_edge_order()`

New helper functions written:

* `degrees()`
* `as_coord2d.point2d()` and `as_coord3d.point3d()`

Now superfluous (internal) functions removed:

* `Point2D$npc_to_in()`
* `Point2D$translate_polar()`

progress on #326
Internal functions re-written to use {affiner} features:

* `basicDieEdge()`
* `basicEllipsoid()`
* `basicPyramidSide()`
* `d4TopGrob()`
* `d8TopGrob()`
* `d10TopGrob()`
* `d12TopGrob()`
* `d20TopGrob()`
* `generalTokenGrob()`

* `d4_xyz()`
* `d4t_xyz()`
* `d8_xyz()`
* `d8t_xyz()`
* `d10_xyz()`
* `d12_xyz()`
* `d20_xyz()`
* `die_xyz()`
* `ellipse_xyz()`
* `kite_xyz_missing_left()`
* `kite_xyz_missing_right()`
* `ps_xyz()`
* `pt_xyz()`

* `d4t_groobcoords_xyl()`
* `die_grobcoords_xyl()`
* `ps_grobcoords_xyl()`
* `pt_grobcoords_xyl()`

* `xy_vp_convex()`
* `xy_vp_kite()`
* `xy_vp_ps()`

* `FlatEdge$op_grob()`
* `Edge$visible_side()`
* `RingEdge$op_grob_nonperpendicular()`
* `RingEdge$op_grob_perpendicular()`
* `CurvedEdge$op_grob_nonperpendicular()`
* `CurvedEdge$op_grob_perpendicular()`

* `Token2S$initialize()`
* `Token2S$op_edge_order()`
* `Token2S$op_xy_vp()`
* `Token2S$visible_side()`

* `get_die_faces()`
* `visible_die_faces()`

* `CompositePiece()$transform_df()`
* `translate_df()`

* `save_2s_obj()`
* `save_ellipsoid_obj()`
* `save_peg_doll_obj()`

New helper functions written:

* `radius()`

Now superfluous (internal) functions removed:

* `Point2D$c()`
* `Point3D$c()`
* `Point2D$width()`
* `Point3D$width()`
* `Point3D$op_project()`
* `as.data.frame.point2d`
* `as.data.frame.point3d`
* `as.matrix.point2d`
* `as.matrix.point3d`

progress on #326
Internal functions re-written to use {affiner} features:

* `LineSegment$face_matrix()`

Now superfluous (internal) functions removed:

* `Point3D`
* `*.point3d()`

progress on #326
Internal functions re-written to use {affiner} features:

* `CurvedEdge$op_grob_perpendicular()`
* `RingEdge$op_grob_perpendicular()`
* `Circle$initialize()` and `Circle$project()`
* `Polygon$initialize()`, `Polygon$project()`, `Polygon$op_edge_order()`, `Polygon$op_edges()`
* `LineSegment$mid_point`, `LineSegment$orthogonal`
* `do_convex_polygons_overlap()`, `does_convex_polygon_overlap_circle`, `do_shapes_overlap()`

Now superfluous (internal) functions removed:

* `Point2D` and `Vector`
* `*.point2d()` and `*.geometry_vector`

progress on #326
Internal functions re-written to use {affiner} features:

* `Token2S$op_edge_order()`
* `Token2S$visible_side()`
* `Edge$visible_side()`
* `visible_die_faces()`

Now superfluous (internal) functions removed:

* `Line`
* `LineSegment$face_matrix()`

progress on #326
* To match upstream change in `{affiner}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor using {affiner}
1 participant