Select Mesh on Three.js - select

do you know how can I select a geometry with Three.js?
ve you never seen something like that?
I searched for many days but all examples I found don't work and are legacy coded. I would have to be able to select a geometry with the mouse and move it like in a drag and drop.. Maybe better select a Mesh, cause there are a lot of composed shapes. It's not fundamental move it with mouse, I can do it with fields, so at least to know where is the feature to select a Geometry, if there is, I couldn't find it.. thanks

http://mrdoob.github.com/three.js/examples/webgl_interactive_draggablecubes.html

If you need to select to color the mesh of the 3D model, use MeshLambertMaterial.js when creating the scene.
http://mrdoob.github.com/three.js/examples/webgl_interactive_cubes.html

Related

How to create a triangular support in CadQuery?

I need to create a right angle with a triangular support, as seen in the example below (which I created in Blender). I know how to create the right angle, but I don't really know how to create the triangular support. The only way that I was able to think of would be to create a 2D polygon that would be the outer face of the object where the support is, then extrude it to the thickness of the support, and then extrude the rest to complete the object. This, however, seems clumsy and against the idea of CQ, where the code should be (kind of) similar to how a human would describe such object.
Is it possible to create the right angle first and then add the support? How?

Terrain's Edges Matching

I load some terrains from my asset bundle, but their edges are not matched together.
I recognize when I edit the terrain in Unity Editor, the problem is solved because the terrains are in the same terrain group (see it here).
So my question is: Can I do it runtime by code? If yes, please tell me how! Many Thanks!
P/S: I know the function TerrainData.SetHeights() and I can match edges of two terrains with this function, but I don't want to do it so manually.

Blender - Intersection between 2 objects deletes part of my first object

I'm making a chess piece (a bishop) and I am trying to make the top notch.
For this purpose, I made a new cube, resized it and put on the place to make the cut.
I want to make a cut using a modifier: Boolean, intersecting the two objects.
The problem I am facing is that while intersecting, the top UV Sphere that simulates the 'hat' of the bishop disappears.
What I did so far:
- Remove Doubles
- CTRL+J to join Bishop+Hat(UV Sphere) to make 1 component
Nothing helped and when trying to intersect, the UVSphere-hat disappears.
Why? How to solve?
Here is the bishop before modifier, with hat:
Here is the .blend file to catch the problem faster:
Thank you for your help :-)
The boolean modifier offers two different solvers that produce different results. You want the intersect operation with the carve solver. You also want to hide the cube that you are using for the intersection otherwise you won't see the hole that it has cut out.
Just to go straight to the point I'll add the reply here and select sambler's excellent answer as right.
In my case the Cube which was going to intersect with the bishop HAD NEGATIVE SCALE.
If you have similar problems, check if your objects scale/parameters have negative parameters

pivot of a 3d model outside its mesh after importing into Unity3d

as you can see, the pivot is outside my mesh. I want to use the pivot for rotating around, for that I need to set the pivot to the real "rotating point". I know that there's the SetPivot script, but it only works with pivots inside meshes.
This mesh is part of an object which contains several meshes, I created it with Wings3d. The problem appears with .obj and .3ds as file extension.
1.How can I fix this?
2.Is there a possibility to define a second pivot which can be used in scripts to "rotate around"(maybe a vector3 which can be set in "Designer")?
I found a youtube vide which might help. I don't know whether it will help though.
Does THIS help?

remove shared edge after the union of two polygons

I have two polygons that are next to each other (left image). After performing a union of the two polygons, I have a single polygon with outlines similar to the left image. What I am looking for is a way to remove the shared edges of the two polygons, as shown on the right. I am working with arcobjects (.net) and arcdesktop 10.1. Hopefully there's a nice built-in method to achieve this. Thanks.
There is indeed a nice built-in method - you're looking for the Dissolve tool.
There is an example in the ArcObjects help, this may help you.
[Creating a union of several polygons]
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/d/00010000009t000000.htm
I got this to work with the Integrate tool. It merges two polygons and remove any two edges that are near each other.