Comments (6)
A nicely detailed example
#89 (comment)
from cad_sketcher.
The context menu (shown below) is a good place to select from [diameter, radius, linear distance radius] as well as [inside display, outside) display].
While we're at it, let's restrict the arrow so that it must touch part of the arc being referenced. (see contrived example below for an "illegal" dimension arrow)
If there's no rush, I'll give this a shot.
from cad_sketcher.
If there's no rush, I'll give this a shot.
Sure thing, if you have questions you can reach out here or on the discord's contribute channel.
from cad_sketcher.
There are two related issues here. The first is radius mode vs diameter mode. This may be an oversimplification, but I think an arc will always be dimensioned by radius. If we check (in _create_shape) isinstance(constr.entity1, class_defines.SlvsArc)
we can go ahead and use the radius mode without any user input. If it's a circle, we would use diameter mode. I have this much working fine, but it doesn't address FR89.
For that, we need display_mode, which should offer three options: Inside (current style), Outside (Feat. Req. 89, Alt. Sol'n. #2), and Distance-style dimensioning (proposed as FR89, Alt. Sol'n #1. (Does this have a name?).
Since the helper lines are calculated in _create_shape(), we need to get draw_style over from the context menu (like with Distance alignment setting) to the gizmo. I'm still struggling with the basics of python and how these Objects communicate state to each other. If you have time to drop me a hint, maybe point out a similar mechanism already in this codebase and explain the pattern?
I'm having trouble using discord, but I'll try to get that fixed soon.
from cad_sketcher.
I would generally advise to try to keep changes small and concentrated rather than trying to implement everything at once.
Regarding deciding which mode to use: That seems alright, that's also something that could easily be added later if needed. IMO we could even always use the radius mode for now as the diameter mode currently clutters the center.
I would suggest as a first step to add a draw_radius (same as the draw_offset) to the angle constraint. Then use this to extend the constraint line outwards, away from the center. With this you will also have to make sure that this property gets updated correctly when dragging the constraint around. Not sure if this is a bit too much to start with but i think it's an important priority. Anyway i'm here to assist.
Regarding the communication of the draw_style and similar properties: Currently they are stored on the actual constraints e.g. in class_defines.py in the SlvsAngle class. Such properties can be displayed with the class's draw_props method. Inside the gizmo you can access the properties with the constr object (e.g. constr.draw_style).
from cad_sketcher.
Closing as duplicate of #155
from cad_sketcher.
Related Issues (20)
- [BUG] Trim between tanget HOT 1
- Cannot create sketch in Blender 4.0 alpha[BUG] HOT 1
- Bevel Tool Supporting Lines For Constrained Points HOT 1
- Documentation lacks important step HOT 2
- Linked Arcs: Redundant Contraints or Inconsistent HOT 1
- [BUG] Trim tool fails at removing second circle intersection HOT 4
- [BUG] Distance constraint 'only measure' alignment non functional HOT 1
- [BUG] Crash on creating sketch HOT 17
- [BUG] Setting Construction through "Selected menu" doesn't redraw the sketch.
- [BUG]Sketcher generated unexpected mesh HOT 1
- [BUG] Constraints are not visible in viewport UI nor in 'Constraints' panel HOT 7
- [BUG] HOT 1
- [BUG] Can't select Arcs HOT 4
- [BUG] Extra lines on my mesh HOT 2
- [BUG] HOT 2
- [BUG] cannot create sketch, no workplane appears HOT 4
- BGS HOT 1
- Zero Length Vector [BUG] HOT 2
- [BUG] mesh generation "inside out" HOT 1
- Angle constraint loosing it's position on switching to/from reference mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cad_sketcher.