-
Notifications
You must be signed in to change notification settings - Fork 32
Documentation Improvements #525
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
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # lib/buildtools/src/build/__tests__/all.test.ts # lib/lintplugin/package.json # lib/modules-lib/src/tabs/__tests__/useAnimation.test.ts # package.json # yarn.lock
…y it as a dependency
| * Including 0 and 1, there are `num + 1` evenly spaced sample points | ||
| * @return function of type Curve → Drawing | ||
| * @returns function of type Curve → Drawing | ||
| * @example | ||
| * ``` | ||
| * draw_3D_connected_full_view_proportional(100)(t => make_3D_point(t, t, t)); | ||
| * ``` | ||
| */ | ||
| export const draw_3D_connected_full_view_proportional = createDrawFunction( | ||
| 'fit', | ||
| 'lines', | ||
| '3D', | ||
| false | ||
| ); | ||
| export const draw_3D_connected_full_view_proportional = RenderFunctionCreators.draw_3D_points_full_view_proportional; | ||
|
|
||
| /** | ||
| * Returns a function that turns a given 3D Curve into a Drawing, by sampling |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| g: number, | ||
| b: number | ||
| ): Point { | ||
| r = clamp(r, 0, 255); | ||
| g = clamp(g, 0, 255); | ||
| b = clamp(b, 0, 255); | ||
|
|
||
| return new Point(x, y, 0, [r / 255, g / 255, b / 255, 1]); | ||
| } | ||
| export const make_color_point = CurveFunctions.make_color_point; | ||
|
|
||
| /** |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| const mat = [ | ||
| [ | ||
| cthz * cthy, | ||
| cthz * sthy * sthx - sthz * cthx, | ||
| cthz * sthy * cthx + sthz * sthx | ||
| ], | ||
| [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The draw_3D_connected_full_view_proportional function incorrectly renders points instead of connected lines due to a wrong function assignment.
Severity: HIGH
Suggested Fix
In src/bundles/curve/src/drawers.ts, change the assignment for draw_3D_connected_full_view_proportional to point to RenderFunctionCreators.draw_3D_connected_full_view_proportional instead of RenderFunctionCreators.draw_3D_points_full_view_proportional.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: src/bundles/curve/src/functions.ts#L257-L263
Potential issue: The function `draw_3D_connected_full_view_proportional` is incorrectly
assigned to `RenderFunctionCreators.draw_3D_points_full_view_proportional`. As a result,
when a user calls `draw_3D_connected_full_view_proportional`, the system will render a
set of disconnected points instead of the expected connected line segments. This leads
to an incorrect visualization that does not match the function's intended behavior.
PR for a bunch of miscellaneous changes focused mainly around improving documentation.
booleanin the documentation so as not to confuse cadetstscfunctions into two different commandslodashdependency declared@blueprintjs