/ProteusXMLDrawing

Experiment in generating ProteusXMLDrawing/Dexpi

Primary LanguageHTMLGNU General Public License v3.0GPL-3.0

ProteusXMLDrawing

Experiment on trying to take dexpi xml and convert to drawing using Paper.js

Also been expanded into adding validation with LibXml2 and id list.

No files is uploaded to any third party - all work is done in the browser - important so anyone can use without beeing worried

Feel free to open a discussion if you have ideas/question

demo link

msedge_YnH2klOIdm

Info/issues/missing/notes :

  • filled "shape/circle/ellipse, will probably have issues with "hatch" filltype
    • do we have any samples of this ? xml and pdf?
  • hidden layers? (atm I dont show text on layers that contains word "hidden")
  • text alignment atm looks like 100% ok, I use extent to place it/resize it (update 05.01.2024 -needs more work..)
    • text with extent, extent is used to adjust size
    • if no extent - we just use the location, if height is more then 0 and not the same as width I use it
      • width/height should in teory be the same as extent, but looks like they never are on samples Ive looked at
    • slant text not supported yet...
      • since I havent really seen it, I really dont know how to test if I do it correctly.
  • styled text
    • (not seen these used, need samples to try - this might be hard with papejs..)
  • BsplineCurve
    • (not seen these used, I need samples to try)
  • CompositeCurve
    • (not seen these used, I need samples to try)
  • rotation/scale of items
    • Inverted z axis (flip around y axis) :
    • added a few places, TODO: check xsd file -> 4.1.1 draft.
    • Rotation about the origin : (Hopefully this is fixed now)
    • can shape or lines have rotation ?
      • TODO: check xsd file -> 4.1.1 draft.
    • Equipment with rotation and ref to shapecatalog with rotation,
      • what do we do here ? rotate both or just one ?
        • I feel rotate both is the correct answer, but maybe add as a checkbox to skip the shapeCatalog Reference?
          • Looks like svg converter is not rotating all places.. bug or intended ?
        • I need feedback on whats is the correct way to read it
    • Scaling looks ok on samples Ive found
    • TODO: check xsd file -> 4.1.1 draft.

GUI:

  • improve clicking, need to make a box behind lines/shapes, so its easier to click on
  • should we make click item "selected"?
  • override colors/highlighting ?
  • search for ID/highligh based on ID/tagname ?
  • add excel export of datagrid

Image of progress

C01V01-HEX.EX03.xml

Update 15.07.22:

image

image

image

How to get started

  • git clone git@github.com:vegarringdal/ProteusXMLDrawing.git or https://github.com/vegarringdal/vegarringdal/ProteusXMLDrawing
  • cd vegarringdal/ProteusXMLDrawing
  • npm install
  • npm start <- dev server during development
    • this runs application and opens file in public folder (as seen in images):
      • /TrainingTestCases/tests/C01 the complete DEXPI PnID/C01V01-HEX.EX03.xml

LibXml2 - wasm

License

See license file on root of repo. Code under src is part of this license, see dependencies in package.json for license info about libraries used.

Licenses not in package.json

xmlvalidate.js - Apache License 2.0

Icons

I get icons from these amazing sites