I need to make the 3D model which can be expressed in sets of the points. I need to utilize java to ascertain them and convert them into Rhino demonstrate. And, I need to realize how to join those focuses in to surface. I have determined about 512*512 three dimensional points.
I want to know how can I script java to make a model on rhino.(If can’t then is there other way?)
Step by step instructions to join bunches of focuses in to one surface.
Thanks,
Sailaja
Puppet Developer
Hi Sailaja,
I dont think you can run Rhino with java but you could write the geometry to a file and then either manually generate your surface or create a script to do it. Python may be the simplest language to script this assuming you don’t currently know Rhinoscript, Python or C++.
I don’t know if I have understood correctly : I think you are trying to generate a grid of points in 3D space, for instance x and y points with a height z. Are you able to organise these into rows of points in Java and write them in rows to a csv file, e.g format x0_y0_z0,x1_y1_z1, …
if so then it would be fairly easy in Python to:
- iterate through the csv file line by line
- split each line into a list of points ptstrings = line.split(",")
- iterate through the line for ptstring in ptstrings:
- split each point x, y, z = ptstring.split("_"), create the point and add it to a list
- create a new curve from the list of points. Add the curve to a list
- loft a surface over the list of curves
Is that what you are trying to do?
1 Like
You can also build a NURBS surface directly with rows/columns of points without having to go through Curves/Loft.
If the points are not organized in rows/columns however, you will not be able to do this. If the points are randomly spaced (such as scan data), you will probably need to create a mesh and not a NURBS surface.
2 Likes