Autodesk Forge; How to map OBJ to the meta / properties? - autodesk-model-derivative

I have downladed an OBJ file along with meta information and properties, based on an IFC that was uploaded to Autodesk Forge. Question is; How do I map objects in the OBJ to the correct entries in the 'meta' and 'properties'?

Related

Use already uploaded picture in ezpublish Article

In my article datatype, I've an ezimage field which look like that:
http://i.stack.imgur.com/pZGR3.png
I can upload/drag and drop pictures, set a description, it's work fine.
But I can't figured out how to use already uploaded pictures, ma Media Library is full of pictures but I don't know how to use them in my field.. I think and hope there is a way to add this functionality without overriding ezimage datatype.
Do you have any idea ?
If you have Image objects in your Media Library, you should use an Object Relation field in the Content Classes you want to use this object from. You would then be able to browse for images when editing the content.
Multiple images would also work, by using an Object Relation List instead of a single Object Relation.
Which version of eZ are you dealing with here ?

How to create and format an image dataset from scratch for machine learning?

I've only worked with ML with .csv formats. I've worked with image formats too but only premade imagesets (MNIST,etc). If I were to create an imageset from scratch, how are the class labels typically formated? Would I have to manually title the image of a jpeg?
Best, Jeremy
I've worked with image datasets formatted as:
Class Names as Folders : As the name suggests, images belonging to a specific class are filled into the specific folder with the folder name representing the class.
For example for a dataset to classify Cats vs. Dogs
-Dataset/
--Cats/
---all cat images here
--Dogs/
---all dogs images here
Single Folder + Text File : All images are dumped into a single folder - obviously every image file will have a unique name. The key-value pairs of image_name : class can be stored as rows in a csv file.
For example
-Dataset/
--all images heree
--imagename_class.csv
Single Folder with Class in filename : All images can be placed in a single folder with the name of the image having the class label with some changing index value.
For example
-Dataset/
--cat_1.jpg
--cat_2.jpg
--dog_1.jpg
--cat_3.jpg
--...
Hope this helps!

How can I specify a collection as data within a page, rather than pages within a subfolder?

As I understand it, docpad utilizes collections in order to easily group and list files that are slated to be rendered (ex. posts, pages). I have a large list of pdf documents (publications from a journal) that I want to specify as a collection so I can write a script that will collect and post them all onto a single page. As far as I can tell, you can only define metadata once on a collection page, and I don't really want to create 50+ pages for each individual publication.
I'm more familiar with the functionality backbone itself uses to specify collections, but I'm not sure how the two (docpad & backbone) interact.
Docpad uses collections to manage the files within a project, not just those that are slated to be rendered. Files in the "document" directory are those that need to be rendered. Those in the "files" directory are those that do not need to be rendered. Those files are simply copied to the "out" dir. What this means is that you can simply place your pdfs in the files dir. This will add your pdfs to the docpad collection and can be accessed in the docpad.coffee file like this:
collections:
# Create a collection called posts
# That contains all the documents that will be going to the out path posts
posts: ->
#getCollection('documents').findAllLive({relativeOutDirPath: 'posts'},[{date:-1}])
# Create a collection called pdfs
# That contains all the files in the pdf directory that originate in the source
# file directory
pdfs: ->
#getCollection('files').findAllLive({relativeOutDirPath: 'pdfs'})
Then create an eco template page to list the pdf files (I would stick this in the pdf folder under documents).
---
layout: 'default'
title: 'My PDF collection'
---
<ul>
<%pdfcollection = #getCollection('pdfs').toJSON()%>
<%for pdf in pdfcollection:%>
<li><%-pdf.url%></li>
<%end%>
</ul>
If you don't want to have the actual pdf files in your website - just display a list - then you could simply type/copy the list into a document and format it as markdown. Something like this:
---
layout: 'default'
title: 'My PDF collection'
---
* [MyPdf](http://pdf.org/) - Pdf about pdfs
* [MyPdf](http://pdf.org/) - Pdf about pdfs
* [MyPdf](http://pdf.org/) - Pdf about pdfs
* [MyPdf](http://pdf.org/) - Pdf about pdfs
Third possibility, which I haven't tested, if you have a list in a text file and really must convert its contents to a collection within Docpad, I would manually create a collection that is seperate from the docpad file collection and assign it as a property of templateData within the docpad.coffee file. This will make the collection available to any page within your site. In the events section of docpad.coffee create a handler for the renderBefore event and open your list text file, loop through it and add the values in each line to your collection.
fs= require('fs')
renderBefore: (opts,next) ->
fs.readFile file, (err,data) ->
arr = data.split('\r\n')
for line in arr
#add to collection etc...

EmberJS will not load images when paths are stored as model attributes

I have a simple EmberJS app. There are a bunch of images stored in app/images. I can load an image from this folder in any template if I hardcode a path: <img src="images/MYIMAGE.png"/>. These images are associated with records though, and I have paths to them stored as attributes of the records. The path is a computed property from the filename persistent attribute. When I attempt to load the image through an Emblem template with img src="{{path}}", the image does not load. Ember is trying to fetch the image from this url:
http://localhost:9000/images/%3Cscript%20id='metamorph-71-start'%20type='text/x-placeholder'%3E%3C/script%3E%3Cscript%20id='metamorph-71-end'%20type='text/x-placeholder'%3E%3C/script%3E
If it makes a difference, I scaffolded the app with Yeoman and I have Grunt running a ton of preprocessors on my code (the standard ones that come with the Yeoman Ember generator). I thought maybe the images were being renamed, but the fact that I can retrieve them with a hardcoded path suggests otherwise. What's going on?
You need to use {{bind-attr}} for dynamic attributes like that.
<img {{bind-attr src=path}}>
See http://emberjs.com/guides/templates/binding-element-attributes/

Save current bing map view as an image

I am using Ajax Bing maps 7.0 and I'd like to generate an image from the current map view and then upload it somewhere. Is there any way to do this?
depending on how complex your map is (in terms of what data you are showing on it) you are better off using the static map service to generate an image that matches your ajax map:
http://msdn.microsoft.com/en-us/library/ff701724.aspx

Resources