Failure to write edited values into new IFC file in WIT using ExportFileAsIFC using the same code as in the IFC.js Crash Course - ifc

When I attempt to edit an IFCBUILDINGSTOREY name value and write a new IFC file in WIT using the ExportFileAsIFC code from the IFC.js Crash Course IFC editing section, I get an error: Line object cannot be serialized:
Object { expressID: 138, type: 3124254112, GlobalId: {…}, OwnerHistory: {…}, Name: {…}, Description: null, ObjectType: {…}, ObjectPlacement: {…}, Representation: null, LongName: {…}, … } IFCWorker.js:87228:15. The value is definitely changed in the IFC data in the browser console output but it doesn't get written to the new IFC file. I cannot see any difference between my code and the course example code. The problem appears to be that the revised IFC data in the browser console output defines the storey as IFCBUILDINGSTOREY in the IFC.js course video but on my laptop the storey is defined as OBJECT in the browser console output. So I think it literally cannot serialize the non-specific OBJECT.
I have posted the project on my GitHub at https://github.com/quarto-zz/WIT2
Please can anyone tell me what is different?

Looks like a regression in web-ifc#0.0.36. We are looking into it. In the meantime, it should be solved by using the previous version by running the command: npm i web-ifc#0.0.35 web-ifc-three#0.0.118.

Solution found! In discussions with #ansoni on Discord at IFC.js the problem turned out to be two IFC library versions. The Crash Course videos show the library install commands for web-ifc and web-ifc-three as generic, which installs the latest version of each. The current versions of those two libraries cause a couple of issues, including the above problem. At this time, it is important to install the specific versions used in the Crash Course.
npm i web-ifc#0.0.35 web-ifc-three#0.0.118
You can check which versions you have currently loaded in the package.json file.
If you install the correct versions, be sure to replace the wasm and IfcWorker files locally, if you are already using them.
This will solve the above ExportFileAsIFC issue and also a failure to load an IFC file into a WIV scene issue.
The latest versions of these libraries that I had these issues with are:
web-ifc#0.0.36 and web-ifc-three#0.0.121

Related

nbsphinx causes build to fail when building Jupyter Notebooks

