Sneak Peak - Extent Dimensions

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Sneak Peak - Extent Dimensions

Post by wandererfan »

This will be along shortly...
HVExtentDims.png
HVExtentDims.png (15.94 KiB) Viewed 2547 times
issue #3004
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Sneak Peak - Extent Dimensions

Post by aapo »

Wow, this looks great! Will extent dimensions be possible at other angles than horizontal and vertical, too (e.g., at 45° angle)? In any case, horizontal and vertical extent dimensions are probably the most important ones, and would imho be a great addition to TechDraw! :D
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Sneak Peak - Extent Dimensions

Post by wandererfan »

aapo wrote: Tue Oct 15, 2019 12:52 pm Wow, this looks great! Will extent dimensions be possible at other angles than horizontal and vertical, too (e.g., at 45° angle)? In any case, horizontal and vertical extent dimensions are probably the most important ones, and would imho be a great addition to TechDraw! :D
Just horizontal/vertical for now. They are cheap to compute (most of the calculations are already done for bounding box).

Diagonal extents will require processing every edge and building effectively a diagonal bounding box. Certainly doable if the demand is there, but it will always be slower than the horizontal/vertical ones.
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Sneak Peak - Extent Dimensions

Post by aapo »

Sounds good to me the way it is now, I probably won't personally need any other extrema than the horizontal and vertical options.

Is the algorithm edge-based or face-based? I mean, will it be possible to just select some edges, and the algorithm shall find their common extrema; or is it based on selecting a face (or the whole drawing), and finding the global extrema?
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Sneak Peak - Extent Dimensions

Post by wandererfan »

aapo wrote: Wed Oct 16, 2019 5:51 am Is the algorithm edge-based or face-based? I mean, will it be possible to just select some edges, and the algorithm shall find their common extrema; or is it based on selecting a face (or the whole drawing), and finding the global extrema?
If you select Edges, you'll get the extent of the collection of edges. If you just select the View, you'll get the extent of all the edges in the View.
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Sneak Peak - Extent Dimensions

Post by aapo »

wandererfan wrote: Wed Oct 16, 2019 4:08 pm If you select Edges, you'll get the extent of the collection of edges. If you just select the View, you'll get the extent of all the edges in the View.
That sounds like a good plan to me. I think it's both intuitive, and makes it possible to do extent dimensions within smaller details of the whole part. There's one case I'd like to bring your attention to, regarding possible future enhancements, which is the situation where the dimension may be required between two local minima, or a local minimum and a local maximum (i.e., not two local maxima). I added the 15 mm dimension in the following made-up example with CosmeticVertex quadrants, but that is obviously not possible with all kind of shapes.

FreeCAD-TechDraw-minima-maxima.png
FreeCAD-TechDraw-minima-maxima.png (16.42 KiB) Viewed 2332 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Sneak Peak - Extent Dimensions

Post by vocx »

Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Sneak Peak - Extent Dimensions

Post by wandererfan »

vocx wrote: Sun Nov 03, 2019 7:35 am Is this now official?
Yes. Lots more code than I originally thought. Might be some corner case tweaking left to do.
user1234
Veteran
Posts: 3345
Joined: Mon Jul 11, 2016 5:08 pm

Re: Sneak Peak - Extent Dimensions

Post by user1234 »

Hello!
wandererfan wrote:
I just want to say, that your work is awsome. TD is now pretty fast.

Greetings
user
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Sneak Peak - Extent Dimensions

Post by wandererfan »

user1234 wrote: Mon Nov 04, 2019 9:30 pm I just want to say, that your work is awsome. TD is now pretty fast.
Thank you for the kind words.
Post Reply