Skip to content
Open
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
f6ff723
Try to cycle through overlapping entities
rcarmo May 3, 2025
165dda1
Debugging tasks
rcarmo May 4, 2025
30bd0b5
Add safe_batch_for_shader wrapper to correctly handle parameters
rcarmo May 4, 2025
f91fb44
Revert "StateOps: Push an undo step if OP finishes from preselection"
hlorus Feb 18, 2025
b0b6fb3
[Ui] Change icon name
hlorus Mar 3, 2025
eda9ee6
go deeper on batch_for_shader replacement
rcarmo May 4, 2025
42c529b
2 more batch_for_shader replacements
rcarmo May 4, 2025
0c33451
correctly handle box selection coordinates (they're 2D, not 3D...)
rcarmo May 4, 2025
a5ce841
Make sure workplanes are rendered to the selection buffer
rcarmo May 4, 2025
714b3dc
Try to prioritize occluded workplane edges (and allow workplanes to b…
rcarmo May 4, 2025
479dda3
tweak tolerances
rcarmo May 4, 2025
2cc1e1f
Tweak tolerances
rcarmo May 4, 2025
c073d78
Bonus: unregistration logging to catch errors during frequent restarts
rcarmo May 4, 2025
a238ab2
Linux testing
rcarmo May 5, 2025
e7b1079
linux: change loading order foor 4.4.1
rcarmo May 5, 2025
4646366
handle case where preferences are not yet defined (like when debugging)
rcarmo May 5, 2025
8efe77b
tweak launch tasks
rcarmo May 5, 2025
929ea51
color constants
rcarmo May 5, 2025
f4b8e69
Create mock preferences object for fallback
rcarmo May 5, 2025
125305f
constant cleanup
rcarmo May 5, 2025
1ef413c
selection and drawing constants
rcarmo May 5, 2025
33ee68a
more constant cleanup
rcarmo May 5, 2025
302412b
More constant shuffling (remove circular import)
rcarmo May 5, 2025
93f0b9a
Better handle unregistration so it doesn't crash upon debugger reload
rcarmo May 5, 2025
afacd7f
Remove workplane selection by plane
rcarmo May 5, 2025
0710a92
Try to handle unregistration better for debugging scenarios
rcarmo May 5, 2025
8710b8c
refactor: shader handling, instrumentation, selection workflow
rcarmo May 5, 2025
bcb0f8d
shared data: group items and helpers
rcarmo May 5, 2025
0fa3940
tasks: fix Blender not syncing to debugger
rcarmo May 5, 2025
ee86353
imports: hoist
rcarmo May 5, 2025
1f01dbe
imports: hoist
rcarmo May 5, 2025
2174e0f
imports: keep inline
rcarmo May 5, 2025
6b09465
refactor: move recalc_pointers to data_handling
rcarmo May 5, 2025
245de38
imports: hoist
rcarmo May 5, 2025
dcf3b9b
imports: hoist
rcarmo May 5, 2025
f9f0142
refactor: selection behavior
rcarmo May 5, 2025
af94fa2
refactor: move make_coincident to data_handling
rcarmo May 5, 2025
08f5d8b
shaders: use dedicated to type
rcarmo May 5, 2025
d372e04
refactor: break out solver constants
rcarmo May 5, 2025
2a5266e
refactor: replace solver constants
rcarmo May 5, 2025
ba418f1
refactor: replace solver constants
rcarmo May 5, 2025
d3368c1
refactor: replace solver constants
rcarmo May 5, 2025
e666ace
refactor: replace solver constants
rcarmo May 5, 2025
1cceaec
refactor: replace solver constants
rcarmo May 5, 2025
fd0a33a
refactor: replace solver constants
rcarmo May 5, 2025
c14e7bf
refactor: replace solver constants
rcarmo May 5, 2025
2dd561b
refactor: missed an import
rcarmo May 5, 2025
791be1f
fixes: typos, hoisted imports that generate loops
rcarmo May 5, 2025
d2ea427
refactor: hunt down and kill to_list's evil twin, typos
rcarmo May 5, 2025
eb8ad86
cleanups: global state
rcarmo May 5, 2025
7636d2f
revert: global_data handling
rcarmo May 5, 2025
3f32c4a
revert: more obvious global_data handling
rcarmo May 5, 2025
170d570
refactor: use safe variants
rcarmo May 5, 2025
8d7ce0a
logs: debugging
rcarmo May 5, 2025
58d7c86
icon manager: checks and fallbacks
rcarmo May 6, 2025
6dfd976
workplanes: do not render in sketch
rcarmo May 6, 2025
ffd2220
constants: hoist
rcarmo May 6, 2025
782ce19
typo
rcarmo May 6, 2025
92387e4
workplane: clarify visibility/rendering logic.
rcarmo May 8, 2025
c670d47
workplanes: ensure edges are not drawn inside sketch
rcarmo May 17, 2025
41628dc
select: add logging
rcarmo May 17, 2025
8a9706f
select: add logging
rcarmo May 17, 2025
671ac24
Merge branch 'fix/50' of github.com:rcarmo/CAD_Sketcher into fix/50
rcarmo May 17, 2025
f415978
select: overlapping lines work
rcarmo May 17, 2025
809b8b8
select: cleanup logging
rcarmo May 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions model/workplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ def draw(self, context):

def draw_id_face(self, context, shader):
"""Draw only the face of the workplane to the selection buffer"""
# Selectability check removed, handled by caller (draw_selection_buffer)
# if not self.is_selectable(context):
# return
# Check if workplane should be shown in selection buffer when inside a sketch
active_sketch = context.scene.sketcher.active_sketch
if active_sketch and active_sketch.wp != self:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workplane is a 3d element so it should never be drawn when a sketch is active

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not, I think. I split those out into two separate calls but didn't update the comments... Can you see it in the selection buffer?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes i still see the black square in the selection buffer when a sketch is active

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest push should fix that. I made the logic a bit more explicit. But I still need to go back and validate that overlapping selections work and hoist a few more constants.

# Don't draw workplane in selection buffer if we're in a sketch
# that isn't based on this workplane
logger.debug(f"draw_id_face({self.slvs_index}): Skipped due to active sketch")
return

batch = self._batch # Assuming face uses the same batch for ID
if not batch:
Expand Down Expand Up @@ -129,9 +133,13 @@ def draw_id_face(self, context, shader):

def draw_id_edges(self, context, shader):
"""Draw only the edges of the workplane to the selection buffer"""
# Selectability check removed, handled by caller (draw_selection_buffer)
# if not self.is_selectable(context):
# return
# Check if workplane should be shown in selection buffer when inside a sketch
active_sketch = context.scene.sketcher.active_sketch
if active_sketch and active_sketch.wp != self:
# Don't draw workplane in selection buffer if we're in a sketch
# that isn't based on this workplane
logger.debug(f"draw_id_edges({self.slvs_index}): Skipped due to active sketch")
return

batch = self._batch
if not batch:
Expand Down