How to visualizing .stp file in 3d using OpenCascade? - cad

I have read the .stp files using OpenCascade library, but I am not able to visualize it. How to use OpenCascade library to visualize (render) the .stp file.

Open CASCADE is shipped with a Qt sample named "IESample". It demonstrates how to import and export STEP and IGES files and how to visualize them. The method Translate::displayShSequence(...) in Translate.cxx adds shapes to an interactive context and updates the viewer.

F3D is using OpenCascade to visualize .stp files, you can take a look at:
https://github.com/f3d-app/f3d/

Related

Can't use custom 3D model for visualization

I'm using the Modelica.Mechanics.MultiBody.Visualizers.FixedShape to render custom 3D models. I tried using .dxf and .stl in ASCII format but none works.
For .dxf I get no error but the model doesn't show up.
For .stl I get an error saying there is no plugin for that file type.
Please see the highlighted portions in the above image. OpenModelica supports adding an external shape using the format shapeType=modelica://<Modelica-name>/<relative-path-file-name>. Preferably create a Resources folder in the same level under the library folder and add dxf files in them. The following animation shows the same. Hope this helps!

visualize n-triple file python

Is there a module or tool in Python that will help me visualize RDF data?
I have a N-Triple file and want to load it in python and display the information in it visually. I am currently using RDFLib but it does not have a visualize function. Thank you.
The way I found was to convert my N-Triples file into a json file using (under input field - copied my entire n-triple file and pasted it there): http://rdf-translator.appspot.com/
Afterwards, I input the json-ld file content on this web to generate the visual graph: https://json-ld.org/playground/ -> Go at the bottom of the page and clicked on the Visualized button.
how the graph looks
Consider this tool I found very useful and user-friendly:
Ontology Visualization

Does anyone know how to download the Three.js converted file using Autodesk View and Data API?

I am trying to use the WEBGL(three.js) file translated through REST api using Autodesk view and Data API.
But, I am not able to download the streaming JSON file, does any one knows about this?
If you need only a specific mesh, you may try as described here: http://adndevblog.typepad.com/cloud_and_mobile/2015/05/viewer-api-search-dwg-solids-by-layer.html and check the following line (that gets the three.js mesh)
var mesh = viewer.impl.getRenderProxy(viewer, fragIdsArray[0]);
And you check this sample for a full download: http://extract.autodesk.io/

Java converter from kml/shapefile to Geojson

I would like to write a command line program using Java that take in KML/Shapfile and output GeoJSON file.
What I usually did is go over ogre2ogre and manually convert my file.
Once I got the GeoJson I modified the content of it a little bit before output final GeoJSON.
I would like to skip the manual part and find some API that do the conversion for me.
Anyone could help please.
Thanks
OSMBonusPack provides a KML+GeoJSON toolkit, with both a KML parser/writer and a GeoJSON parser/writer, all in Java.
So this allows to read KML content, and write it as GeoJSON.
You can test this conversion using the demo app OSMNavigator.
It is targeting Android, so for your need you would have to pick the relevant classes, and remove code sections you don't need (icon loading, overlay building, Parcelable implementation, for instance).

Converting and downloading geospatial data

I'm running NodeJS and MongoDB on a linux cloud server.
I need to give my users data in a variety of formats:
Shapefile (shp)
Autocad (dxf)
Excel
(xls/xlsx)
It would also be nice to be able to generate Word (.docx/.doc) files.
Any suggestions?
For an AutoCAD API, http://www.opendesign.com/ is the cheapest way. There may be other DXF libraries out there but I doubt they are as refined as the ODA or the official AutoCAD SDK.
Search the AutoCAD tag for more Q&As on DWG & DXF SDKs.

Resources