How to find IFC Transformation for AxisPlacement..? - axis

i am trying to convert Ifc file to Step file format . for step files i need ifc transformation.
from the IfcClosedShell, i got face points but i need transform this points from IfcAxisPlacement3D (cartesian Point , ref Direction , Axis Direction.)
Matrix for transfer face Points to Original position.

What are you using to parse the IFC and generate geometry? if you're not using anything beyond parsing the STEP file, be aware there are existing libraries out there to do the heavy lifting such as https://github.com/xBimTeam/XbimEssentials

Related

Are there functions for optimizing large STL files for 3D viewing?

Problem Summary: I have large STL files of 3D modeled objects I would like to overlay and compare at specific sections from a CT scan which needs to be analyzed in Solidworks. I was wondering if there were functions or algorithms to 1.) compress the STL file 2.) Eliminate noise across the stl file through a normally distributed elimination(guassian elimination of discrete size callouts?) or lastly 3.) segment an stl file by specifying coordinate volumes to eliminate STL triangles outside of set volumes for smaller file size and specific area based examination of parts.
Attempted solutions: I've tried importing directly to Solidworks which fails - 13 million faces and 39 million vertices. I've tried compressing the resolution in solidworks - doesn't eliminate any triangles. I've tried using meshlab to convert the file to a DXF and import to Solidworks however this still failed and was too time consuming.
I believe there may be a solution using matlab to eliminate vertices and faces outside of the specified volumes as stated above or possibly do some sort of elimination algorithm to clean the "duplicated" similar faces.
You can use MeshLab for this purpose;
Open the STL mesh and use the Simplification: Quadric Edge Collapse filter that will reduce the number of triangles used to define the surface while preserving the original shape.
A simple video tutorial here:
https://www.youtube.com/watch?v=PWM6EGVVNQU

Extracting 2D surface from 3D STEP model

I'm trying to figure out a good way to programmatically generate contours describing a 2D surface, from a 3D STEP model. Application is generating NC code for a laser-cutting program from a 3D model.
Note: it's easy enough to do this in a wide variety of CAD systems. I am writing software that needs to do it automatically.
For example, this (a STEP model):
Needs to become this (a vector file, like an SVG or a DXF):
Perhaps the most obvious way of tackling the problem is to parse the STEP model and run some kind of algorithm to detect planes and select the largest as the cut surface, then generate the contour. Not a simple task!
I've also considered using a pre-existing SDK to render the model using an orthographic camera, capture a high-res image, and then operating on it to generate the appropriate contours. This method would work, but it will be CPU-heavy, and its accuracy will be limited to the pixel resolution of the rendered image - not ideal.
This is perhaps a long shot, but does anyone have thoughts about this? Cheers!
I would use a CAD library to load the STEP file (not a CAD API), look for the planar face with the higher number of edge curves in the face loop and transpose them on the XY plane. Afterward, finding 2D geometry min/max for centering etc. would be pretty easy.
Depending on the programming language you are using I would search for "CAD control" or "CAD component" on Google combining it with "STEP import".

Import Adobe Illustrator bezier coordinates into Processing bezier() function

I'm working on a project where I can take my lettering pieces I do on illustrator with the pen tool and take the bezier point coordinates (curves and all) into processing bezier() function so I can individually manipulate the points with different formulas for animation.
I've tried using Adobe Point Exporter but it seems to only give the x, y coordinates without the curves. I've found a library for processing called Geomerative but I couldn't figure out how to export the coordinates into specific bezier points that I can import into bezier()
Thanks for taking the time to read this!
You can try export lettering into svg format and then use Processing loadShape function to load geometry into varible of type PShape:
https://processing.org/reference/loadShape_.html

Using Haar features for cascade object detector MATLAB

I am trying to use the vision.cascadeObjectDetector (MATLAB) to detect heads from a CCTV footage(and not faces). Till now, I have tried the following:
Used vision.cascadeObjectDetector to detect faces.
trained it to detect a sign (an example shown in read me file)
created a folder with positive & negative training HEAD images & same for testing
tried to create a .mat file using trainingImageLabeler (although it gave me an error when trying to pass it as param to the object detector).
Can someone try to put me in the right track, to start detecting heads using Viola-Jones Haar features please?

exact working of hough transform in matlab

Can anyone guide me how the function 'hough transform' works in matlab?? The problem is that i have an image containing two straight rectangles and one rectangle is tilted at some angle. According to me after applying hough transform; i should get a line structure of 1X6 but i am getting a structure of 1x14. Can anyone help me? I have also uploaded the images:
You can't restrict Hough Transform to give a structure of 1x6.It doesn't produce stabile results.It also doesn't work well when looking further ahead on curved roads. I should not acquire 1x6 structure from each frame.Instead, I should take all returned line segments and use some logic to determine the lane markings.
First of all, your image actually looks slightly blurred. I don't know if it actually is , but if so, you need to run an edge detection algorithm, so your hough transform does not detect the blurred part of the line.
Second of all, you need to reduce the number of detected lines, simply by taking out any lines which does not have enough points going through it. This can be done by thresholding the H variable in [H,t,r]=hough(image).
Additional Sources:
http://en.wikipedia.org/wiki/Hough_transform
http://www.mathworks.com/help/toolbox/images/ref/hough.html