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
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
- I feel rotate both is the correct answer, but maybe add as a checkbox to skip the shapeCatalog
- what do we do here ? rotate both or just one ?
- 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
Update 15.07.22:
How to get started
git clone git@github.com:vegarringdal/ProteusXMLDrawing.git
orhttps://github.com/vegarringdal/vegarringdal/ProteusXMLDrawing
cd vegarringdal/ProteusXMLDrawing
npm install
npm start
<- dev server during development
- Currently @ 21b24b51 Release v2.10.2 ++ latest commit (20 sept - 2022)
- https://gitlab.gnome.org/GNOME/libxml2/-/commit/e2bae1bc049f7ffac9c35eefa33f8a00d4032170
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.
xmlvalidate.js - Apache License 2.0
- https://github.com/openscd/xmlvalidate.js/blob/main/LICENSE
- my fork - https://github.com/vegarringdal/xmlvalidate.js
I get icons from these amazing sites
- https://tabler-icons.io/ (MIT license)
- https://heroicons.com/ (MIT license)