Skip to content

Add substitute part from context menu #280

@trevorsandy

Description

@trevorsandy

Subject

Add an option when you right click on the PLI "brick" to add Substitute part, with a dialogue to also change color, scale, camara angels etc.

The aim is to automate the following manually entered meta commands:

0 !LPUB PLI BEGIN SUB 20844c01.dat 15
0 !LPUB PART BEGIN IGN
1 15 -160 -24 20 0 0 1 0 1 0 -1 0 0 powerfunc2distsens-1.ldr
0 !LPUB PLI END
0 !LPUB PART END

image

Environment

Version of LPub3D - 2.3.12
Operating system - All

Solution

Insert, update or remove part substitution meta commands via the PLI part context menu (right-click) with a dialogue to configure the following:

Primary Arguments:

  • Part type,
  • Part colour,

Extended Arguments:

  • Scale
  • Field of View
  • Camera angle latitude
  • Camera angle longitude
  • Part rotation - Using ROTSTEP arguments

NOTE: Extended Arguments are temporarily disabled when LDView 'Single Call' render option is enabled. As this option processes multiple part model files simultaneously (i.e. on a single command call), I have to update the render routine to enable LPub3D to use LDView's CommandLinesList which I have not yet implemented. Until then, it will not be possible to individually apply the extended arguments to each part.
Extended Arguments are enabled for LDView 'Single Call' render option. The graphics below are out of date and will be updated.

PLI part context menu item
Screenshot - 12_06_2019 , 02_27_42

Substitute part dialogue with part lookup dialogue
Screenshot - 12_06_2019 , 02_29_20

...and with colour lookup dialogue
Screenshot - 12_06_2019 , 02_30_37

Part substituted with alternate colour
Screenshot - 12_06_2019 , 02_32_16

Uncheck 'Use multiple file single call' option to enable Extended Arguments
Screenshot - 12_06_2019 , 02_32_57

Context menu item changes slightly when a selected part is already a substitute
Screenshot - 12_06_2019 , 02_33_58

Setting rotation in extended arguments
Screenshot - 12_06_2019 , 02_58_05

Substitute part rotated
Screenshot - 12_06_2019 , 03_32_42

Remove substitute will clear all substitute commands in the current STEP for the selected part
Screenshot - 12_06_2019 , 03_52_34

Remove substitute confirmation dialogue
Screenshot - 12_06_2019 , 03_53_42

PLI returned to original state
Screenshot - 12_06_2019 , 03_54_24

Cheers,

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions