X3d model not Loading using Inline, error in x3dom.js - x3d

I am very new to x3dom, I am trying to display a 3d model on the web. I created the model in FreeCAD, exported to wrl format, and then converted to x3d using whitedune. Most of my models are displaying, but sometimes randomly) it just keeps on showing Loading and nothing happens.
In the below example, the first model works. Then I make slight modifications and again create a new x3d file, but it doesn't display.
https://www.dropbox.com/s/zz99d1snxnvl2yh/working.x3d?dl=0 (working)
https://www.dropbox.com/s/inf3k5jxp4qra2p/notWorking.x3d?dl=0 (Not Working)
Looking in the console, the error I get is
'Uncaught TypeError: Cannot read property 'r' of undefined' in line 3848 of x3dom.js.
Here's the js file I am using
https://www.dropbox.com/s/2pblpt563v5adx9/x3dom.js?dl=0

All of these links report 404 (not found).
Usually the reason something does not load in X3DOM is the X3D code is trying to access a resource from a different server the the parent HTML. The best solution is to make sure that you use only local or relative paths (no protocol, no host, no domain) to those resources. If that still does not solve the problem please expand with working URLs.

Related

CakePHP only localises part of the page

Locally everything is working. But when I create a container and push it to cloud parts of website don't get localized. So far have no idea why as there are no errors thrown.
What is the best way to figure this out?
I checked the po files and they look OK.

Inline many x3d files

I am trying to load many x3d files in a single HTML file using Inline. Some of the scenes load normally but others hang on Loading. It seems there is a limit in the total number of scenes that could be rendered in a single HTML file.
Is this true? Is there any solution to this problem? I want to display as much scenes as needed.
Here is the Link to the example folder where I am calling "Deer.x3d" files several times inside the HTML file.
This example was viewed using Firefox. Using Interned Explorer or Chrome might not work since they don't allow loading local files.
Tested your page also in x_ite which gives better error messages in console. Browsers has limitation in creating WebGL objects like framebuffers. If you create 100 X3D browser within a html page 100 frambuffers or other objects must be created, which are not supported by all browsers.
A better solution is to create preview images of your x3d scenes and on click, or what ever you prefer, open a X3D browser.

RDLC External Image works in ASP.NET but not in WPF

I have lots of RDLC reports in an ASP.NET app, many generated dynamically (manual manipulation of .rdlc XML file).
Many have external images (EnableExternalImages=true, full https://... url of image passed to report as a parameter).
Reports and images work fine in ASP.NET app (via ReportViewer control).
I am now building a WPF app that uses the same code to generate PDF files from the .rdlc reports.
For the most part the reports work just fine in both ASP.NET and WPF. Both use LocalReport.Render("PDF") to generate a PDF file. The only exception is where external images are used - the report does not seem to be able to render external images in WPF. If I replace the external image with an embedded image it works fine. The URL is definitely correct in the WPF app (works if pasted into browser).
I have tried http and https, and "run as administrator" - same results. The actual error message is typically unhelpful and just seems to be a generic "something wrong" message ("The subreport 'Subreport1' could not be found at the specified location Custom1. Please verify that the subreport has Page 1").
Any ideas?
Doh! As usual the problem was my own stupid mistake, made worse by unhelpful error messages.
LocalReport.Render("PDF", ..., out warnings) has a version that includes an output parameter for Warnings which in this case gave me a precise reason for the malfunction: EnableExternalImages was NOT set as I thought (test all your ASSumptions!) (why don't they show this message in the report instead of the useless generic message, would have saved me a lot of time!).
EnableExternalImages turned out to be set in aspx markup, and not in the RDLC generator code, thus it worked in ASP.NET but not in WPF. I now set it in the code and it works in both apps as expected.
I have read many posts about external images not working in PDF - they definitely work just fine in PDF (and Word), at least with Microsfot.ReportViewer2015.Runtime v12.0.2.2402. What often does not work however is displaying the images in IE in the online (in-browser) preview of the report - half the time they show and half the time they do not show, but they always show in the PDF.

Getting images with HTTP Request in C

I am writing a program in C that acts like a proxy server in a Linux system: Client asks it for a web page,
it sends an HTTP GET Request to a distant server, and it gets the servers response (web page), which is saved in an .html file.
Here goes my problem: Most web sites got some references to images, so when i try to view the .html file proxy created, the images don't appear.
I have searched a lot, but found nothing..Is there a way to write some code to GET images too?
Thank you in advance
You're going to have to write code that parses the HTML file you get back and looks for image references (img tags), then queries the server for those image files. This is what web browsers are doing under the hood.
You have an additional problem though which is that the image references in the HTML file are to the original server. I'm assuming that since they don't load for you the server that returned the original HTML isn't available. In that case after you get each image file you will need to give it a name on the local filesystem and then alter the reference in the HTML (programmatically) to point to your new local image name.
So for example:
<img src='http://example.com/image1.png'>
would become
<img src='localImage1.png'>
If you're querying arbitrary websites then you'll also find that there are various other files you'll need to do the same with like CSS files and JavaScript files. In general its hard to mirror arbitrary web pages accurately - browsers have complex object models they use to interpret web pages because they have to deal with things like CSS and Javascript and you may need to be able to 'run' all that dynamic code to even be sure what files to download from the server (e.g. JavaScript including other JavaScript etc).

Why does extJS give me "Ext.Panel is not a constructor" error in Firebug?

I am working through this extJS tutorial where you type in code into Firebug, press CTRL-Enter and it renders it for you, it worked for the simple example but then I got this error:
Instructions:
What happens:
What else do I need to do to get this example to work as it states it will in the demo?
You need to have ext-all.js (and maybe ext-base.js?) loaded in the page you're testing for this to work. The example isn't working properly for you because the Panel file cannot be located. It doesn't exist because you haven't added it.
Test the Ext.Panel code in firebug at the API site: http://dev.sencha.com/deploy/dev/docs/
You'll see that the desired behavior occurs because the page has all of the proper JS files loaded. Any time you see the message "... is not a constructor" should be an indication that the JS file containing the object has not been loaded into the page.

Resources