修复 GiDrawUtility 参数校验与规范问题 B7、B9、S1、S3 #66

Closed
home-laptop wants to merge 1 commits from home-lenovo-legion-r9000/fix-gidrawutility-b7-b9-s1-s3 AGit into main
pull from: home-lenovo-legion-r9000/fix-gidrawutility-b7-b9-s1-s3
Collaborator
  • B7: DrawPipe(pCurve, dR) 检查 getStartPoint 返回值,避免未定义点传给 getFirstDeriv。
  • B9: 补充参数校验:
    DrawDish 大直径为 0 时 2*dH/dD 除零;
    DrawCirTorus / DrawRectTorus 小半径不小于大半径时截面半径为负(RectTorus 另校验高度);
    DrawPipe(ptFrom, ptTo, ...) 零长度路径无法扫掠;
    DrawPipe(pCurve, dR) 半径非正。
  • S1: spliteCurve、deleteContainerOfArx 由文件级 static 移入已有的匿名 namespace。
  • S3: DELETE_PTR 宏用 do { } while (0) 包裹,避免与 if/else 搭配时悬垂 else。
- B7: DrawPipe(pCurve, dR) 检查 getStartPoint 返回值,避免未定义点传给 getFirstDeriv。 - B9: 补充参数校验: DrawDish 大直径为 0 时 2*dH/dD 除零; DrawCirTorus / DrawRectTorus 小半径不小于大半径时截面半径为负(RectTorus 另校验高度); DrawPipe(ptFrom, ptTo, ...) 零长度路径无法扫掠; DrawPipe(pCurve, dR) 半径非正。 - S1: spliteCurve、deleteContainerOfArx 由文件级 static 移入已有的匿名 namespace。 - S3: DELETE_PTR 宏用 do { } while (0) 包裹,避免与 if/else 搭配时悬垂 else。
home-laptop added 1 commit 2026-10-25 19:02:37 +08:00
- B7: DrawPipe(pCurve, dR) 检查 getStartPoint 返回值,避免未定义点传给 getFirstDeriv。
- B9: 补充参数校验:
  DrawDish 大直径为 0 时 2*dH/dD 除零;
  DrawCirTorus / DrawRectTorus 小半径不小于大半径时截面半径为负(RectTorus 另校验高度);
  DrawPipe(ptFrom, ptTo, ...) 零长度路径无法扫掠;
  DrawPipe(pCurve, dR) 半径非正。
- S1: spliteCurve、deleteContainerOfArx 由文件级 static 移入已有的匿名 namespace。
- S3: DELETE_PTR 宏用 do { } while (0) 包裹,避免与 if/else 搭配时悬垂 else。
gjm closed this pull request 2026-10-25 19:03:39 +08:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gjm/envi-code#66