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

Pretty PLI/BOM annotation #186

Closed
trevorsandy opened this issue Mar 17, 2019 · 2 comments
Closed

Pretty PLI/BOM annotation #186

trevorsandy opened this issue Mar 17, 2019 · 2 comments

Comments

@trevorsandy
Copy link
Owner

trevorsandy commented Mar 17, 2019

Subject

Add LEGO style annotation formatting

Environment

Version of LPub3D - 2.3.7
Operating system - All

Solution

Part List (CSI) Annotation Options
Screenshot - 07_04_2019 , 20_11_42

Display Part List (PLI) Annotation - globally enable or disable annotations or individually enable Title, Free Form, both Title and Free Form, or the new annotation type Fixed, which include axles, beams, cables, connectors, hoses and panels.

Enable Annotation Style - present fine-grained options to enable or disable annotation style for Title, Free Form or Fixed annotations. Title and Free Form annotations uses the Extended style, for BOM parts, the Elements style is used. The remaining styles are used by Fixed annotations. All annotation styles use one of three shape configurations - square, circle, or rectangle. Element and Extended annotation styles use the Rectangle shape configuration. Axle and Panels use the Circle shape configuration and Beams, Cables, Connections, and Hoses uses the Square shape configuration

Default Text Format - present the default annotation text attributes.

Part List (PLI) Annotation Edit Styles
Screenshot - 06_04_2019 , 05_08_41

Select Style to Edit - Each shape configuration can be configured with unique style settings.

Background - Style background color

Border - Style border attributes

Text Format - Style text attributes

Size - Style shape width and height dimensions

The following steps present nominal part list annotation setup and execution flows:
Default settings - no extended annotation style configuration
Screenshot - 06_04_2019 , 05_36_25

PLI annotation - fixed panel and title brick annotations
Screenshot - 06_04_2019 , 05_37_27

Change annotation font context menu
Screenshot - 06_04_2019 , 05_45_11

Font settings
Screenshot - 06_04_2019 , 05_45_34

Local option
Screenshot - 06_04_2019 , 05_45_55

Changed font
Screenshot - 06_04_2019 , 05_46_24

Bill Of Material (BOM) Annotation Options
Screenshot - 07_04_2019 , 20_12_40

Enable Annotation Style - for BOM parts, there is an additional Fixed annotation type, Elements for part element identification annotation.

Bill Of Material (BOM) Annotation Edit Styles
Screenshot - 06_04_2019 , 08_13_25

Select Style to Edit - for BOM parts, there is an additional annotation style, Element. Each shape configuration can be configured with unique style settings.

The following steps present nominal bill of material annotation setup and execution flows:
Bill of materials without annotations
Screenshot - 06_04_2019 , 07_54_42

Menu item
Screenshot - 06_04_2019 , 07_55_08

Annotations options - display default settings without part element identification
Screenshot - 06_04_2019 , 07_55_44

Bill of materials with annotations configured without part element identification
Screenshot - 06_04_2019 , 07_56_36

Annotations options - display default settings with part element identification
Screenshot - 06_04_2019 , 07_57_25

Bill of materials with annotations configured with part element identification
Screenshot - 06_04_2019 , 07_58_01

Annotations edit styles - add border to Element style
Screenshot - 06_04_2019 , 08_11_13

Bill of materials with part element annotation style configured with border
Screenshot - 06_04_2019 , 08_11_42

ADVANCED SETUP
The Part Annotation Style Reference matches LDraw parts to the predefined style round (1) and square(2) with the part category axle(1), beam(2), cable(3), connector(4), hose(5), and panel(6). These values are initially hard coded in LPub3D. However, when Edit Part Annotation Style reference is selected from Configuration, Edit Parameter Files, the reference list is exported to a text file and presented to the user for editing.

For this and other parameter lists, LPub3D's logic will look for an existing disk file, with the appropriate header information and valid regular expression used to import the file contents. If no valid file is found, the hard-coded internal values are used instead.

The framework described above allows users to 'export' and edit the default settings at which point LPub3D will load and use the exported/external settings. Of course it goes without saying that modifying content is this way can be harmful to the smooth running of LPub3D so it is advised to undertake these steps if you are confident about what you are doing.

Here are the steps to export and edit the Part Annotation Style Reference:

NOTE in v2.3.8, the wrong Part Annotation Style Reference regular expression is exported.
Replace line: # The Regular Expression used is: ^([^\t]+)\t+\s*([^\t]+)\t+\s*([^\t]+).*$
With line: # The Regular Expression used is: ^(\b[^=]+\b)=([1|2])\s+([1-6])?\s*([^\s]+).*$

Menu item
Screenshot - 06_04_2019 , 09_19_15

Export status and file location information.
Screenshot - 06_04_2019 , 09_09_08

Exported list automatically opened in LPub3D parameter file editor
Screenshot - 06_04_2019 , 09_15_14

@trevorsandy trevorsandy self-assigned this Mar 17, 2019
@trevorsandy trevorsandy changed the title Pretty PLI annotation Pretty PLI/BOM annotation Mar 17, 2019
@trevorsandy trevorsandy changed the title Pretty PLI annotation Pretty PLI/BOM annotation Mar 17, 2019
@trevorsandy trevorsandy added this to the 2.3.7 milestone Mar 18, 2019
trevorsandy added a commit that referenced this issue Mar 23, 2019
@trevorsandy trevorsandy added this to DONE in LPub3D Maintenance via automation Mar 27, 2019
@jacovandermolen
Copy link

OK, so I am playing around a bit with this feature.
I seem to miss the annotation styles for technic bricks?
Beams and Axles seem fine, but when I want to change the font, LPub3D crashes.

@trevorsandy
Copy link
Owner Author

Hi Jaco,

I've added some content to the initial ticket post that describes this enhancement setup and execution.

Cheers,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
LPub3D Maintenance
  
DEPLOYED
Development

No branches or pull requests

2 participants