Details
I am getting a build failure of my read-the-docs that I don't understand. The assertion of "verbatim" in line 2151 of nbsphinx.py is causing the build failure. So the build fails when I try to include the Jupyter Notebook tutorials I created. I compared current versions of the tutorials to previous versions which had not caused the build to fail, and I can't find a difference that could account for the current failure.
Read the Docs project URL: lofti_gaia
Build URL: https://github.com/logan-pearce/lofti_gaia
Read the Docs username: logan-pearce
Expected Result
A passing build including *.ipynb files
Actual Result
Build failed at line 2151 of nbsphinx.py due to assertion of 'Verbatim' failing.
Terminal output:
Running Sphinx v4.1.2
loading translations [en]... done
making output directory... done
WARNING: html_static_path entry '_static' does not exist
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
processing lofti_gaia.tex... index installation tutorials/QuickStart tutorials/Tutorial api lofti loftitools
resolving references...
done
writing... failed
Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/lofti-gaia/conda/latest/lib/python3.7/site-packages/nbsphinx.py", line 2151, in depart_codearea_latex
assert 'Verbatim' in lines[0]
AssertionError
The full traceback has been saved in /tmp/sphinx-err-x1h83s3m.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
According to the github issue 584 for nbsphinx (https://github.com/spatialaudio/nbsphinx/issues/584), this is due to a compatibility issue with sphinx 4.1.0. It can be gotten around by requiring sphinx version 4.0.2.
So in my requirements.txt file, I included sphinx==4.0.2, after which the build passes. So now my requirements.txt file looks like:
numpy
matplotlib
astropy>=4.0.1.post1
astroquery>=0.4
sphinx==4.0.2
ipython==7.19.0
nbsphinx>=0.8.6
and the build passes.
I have encountered the same issue. I did not solve it with .ipynb format, but converting the jupyter notebook to .rst format works.
May it helps

command line compiling generates bigger file than the online version

I am testing google closure compiler on command line.
I took the latest version :
java -jar closure-compiler.jar --version
Closure Compiler (http://github.com/google/closure-compiler)
Version: v20190618
Built on: 2019-06-21 17:24
I am generating a compressed version of my javascript like this :
java -jar closure-compiler.jar my_script.js > out.js
The problem is that the generated code is bigger than the one I get when I use the online service at https://closure-compiler.appspot.com/home
I noticed that the command line version added, at the beginning, the following code :
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,c,b){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(c.call(b,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,b){a!=Array.prototype&&a!=Object.prototype&&(a[c]=b.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(a,c,b,d){if(c){b=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in b||(b[e]={});b=b[e]}a=a[a.length-1];d=b[a];c=c(d);c!=d&&null!=c&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:c})}};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
I do not have such a code in my script: Where does it come from ?
how can I produce the same output as the online version ?
To get the compiler command line work as the web service, I just added an option :
--language_out=ECMASCRIPT_2015
This is likely a discrepancy between the settings on the web service and the ones you're using locally.
Have a look at a Closure Compiler: Flags and Options to see what settings you might prefer.
If you'd share your source, it'd be possible to try and help you narrow down the options.
As for the extra code, I believe it is at least partially a polyfill for Array.prototype.find (aka [].find), which I assume is in your code?
If so, that's Closure injecting code to improve your cross browser compatibility.

Neo4j spatial server plugin fails on withinDistance and closest java.lang.NoClassDefFoundError

I know that the plugin is being loaded properly, as other methods work such as spatial.procedures and spatial.addNode etc.
The error results after a call like this:
CALL spatial.withinDistance('profile_geo', [43.524, 96.7341], 500)
and the error that results is this:
Failed to invoke procedure `spatial.withinDistance`: Caused by: java.lang.NoClassDefFoundError: org/neo4j/cypher/internal/compiler/v3_0/commands/expressions/GeographicPoint
The same error appears when trying to use the closest function as well. Any help would be appreciated.
It looks that you are missing required Jar for GeographicalPoint class.
Please make sure you have this class in your Jars. I know this class exists in neo4j-cypher-compiler-3.0-3.0.3.jar but it is not going to work for you as it is residing in different namespace. If you will not be able to pinpoint the corresponding Jar in your environment please have a look at Maven repository and try to find it there.
short answer: upgrade to 3.0.3 (both neo4j and plugin)
long answer:
I ran into the exact same issue today. I was running version 3.0.2 with server plugin version 3.0.2 and ran the cypher query:
CALL spatial.withinDistance("spatial_records",{lon:20.0,lat:50.0},100000000)
Joran mentioned in the comments above that the REST API was a working alternative. So I tried that out and found he was indeed correct.
I tested this using httpie, with the following command:
cat tmp.json | http :7474/db/data/ext/SpatialPlugin/graphdb/findGeometriesWithinDistance
where tmp.json looks like:
{"layer" : "spatial_records","pointX" :3.9706,"pointY" : 46.7907,"distanceInKm" :10000000000}
While this works, using CYPHER with stored procedures would be nice. So upon further investigation, I noticed that a recent commit contained the following changes:
- <neo4j.version>3.0.1</neo4j.version>
+ <neo4j.version>3.0.3</neo4j.version>
...
-import org.neo4j.cypher.internal.compiler.v3_0.commands.expressions.GeographicPoint;
+import org.neo4j.cypher.internal.compiler.v3_0.GeographicPoint;
So I ended up downloading version 3.0.3 of both neo4j and the spatial plugin. Whatever the issue was before, seems to be fixed in this version. The call to the stored procedure now works as expected!

trigger.io - Can't create ipa-file anymore

I usually use trigger.io to generate my ipa-Files for iOS. Now when I want to generate the file, I get the following error message:
Failed when running /usr/bin/codesign: codesign_allocate: object: /Users/mherceg/Desktop/ag-app/development/ios/device-ios.app/Forge malformed object (unknown load command 39)
/Users/mherceg/Desktop/ag-app/development/ios/device-ios.app: object file format unrecognized, invalid, or unsuitable
It worked yesterday, but now it doesn't. Any help is very welcome.
Thanks,
enne
This is probably to do with v1.4.16 of our platform, where we switched over to building on Xcode 4.5: I'd recommend upgrading Xcode and make sure the Command-line Tools (Preferences ↦ Downloads) are installed.

CFURLCopyResourcePropertyForKey error when gitk

can someone explain ho to resolve this error:
CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme:
it´s probably caused by xCode when i try to gitk or gitk --all in the Terminal. It started to appear after the Mountain Lion upgrade. Thanks :)
Error screenshot:
I got this error just now and find a solution to solve it.
I was trying to invoke the function getResourceValue:forKey:error: in my project and my os version is 10.7.5.
I init a new NSURL object by using + URLWithString: and the problem occurred before, after I replace it with + fileURLWithPath:, it's ok now.
The difference value between the two objects with different functions is /Volumes/Data/a file://localhost/Volumes/Data/a/
Apple has statemented that about NSURL class below,
Handling Object Creation Failure The NSURL class fails to create a new NSURL object if the path being passed is not well-formed; the path must comply with RFC 2396. Examples of cases that will not succeed are strings containing space characters and high-bit characters. Should creating an NSURL object fail, the creation methods return nil, which you must be prepared to handle. If you are creating NSURL objects using file system paths, you should use fileURLWithPath: or initFileURLWithPath:, which handle the subtle differences between URL paths and file system paths. If you wish to be tolerant of malformed path strings, you’ll need to use functions provided by the Core Foundation framework to clean up the strings.
Error while using getResourceValue:forKey method in NSURL
On Mountain Lion 10.8.2, I fixed this issue when calling gitk from terminal by installing/upgrading tcl and tk.
brew install tcl
brew install tk
The UI of gitk will likely change, but you can tweak that in ~/.gitk.

Resources