I am trying to create a frustum using DXF file with my text editor, but unable to find any good solution or way to create it. If anyone knows and would be obliged to help me find a solution DXF file or an example, that would be a great help. Thank You
A frustum is a 3-dimensional figure. While the DXF file format does contain provisions for coordinates in the Z-direction(3rd dimension), you cannot use it to define a true solid model. There are 3DFACE and 3DSOLID entities available, but they do not give you solid model objects like the IGES or STEP file formats would.
That being said, you have a tremendously large task ahead of you to create a valid DXF file in a text editor. There is a huge amount of header information required in a DXF file for even the simplest shapes.
If you are serious about it, your best bet will be to start with a blank (no entities drawn) DXF file that has been created in a CAD package and use that as your base. Then you can add entities to it as needed. You will need the DXF file specification. I use the R2000 spec since it has all the needed functionality while still being backwards compatible with the largest number of systems.
If you are doing a conic frustum, you will need to investigate the ELLIPSE entity, and if you are doing a pyramidal frustum, you will need the LINE entity. Depending on the level of complexity you want and the version of the DXF spec that you work from, you can also use the SURFACE entity, but in a DXF file, this will just be represented as a series of lines forming a grid(polyface mesh).
You can also use the 3DFACE and 3DSOLID entities, but if you really want solid geometry, you're better off using a 3D file format as mentioned above.
Related
I have a folder with several thousand meshes in .stl format and I'm trying to search the mesh files for the ones that contain a specific feature. The size of the features I'm searching for is fairly consistent between models but the orientation and location is widely variable.
These files were originally made for 3d-printing so if the feature I'm looking for has a cavity then it might be obscured by support columns that are placed in the .stl file itself.
So I guess the question is this: Is there an algorithm for finding a given triangle arrangement or something close to it in a triangle mesh without knowing its orientation or location? Possibly when it might be obscured?
(The features in question are mostly alignment related e.g. specially shaped indents in the model that are used to line up the parts for a multi-part print, some models have shaped cutout holes that extend through the model for alignment purposes. )
I've tried to find out what format Autocad SHX is, but had no luck so far. What kind of format is it actually (I mean like image, vector, a mix of this, else)?
And how can I convert this to say a bitmap image?
A AutoCAD SHX file is a compiled shapefile. Is indicated here you might find it difficult to natively read. Quote:
An SHX file is the compiled machine code version of an SHP ASCII-based shape entities file, which means that programs can process SHX files much more quickly. All of the vector based fonts in AutoCAD, for example, are SHX files.
So, SHX files can be fonts or shape files. There are libraries out there that can work with shape files like the Teigha for .DWG library or ArcView. Interestingly, for ArcView, if you look here it states:
Shapefiles spatially describe geometries: points, polylines, and polygons. These, for example, could represent water wells, rivers, and lakes, respectively. Each item may also have attributes, that describe the items, such as the name or temperature.
I am sure there are other libraries (like FME) that you might possibly use.
Hope this helps.
I would like to know if there is a process to generate camera calibration patterns.
We can use paint or any other graphic tool and set the precise measurements but then we need to hard-code the point positions or create a txt/xml file.
Is there a software that exports the data to a file that we can upload in our software.
What about 3D targets like boxes and/or cubes. Is there a method to generate the correct data points?
Cheers.
For 2D targets such as checkerboards, I used to do it like user469049 describes. Which was quite time consuming. In the end I gave up and created a web tool that does all of the leg work:
https://calib.io/pages/camera-calibration-pattern-generator
I'm using inkscape:
http://dominoc925.blogspot.co.uk/2012/06/create-camera-calibration-chess-board.html
I usually create a pdf file used to print and save files as LaTeX with PSTricks extensions.
The tex file has paths, so for a square it has a \moveto command to set the starting point and it has \line to command to set the next points.
In the dominoc925 example they define black and white squares but I just define the black squares to avoid repeated points.
I have a simple file loader in my code to get the points, just search for the \moveto and \line commands and workout the points from there.
For the 3D targets I treat each patter as one view because I don't have the tools to build a precise 3D target.
So instead of having different views of one patter like in the Matlab toolbox, I treat each detected pattern as a view.
In other words, if you have a 3D object then the target on each face is treated as a independent view.
There is probably a more professional way to do the job but this is my process :)
I hope this helps.
Given a set of 2d images that cover all dimensions of an object (e.g. a car and its roof/sides/front/read), how could I transform this into a 3d objdct?
Is there any libraries that could do this?
Thanks
These "2D images" are usually called "textures". You probably want a 3D library which allows you to specify a 3D model with bitmap textures. The library would depend on platform you are using, but start with looking at OpenGL!
OpenGL for PHP
OpenGL for Java
... etc.
I've heard of the program "Poser" doing this using heuristics for human forms, but otherwise I don't believe this is actually theoretically possible. You are asking to construct volumetric data from flat data (inferring the third dimension.)
I think you'd have to make a ton of assumptions about your geometry, and even then, you'd only really have a shell of the object. If you did this well, you'd have a contiguous surface representing the boundary of the object - not a volumetric object itself.
What you can do, like Tomas suggested, is slap these 2d images onto something. However, you still will need to construct a triangle mesh surface, and actually do all the modeling, for this to present a 3D surface.
I hope this helps.
What there is currently that can do anything close to what you are asking for automagically is extremely proprietary. No libraries, but there are some products.
This core issue is matching corresponding points in the images and being able to say, this spot in image A is this spot in image B, and they both match this spot in image C, etc.
There are three ways to go about this, manually matching (you have the photos and have to use your own brain to find the corresponding points), coded targets, and texture matching.
PhotoModeller, www.photomodeller.com, $1,145.00US, supports manual matching and coded targets. You print out a bunch of images, attach them to your object, shoot your photos, and the software finds the targets in each picture and creates a 3D object based on those points.
PhotoModeller Scanner, $2,595.00US, adds texture matching. Tiny bits of the the images are compared to see if they represent the same source area.
Both PhotoModeller products depend on shooting the images with a calibrated camera where you use a consistent focal length for every shot and you got through a calibration process to map the lens distortion of the camera.
If you can do manual matching, the Match Photo feature of Google SketchUp may do the job, and SketchUp is free. If you can shoot new photos, you can add your own targets like colored sticker dots to the object to help you generate contours.
If your images are drawings, like profile, plan view, etc. PhotoModeller will not help you, but SketchUp may be just the tool you need. You will have to build up each part manually because you will have to supply the intelligence to recognize which lines and points correspond from drawing to drawing.
I hope this helps.
I am trying to find out if its possible at all to write a command line scene parser for 3ds max 2010.
I want to gather some information from the max scene without having to load up the Max studio. I have been informed that its not possible to access the Max API without starting the max studio.
Possible use of my program
C:\myparser.exe "myfile.max" > bonenames.txt
Any help/suggestions/hacks are greatly appreciated :)
Thanks
Most anything is possible with enough time, experience, and resources. But what you are suggesting is generally not feasible unless you:
Have full documentation on the binary file format of 3ds Max 2010, or
Need to extract an exceptionally small amount of information from the scene.
If you are only attempting to extract bone names from the file—and only for actual bone objects instead of arbitrary geometry used as a bone—there is a chance (albeit very slim) that creating many files that differ in very minor ways might allow you perform a binary diff and deduce some patterns from the contents.
For example, save an empty Max scene, then add one bone to it and save that, then rename the bone (using the same number of characters) and save that, then rename the bone to add one character and save that, then move the bone and save that, then add another bone and save that. Then try adding modifiers, or param blocks, or hiding the bone, or moving it to another layer, etc. etc. and see what you get. With luck there might be a sensible pattern among the layers of cruft that you can parse for yourself.