ladybug-tools / spider

:spider_web: 3D interactive analysis in your browser mostly written around the Three.js JavaScript library
http://www.ladybug.tools/spider
44 stars 15 forks source link

Update 2018-02-04 ~ gbXML Viewer ~ edit file preview #80

Closed theo-armour closed 6 years ago

theo-armour commented 6 years ago

@ladybug-tools/spiders

image

gbXML Viewer9 Editor Dev

Concept

GbXML file creation is still a young art and the various apps used to create gbXML data - and their users - may create files that contain errors. It may not always be convenient to go back to the app that created the file to fix the errors.

Viewing and locating errors in a gbXML file using a CAD grogram is not always an easy task.

Typical errors we have seen include

An app that enables easy viewing of gbXML files, helps with locating and highlighting errors, enables fixing the errors and saving the data to a new file could be a useful addition the designer's toolkit.

Notes

This script is based on manipulating XML data. The other scripts in the gbXML Viewer series manipulate JSON data extracted from the XML data.

The difference is due to the new and added intention of being able to save an edited version of the XML data to a new file that apart from the edits contains an identical copy of the original XML data.

Other scripts the Spider repo do create building data and save to the gbXML file format, but do not contain shell or rectangular geometry let alone all the other gbXML elements the original file may have contained.

As of this writing, the way forward is not clear. The JSON format used here - which we call gbJSON - has enabled fast, simple relatively easy coding which has produced scripts with many features at a rapid pace.

There are a number of questions:

The next few releases should begin to provide some guidance in responding to these questions.

Mission

Wish list

More thoughts

Change Log

theo-armour commented 6 years ago

@ladybug-tools/spiders

Full screen: gbXML Viewer9 Editor Dev R1.2

Before: surface type is InteriorWall image

After: surface type is Roof image

Still to be done

Change Log

mdengusiak commented 6 years ago

@theo-armour direction this is heading is absolutely brilliant.... this will be used by everyone who are producing and using gbXML format .. absolutely excellent! :trophy: I love selection and zoom in, can not wait for ability to save fixed files locally so can use it ...

theo-armour commented 6 years ago

@mdengusiak

can not wait for ability to save fixed files locally so can use it ...

In R1.2 the 'save edits' actually works: it save your edits to a new XML file using the normal file dialog box. Try it!

mdengusiak commented 6 years ago

@theo-armour this is deafult file... I open file and found issue and fix it adjacency 1 and 2 was the same aim2449 so I changed adjacency 2 to correct one.. I managed to save but when I open saved file in view could not see this fixed see atched export file

aim0016.zip

image

it is still broken one image

theo-armour commented 6 years ago

@mdengusiak

In R1.2 updating and saving only works for surface type.

Adjacencies are for tomorrow. ;-)

mdengusiak commented 6 years ago

this is GREAT!!!!!!

ok I found one example for this image

image

image

and then change to roof and now is image

so it works obviously when we assign to roof, ground floor it automatically should make Adjacency 2 = None as default maybe you can add this ...

mdengusiak commented 6 years ago

I found something else this is AMAZING!!!... my original gbXML file was 48.3 MB when I save after fix is now 23.5 MB I imported to simulation tool and is fixed now image

Also I have much less warnings

orignial file image

after gbXML import from Revit image

after fix gbXML import from Tool image

@theo-armour this is :rocket:

theo-armour commented 6 years ago

@mdengusiak

File size and warnings

The browser is being used to convert the text file to XML. I guess that as it does the conversion it finds and fixes errors and deletes spaces etc.

You might experiment with loading an XML file in your browser and saving it to a new file. I think you will find the same fixing and file size reduction happening.

In any case, this was not my doing but is a really nice side benefit.

mdengusiak commented 6 years ago

@theo-armour definitely and also normals are fixed as well.... compare to Revit export

mdengusiak commented 6 years ago

@theo-armour can we add filter s so can quickly find surface with issue by typing in addition to scrolling and fix quickly image

theo-armour commented 6 years ago

@ladybug-tools/spiders

image

gbXML Viewer9 Editor Dev

Looks like we have the beginning of a gbXML Editor

Should this functionality be added to the current Viewer or should this fork into a new stream?

Change Log

mdengusiak commented 6 years ago

This is over the top...

can we update ProductName text :pencil: when we Save Edits gbXML? we need to be proud and put stamp :)

From : <ProductName>Autodesk Revit 2018 BEES</ProductName> to: <ProductName>Autodesk Revit 2018 BEES updated by Ladybug Tools Spider gbXML Viewer on 2018.02.07 </ProductName>

image

theo-armour commented 6 years ago

@mdengusiak

Awesome idea!

The editor is not creating files (yet) so maybe it might be better to add a 'modified' element

http://gbxml.org/schema_doc/6.01/GreenBuildingXML_Ver6.01.html#LinkD1 http://gbxml.org/schema_doc/6.01/GreenBuildingXML_Ver6.01.html#Link15B

Would that be OK?

mdengusiak commented 6 years ago

@theo-armour sure as long it is our mark :bookmark: is there