TechDraw - Multiview Projection Group

Info about new implemented features, classes, modules or APIs. Might get technical!
wandererfan
Posts: 882
Joined: Tue Nov 06, 2012 5:42 pm

TechDraw - Multiview Projection Group

Postby wandererfan » Fri Dec 30, 2016 1:11 pm

The ProjectionGroup feature now rotates the secondary views to match the primary view:
DPG.png
DPG.png (23.47 KiB) Viewed 633 times

DPGRotated.png
DPGRotated.png (25.2 KiB) Viewed 633 times


Also SectionViews based on a subview in a ProjectionGroup should now be drawn with the correct SectionNormal.
DPGwSection.png
DPGwSection.png (21.48 KiB) Viewed 633 times


This new code includes a large number of special cases, so sharpen your bug-reporting pencils.

wf
User avatar
NormandC
Posts: 12066
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: TechDraw - Multiview Projection Group

Postby NormandC » Fri Dec 30, 2016 6:49 pm

Cool! I'll try to find some time to test. :)
CluelessJunk
Posts: 18
Joined: Tue May 31, 2016 9:23 am

Re: TechDraw - Multiview Projection Group

Postby CluelessJunk » Tue Jan 03, 2017 12:25 pm

Amazing, I'll have to look into the code to see how you achieved that!

Two things I noticed:
1) The "Match 3D" button doesn't work anymore - it did work at some point, did it?
2) The section View calculates NaNs for the isometric projections. I'm not sure, how useful that is anyway but still. For some odd reasons, it works for detail views of isometric projections, but I'm not sure if the values are correct.

Another two simple bugs that have been in the code for some time:
1) When you delete a section view (or cancel the creation of one), the section arrows on the base view are still there until you recompute the view.
2) When you add a section view, the arrows indicate a "looking right" default value, but the section view doesn't show anything until you click one of the four buttons.

And I noticed another thing: When you rotate a view, and then create a section view, the arrows not rotated with the view, while the section is in an unrotated state.
Image
wandererfan
Posts: 882
Joined: Tue Nov 06, 2012 5:42 pm

Re: TechDraw - Multiview Projection Group

Postby wandererfan » Tue Jan 03, 2017 2:24 pm

CluelessJunk wrote:Amazing, I'll have to look into the code to see how you achieved that!

Pure, ugly brute force.
CluelessJunk wrote:1) The "Match 3D" button doesn't work anymore - it did work at some point, did it?

This should be the first version that ever worked. But this version only matches the nearest of the 6 cardinal directions (top/bottom/left/right/front/back) Think it does right side up and up side down, too.
CluelessJunk wrote:2) The section View calculates NaNs for the isometric projections. I'm not sure, how useful that is anyway but still. For some odd reasons, it works for detail views of isometric projections, but I'm not sure if the values are correct.

Not surprised, don't think I ever tried this. I'll look into the NaN's.
CluelessJunk wrote:1) When you delete a section view (or cancel the creation of one), the section arrows on the base view are still there until you recompute the view.

Or move the BaseView, or zoom or anything else that causes a screen redraw. Maybe some onDelete code in SectionView...
CluelessJunk wrote:2) When you add a section view, the arrows indicate a "looking right" default value, but the section view doesn't show anything until you click one of the four buttons.

I think we're stuck with this one.
CluelessJunk wrote:And I noticed another thing: When you rotate a view, and then create a section view, the arrows not rotated with the view, while the section is in an unrotated state.

Cool. Not sure how to rotate only some of the things in a view. Will have to look into how this happens.

wf
CluelessJunk
Posts: 18
Joined: Tue May 31, 2016 9:23 am

Re: TechDraw - Multiview Projection Group

Postby CluelessJunk » Tue Jan 03, 2017 4:40 pm

wandererfan wrote:Pure, ugly brute force.
Do you think with the current design its possible to get arbitrarily rotated projections? You told me earlier that the rotation matrix was replaced with simple code, I get the feeling that the "Pure, ugly brute force" could be replaced with elegant, complicated math if the rotation matrix was available.
I don't need arbitrarily rotated secondary views from one front view, but I sometimes need the front view projection to be rotated (and the other of course accordingly).

wandererfan wrote:But this version only matches the nearest of the 6 cardinal directions
The Match 3D button works as you described. Locking to a given axis is actually more useful then an arbitrarily rotated view (because just with the mouse, I wouldn't perfectly match my object anyway).

wandererfan wrote:I'll look into the NaN's.
I'm not sure, if a section of the Isometric projection has a use case. But generating an error Message is better then creating a not-working view.

wandererfan wrote:... or anything else that causes a screen redraw
Hmm, I need a recompute. Moving, zooming, even creating new dimensions doesn't remove the arrows.

edit Is this the supposed Thread for these reports or should I continue in The Big Techdraw Thread?
wandererfan
Posts: 882
Joined: Tue Nov 06, 2012 5:42 pm

Re: TechDraw - Multiview Projection Group

Postby wandererfan » Tue Jan 03, 2017 7:33 pm

CluelessJunk wrote:Do you think with the current design its possible to get arbitrarily rotated projections? You told me earlier that the rotation matrix was replaced with simple code, I get the feeling that the "Pure, ugly brute force" could be replaced with elegant, complicated math if the rotation matrix was available.
I don't need arbitrarily rotated secondary views from one front view, but I sometimes need the front view projection to be rotated (and the other of course accordingly).

No, the ugly version won't support arbitrary directions. It is my admission that I wasn't any closer to an arbitrary direction solution after 3 weeks of working at it. An 80% solution if you will.

I haven't necessarily given up on it, I was just spending too much time going in circles.

As a workaround, try rotating/spinning the object in the 3D space to your arbitrary orientation, then make your ProjectionGroup.
ArbitraryWorkAround.png
ArbitraryWorkAround.png (15.23 KiB) Viewed 443 times


CluelessJunk wrote:Is this the supposed Thread for these reports or should I continue in The Big Techdraw Thread?

This was just an announcement. The big thread is probably best for ongoing discussions.