sree314 / stepcvt

Generate STL files for 3D printing from STEP files
2 stars 0 forks source link

Support command line options related to part class for CLI #41

Closed ymh1003 closed 7 months ago

ymh1003 commented 8 months ago

Add support for command addpart: jsonfile addpart [partid1] [partid2] that adds parts with id partid1 and partid2 jsonfile addpart --all that adds all parts in the source Add support for command rmpart: jsonfile rmpart [partid1] [partid2] Add support for command editpart that changes the count for the part specified by its part id: jsonfile editpart [partid] -c [count]

redrn commented 7 months ago

I saw there is a CountInfo class. I am not sure if this class is necessary. I just merged choices-ui branch into roy-a7 and the count information in that is a dependent property calculated applying UserChoice to ChoiceEffect, from a default base count.

One of the functionalities of your sub command changes the count of a part directly. Under the Choices framework, I am not sure what is the proper way to achieve the intended operation, or if such operation are even meaningful.

ymh1003 commented 7 months ago

@sree314 , should we keep the CountInfo class or let count be an attribute for PartInfo class? If the CountInfo class is unnecessary, command jsonfile editpart [partid] --count [num] will just override the count attribute of the part.

sree314 commented 7 months ago

The original idea was CountInfo would contain a choice that changes the .count property of PartInfo. This would allow different counts for different choices.

I think for now, let's handle the common case of a fixed count per object. @redrn says something about a default base count, so maybe editpart --count should change that?