Sneak Peak - Extent Dimensions

Discussions about the development of the TechDraw workbench
User avatar
wandererfan
Posts: 3155
Joined: Tue Nov 06, 2012 5:42 pm

Sneak Peak - Extent Dimensions

Postby wandererfan » Sat Oct 12, 2019 12:57 am

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

Re: Sneak Peak - Extent Dimensions

Postby aapo » 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
User avatar
wandererfan
Posts: 3155
Joined: Tue Nov 06, 2012 5:42 pm

Re: Sneak Peak - Extent Dimensions

Postby wandererfan » Tue Oct 15, 2019 6:40 pm

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: 93
Joined: Mon Oct 29, 2018 6:41 pm

Re: Sneak Peak - Extent Dimensions

Postby aapo » Wed Oct 16, 2019 5:51 am

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
Posts: 3155
Joined: Tue Nov 06, 2012 5:42 pm

Re: Sneak Peak - Extent Dimensions

Postby wandererfan » Wed Oct 16, 2019 4:08 pm

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: 93
Joined: Mon Oct 29, 2018 6:41 pm

Re: Sneak Peak - Extent Dimensions

Postby aapo » Thu Oct 17, 2019 5:42 am

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 661 times
vocx
Posts: 1898
Joined: Thu Oct 18, 2018 9:18 pm

Re: Sneak Peak - Extent Dimensions

Postby vocx » Sun Nov 03, 2019 7:35 am

User avatar
wandererfan
Posts: 3155
Joined: Tue Nov 06, 2012 5:42 pm

Re: Sneak Peak - Extent Dimensions

Postby wandererfan » Mon Nov 04, 2019 12:12 am

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
Posts: 190
Joined: Mon Jul 11, 2016 5:08 pm

Re: Sneak Peak - Extent Dimensions

Postby user1234 » Mon Nov 04, 2019 9:30 pm

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

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

Re: Sneak Peak - Extent Dimensions

Postby wandererfan » Tue Nov 05, 2019 12:13 am

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.