Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add object multiple selection support for 3D printing #413

Merged
merged 10 commits into from Aug 31, 2020

Conversation

jane-rose
Copy link
Contributor

No description provided.

@jane-rose jane-rose changed the title Feature add multiselect in 3dp Feature add multiselect in 3D priting Aug 14, 2020
@jane-rose jane-rose changed the title Feature add multiselect in 3D priting Feature add multiselect in 3D printing Aug 14, 2020
@jane-rose jane-rose changed the title Feature add multiselect in 3D printing Feature: add multiselect in 3D printing Aug 14, 2020
@jane-rose jane-rose added the Type: Feature A new feature label Aug 14, 2020
src/app/components/Input/NumberInput.jsx Outdated Show resolved Hide resolved
src/app/components/SMCanvas/Canvas.jsx Outdated Show resolved Hide resolved
src/app/components/SMCanvas/Controls.jsx Outdated Show resolved Hide resolved
src/app/components/SMCanvas/Controls.jsx Outdated Show resolved Hide resolved
src/app/components/SMCanvas/Controls.jsx Outdated Show resolved Hide resolved
src/app/components/SMCanvas/Controls.jsx Outdated Show resolved Hide resolved
src/app/components/SMCanvas/Controls.jsx Outdated Show resolved Hide resolved
src/app/flux/models/ModelGroup.js Show resolved Hide resolved
src/app/flux/printing/index.js Outdated Show resolved Hide resolved
@jane-rose jane-rose force-pushed the feature-add-multiselect-in-3dp branch from 1f9abca to 5629972 Compare August 25, 2020 09:33
dispatch(actions.displayModel());
},

selectMultiModel: (selectedGroup) => (dispatch, getState) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest: implement and trigger refresh in modelgroup.js


selectTargetModel: (model, isMultiSelect) => (dispatch, getState) => {
const { modelGroup } = getState().printing;
const modelState = modelGroup.selectModelById([model], isMultiSelect);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selecteModelById need an modelID, here is an array

getSelectedModel: () => (dispatch, getState) => {
const { modelGroup } = getState().printing;
return modelGroup.selectedModel;
},

getSelectedModelArray: () => (dispatch, getState) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest: we can get modelGroup attributes in connected components directly

@@ -796,23 +837,23 @@ export const actions = {
}
},

selectAllModels: () => (dispatch, getState) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest: modelState is deprecated, map modelGroup attributes to refresh components

@@ -17,6 +18,8 @@ import {
MeshBasicMaterial,
LineBasicMaterial
} from 'three';
// import * as THREE from 'three';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

this.dispatchEvent(EVENTS.UPDATE);
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

detach() {
this.object = null;
// this.object = new Group();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@@ -677,7 +677,7 @@ class Visualizer extends Component {
<Canvas
ref={this.canvas}
size={this.props.size}
modelGroup={this.visualizerGroup}
modelGroup={{ object: this.visualizerGroup }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid re-creation of temporary objects.

Copy link
Contributor

@parachvte parachvte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need fixes:

  • rotation implementation
  • context menu actions
  • relation of ModelGroup and Controls
  • modelState

@parachvte parachvte merged commit 8bd1559 into Snapmaker:master Aug 31, 2020
@parachvte parachvte changed the title Feature: add multiselect in 3D printing Feature: Add object multiple selection support for 3D printing Aug 31, 2020
@jane-rose jane-rose deleted the feature-add-multiselect-in-3dp branch September 10, 2020 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants