What should happen when features is about to be applied outside the body?

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
poserge
Posts: 58
Joined: Mon Apr 06, 2015 4:06 am

What should happen when features is about to be applied outside the body?

Postby poserge » Sun Feb 26, 2017 4:17 am

Hi,

I'm trying to fix #2808 and I have a question on proper behavior of the PD tools such as Mirror/Linear pattern/Multitransform - what should happen if feature outside of Body is selected and PD tool applied to it? Should it should the same dialog box as if there's no active body? Or should it show xref/copy/independence copy dialog?
Same question applies to Fillet/Chamfer tools - these tools don't even complain about inactive body, they just apply and sit below the selected feature.

Thanks.
C++ beginner, willing to help FC with coding. Using FC for converting/decomposing STEP models into iges.
User avatar
Kunda1
Posts: 640
Joined: Thu Jan 05, 2017 9:03 pm

Re: What should happen when features is about to be applied outside the body?

Postby Kunda1 » Sun Feb 26, 2017 12:19 pm

poserge wrote:I'm trying to fix #2808

if you're trying to fix issue #2808 it wouldn't it seem better to work in the forum thread the ticket references? viewtopic.php?f=19&t=18721
DeepSOIC
Posts: 4507
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: What should happen when features is about to be applied outside the body?

Postby DeepSOIC » Sun Feb 26, 2017 12:55 pm

It's a hard question on what it should and shouldn't. It's a question of supporting or dropping legacy (body-less) workflow. There is no consensus on the question, hence all the variation of behavior across PartDesign tools.

I'd recommend you borrow the go-nogo code from PartDesign Pad, and reproduce it for the rest of the features (datums, primitives, patterns, fillets, and so on).
poserge
Posts: 58
Joined: Mon Apr 06, 2015 4:06 am

Re: What should happen when features is about to be applied outside the body?

Postby poserge » Wed Mar 01, 2017 6:07 am

Kunda1 wrote:if you're trying to fix issue #2808 it wouldn't it seem better to work in the forum thread the ticket references? viewtopic.php?f=19&t=18721

Sorry. Since it applies to other transformed features as well I thought I'd rather open new thread on this.

I have one more question on workflow - there's a dialog box asking if I want to migrate automatically or manually. If I select Manually, document is marked as Modern even though I've never done anything. There are lot of places in code where AssureModernWorkflow and DetermineWorkflow are called many times in a row, and if I click Manually once, document considered Modern by those tools and they proceed as if the document is all right even though it is not.
What if selecting Manually would leave document in Undetermined state?
I know Pad and some other features let user create different types of copies of the features that are not in active body. But they are not checking if the feature is not in any of the bodies in file.

Thanks,
Sergo.
C++ beginner, willing to help FC with coding. Using FC for converting/decomposing STEP models into iges.
ickby
Posts: 2431
Joined: Wed Oct 05, 2011 7:36 am

Re: What should happen when features is about to be applied outside the body?

Postby ickby » Wed Mar 01, 2017 6:14 am

poserge wrote:Hi,

I'm trying to fix #2808 and I have a question on proper behavior of the PD tools such as Mirror/Linear pattern/Multitransform - what should happen if feature outside of Body is selected and PD tool applied to it? Should it should the same dialog box as if there's no active body? Or should it show xref/copy/independence copy dialog?


I think we should not import features from outside the body for tools like transforms. My Idea with the shape binder and imported references was to import helper geometry only, things that can be used as kind of references like sketches, curves or certain herlper features as faces or edges. But not whole solids. IMHO pattern tools should only work on things withing the body.

Same question applies to Fillet/Chamfer tools - these tools don't even complain about inactive body, they just apply and sit below the selected feature.

That is of course a bug. They should only work on features in the body and handle the active body as the other tools, e.g. Pad.

What if selecting Manually would leave document in Undetermined state?

Yes it should, and only a manual trigger of convertion should change that state.
poserge
Posts: 58
Joined: Mon Apr 06, 2015 4:06 am

Re: What should happen when features is about to be applied outside the body?

Postby poserge » Mon Mar 06, 2017 5:39 am

Hi,

I've changed the way workflow is checked in the Primitive, ProfileBased, Transform and Dressup features. It does not allow to add any of these features if document is not in modern workflow mode.
Also I've added new checks to ensure Transform and Dressups only applied to single selected objects in the active body.

Here's the pull request
C++ beginner, willing to help FC with coding. Using FC for converting/decomposing STEP models into iges.
ickby
Posts: 2431
Joined: Wed Oct 05, 2011 7:36 am

Re: What should happen when features is about to be applied outside the body?

Postby ickby » Mon Mar 06, 2017 6:16 am

Hello,

this looks good. I did not compile and test, but the changes seem very reasonable. Thanks for making the tools more consistant.