Addons. Tiny CAD makes circle with spare vertex #100813

Open
opened 2022-09-04 12:06:33 +02:00 by Vyacheslav Kobozev · 5 comments

System Information
Operating system: Windows-10-10.0.17763-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.95

Blender Version
Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: blender/blender@bcfdb14560

Short description of error
When you use operation «CCN ressurect circle center» addon produces circle polyline with two points on the same place. It prevents to move origin to the center, when you use «Origin to selected» in the cursor or median mode and it can produce zero polygons when you extrude.

2022-09-04_13-01-16.mp4

**System Information** Operating system: Windows-10-10.0.17763-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.95 **Blender Version** Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: `blender/blender@bcfdb14560` **Short description of error** When you use operation «CCN ressurect circle center» addon produces circle polyline with two points on the same place. It prevents to move origin to the center, when you use «Origin to selected» in the cursor or median mode and it can produce zero polygons when you extrude. [2022-09-04_13-01-16.mp4](https://archive.blender.org/developer/F13458233/2022-09-04_13-01-16.mp4)

Added subscriber: @Vyach

Added subscriber: @Vyach

Added subscribers: @tetha.z, @deadpin

Added subscribers: @tetha.z, @deadpin
CC @tetha.z
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Minimal steps to re-create:

  1. Edit, Preferences, Add-ons, enable "Mesh: tinyCAD Mesh Tools"
  2. File, New, General
  3. Delete cube
  4. Set view (7): Top Orthographic
  5. Add, Mesh, Circle
  6. Edit Mode
  7. Move selected (all points of the circle), x=1, y=-1
  8. Clear selected, then select 3 adjacent verts (I choose South East)
  9. Right click, TinyCAD, CCEN
  10. Select "num verts" to be 8
  11. (Screenshot) New_circle_creation.png
  12. Deslect points, then select 1 of new 8 points
  13. Select linked: Ctrl l
  14. (Screenshot) 8point_circle_with_9_verts.png
  15. Observe the points selected "median point" is not in the centre.

Inspect source code at:
https://projects.blender.org/blender/blender-addons/blame/branch/main/mesh_tiny_cad/CCEN.py

Line 28:

for i in range(num_verts + 1):

The "+1" causes the created circle to overlap the first and last points generated. This has been the case forever.

Changing it to be:

for i in range(num_verts):

The number of points in the generated circle is now correct and the median is now in the centre.
Here is a screenshot demonstrating the fix:
8point_circle_corrected.png

Minimal steps to re-create: 1. Edit, Preferences, Add-ons, enable "Mesh: tinyCAD Mesh Tools" 2. File, New, General 3. Delete cube 4. Set view (7): Top Orthographic 5. Add, Mesh, Circle 6. Edit Mode 7. Move selected (all points of the circle), x=1, y=-1 8. Clear selected, then select 3 adjacent verts (I choose South East) 9. Right click, TinyCAD, CCEN 10. Select "num verts" to be 8 11. (Screenshot) ![New_circle_creation.png](/attachments/7e14f365-b7c5-4434-b84f-f5555926997a) 12. Deslect points, then select 1 of new 8 points 13. Select linked: Ctrl l 14. (Screenshot) ![8point_circle_with_9_verts.png](/attachments/a79e62f0-acf9-486e-8cc7-7566bbde08eb) 15. Observe the points selected "median point" is not in the centre. Inspect source code at: https://projects.blender.org/blender/blender-addons/blame/branch/main/mesh_tiny_cad/CCEN.py Line 28: for i in range(num_verts + 1): The "+1" causes the created circle to overlap the first and last points generated. This has been the case forever. Changing it to be: for i in range(num_verts): The number of points in the generated circle is now correct and the median is now in the centre. Here is a screenshot demonstrating the fix: ![8point_circle_corrected.png](/attachments/e4e5ae69-9999-4f8d-9ff1-d2eb8ab2fa8e)
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#100813
No description provided.