Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all 8532 articles
Browse latest View live

NormalizedLengthParameter for points on curve

$
0
0

@tsiddikee wrote:

NormalizedLengthParameter for points on curve gives zero for each point parameter on curve.
One of past post by @menno, I saw that, I will need to use Curve.RemoveShortSegments(tolarance)
I have used tolarance=0.0001 and also tried with 0.0. It did not work.
What should be the tolerance for Curve.RemoveShortSegments(…) ?

Posts: 2

Participants: 2

Read full topic


BlendCrv RhinoCommon Command

$
0
0

@dks5254 wrote:

I cant seem to find any equivalent for the BlendCrv command except in the c++ sdk. Im looking for some way through the API that I could create the C3 continuous blend curves that the BlendCrv command produces.

While it is possible for me to manually implement this, it would be a bit tedious. Is there any equivalent to this command that can be used in rhinopython or rhinoscript? If not, what are the plans to implement this command, if any?

Posts: 1

Participants: 1

Read full topic

Selection order

$
0
0

@gianfranco74 wrote:

In rhino6 when i use mirror command to have specular copies i see debugging in Add override method that the selected objects are added from the last selected to the first if i use cross selection while they are added from the first to the last if i select them one by one.Is there a way to know what is the right order for all the commands that create copies (for example polararray scale with copyoption ,flow along surface …). thank you

Posts: 1

Participants: 1

Read full topic

How to serialize rhino models?

$
0
0

@804301183 wrote:

I want to serialize the models of a rhino file and store it in a database. In this way, I can restore the model to a new file by reading the serialization from the database. How can I realize it? Thanks.

Posts: 5

Participants: 3

Read full topic

ObjectEnumeratorSettings ClassTypeFilter

$
0
0

@clement wrote:

Hi @dale,

i would like to learn how to use the ClassTypeFilter to filter for specific properties without iteration. Eg filtering ObjectColorSource, UserStrings or geometric properties. I this possible and can i combine filters using ClassTypeFilter ?

_
c.

Posts: 4

Participants: 2

Read full topic

Unroller bug?

$
0
0

@laurent_delrieu wrote:

Hello,
I found a little problem with Unroller class.
If I write that everything is working well

Unroller unroll = new Unroller(brep);
unroll.ExplodeOutput = false;
Curve[] crvs;
Point3d[] pts;
TextDot[] tDots;
Brep[] breps = unroll.PerformUnroll(out crvs, out pts, out tDots);
A = breps;

But if I write that, there is no output in breps ? The number of unrolled breps is OK.

Unroller unroll = new Unroller(brep);
unroll.ExplodeOutput = false;
List breps = new List();
int num = unroll.PerformUnroll(breps);
A = breps;
B = num;

Does I miss something ?

Here a GH script showing the problem
unroller_bug.gh (86.2 KB)

Posts: 1

Participants: 1

Read full topic

Prevent default event action

$
0
0

@victormunoz wrote:

I have managed to intercept some events, like the “Save” messages, in order to run a custom save function.
But I would need also to prevent the default event action. Is this possible?
Does there exist something like in javascript the “event.StopPropagation” function?

Posts: 1

Participants: 1

Read full topic

CRhinoTabbedDockBarDialog start position

$
0
0

@zer41k wrote:

Hello.
I’m trying to adjust the positions of my two CRhinoTabbedDockBarDialog (TAB_0 and TAB_1 at image)
I need to do it in source code.


So the questions are:
  1. TAB_0: Is it possible somehow to find the DockBar with Rhinoceros tab (Layer, properties…) and integrate my TAB_0 in it.
  2. TAB_1: Is it possible to place the DockBar under another one (when both docked to the right). I think I found that it’s impossible for now. But still want to clarify (Position dockbars)

I appreciate any help you can provide

Posts: 1

Participants: 1

Read full topic


Programatically change all existing dimensions styles

$
0
0

@ChristopherBotha wrote:

I have a particularly annoying client that sends us rhino 5 files using a custom dimension style which is enormous (in font terms) and rounds to closest 1mm. none of the rhino commands work to change the style or load another as the default, mm etc are all missing from the document, this requires us to load styles from another rhino file into the currently open one and redimension everything… major PITA…

Other than picking up a phone and whinging at the client… Whats would be the programtic way to find all dimensions in a document, and change them to read XX.XXmm with actual 0.001 accuracy vs the current 1mm accuracy.

found this, but it relies on the other dim styles already being available in the document… I need to to actually change the existing ones parameters.

(I’ll also send command to them , aptly named “FixYourShittyDimStyles.rhp”)

many thanks !

(edit: found this… Ill see how I go… )

Posts: 4

Participants: 2

Read full topic

Error : Create new C++ Plug-in project in Visual Studio 2017

$
0
0

@takehirosakurai wrote:

Hi
I have tried to create some plugins in visual studio 2017 and I downloaded vs2017 and rhino SDK while following tutorials(http://developer.rhino3d.com/guides/cpp/installing-tools-windows/).
However, I got an error showing below when create a new project in VS2017.

Unable to read the project file “test.vcxproj”.
C:\users\t\Desktop\test\test.vcxproj(49,5): The imported project
"C:\users\t\Desktop\test\PropertySheets\Rhino.Cpp.PlugIn.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

I confirmed that .props file is not in test folder. test folder what automatically created has only test.vcxproj file.
How should I deal with it ??

My environment: Win 10, Rhinoceros 6


Takehiro

Posts: 1

Participants: 1

Read full topic

VisualStudio RhinoCommon and .NET

$
0
0

@bjornsyse wrote:

Hi.

Decided to take the step from python scripting to visual studio, but I’m stuck with this error regarding the version of .NET. I’m following this guide http://developer.rhino3d.com/guides/rhinocommon/your-first-plugin-windows/

To resolve this, install the SDK or Targeting Pack for this framework version or retarget 
your application to a version of the framework for which you have the SDK or Targeting 
Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) 
and will be used in place of reference assemblies. 
Therefore your assembly may not be correctly targeted for the framework you intend.	HelloRhinoCommon

I’ve tried to install .NET framework 4.5.2 and 4.7 but to no avail.

Posts: 3

Participants: 2

Read full topic

Disable subset of commands from plugin Rhino 5 C#

$
0
0

@Riccardo_Di_Lorenzo wrote:

Hi everyone!
I’m working on an in-house developed plug-in for Rhino 5, using C#.
We’d like to disable certain commands from our own plug-in, either because they’re not meant for the end user to use or because they don’t ship with our own license.
I’m aware you can hide any command by decorating the Command’s child class with [CommandStyle(Style.Hidden)] (which prevents the autocomplete to show the command’s name), but that doesn’t prevent it to be executed anyway, knowing its name.

I still want the plugin to load and work, so to say, but without said (specific) command.
Any advice?

Posts: 4

Participants: 3

Read full topic

Vector3d.VectorAngle Method implementation

$
0
0

@MClare wrote:

This might be an esoteric question, but I wanted to know what the exact implementation is for the Rhino.Geometry.Vector3d.VectorAngle(Vector3d, Vector3d) method. I know there are a number of ways of calculating the angle between 3d vectors (using arccos or atan2). In 3d space, my vectors are based on a series of 3 points along a curve (so the first vector is V01, and the second is V12).

Based on testing in Grasshopper, I see that the angle is restricted to the 0 to pi range. I’m implementing a similar method in C++ program to try and replicate some results from a grasshopper script, so I’d like to get an implementation as close to the grasshopper definition as possible.

Posts: 2

Participants: 2

Read full topic

Get obj from RhinoDoc without writte in file

$
0
0

@visiado.al.ordenador wrote:

Hi all,
I’m trying to get the obj file from a RhinoDoc to put in string without make a file, I try to see the FileObj.Write sourecode without luck also I try to make a ram file without luck. Anyone know how can I do this?

For now I have this:

Thanks in advance

Posts: 1

Participants: 1

Read full topic

Set UserString on a mesh face

$
0
0

@fthomas wrote:

Hello,
Is there a way to put some UserString on a mesh face?
I can easely get a ON_MeshFaceRef:
ON_MeshFaceRef refFACE = pMESH->FaceRef( 99 );
SetUserString is available on it:
bool bSetUS = refFACE.SetUserString( L"test", “1234” );
returned bSetUS is “true”…
But _GetUserText always returns on faces in the documents…

Any idea/sugestion ?

Cheers,
FT

Posts: 1

Participants: 1

Read full topic


Get an obj object from mesh

$
0
0

@visiado.al.ordenador wrote:

Hi,
I have a mesh and I’d like to convert it to obj in a string all is fine but I need help to make ‘f’ lines in obj for the moment I have this:

> public static String ExtractRenderMesh(Rhino.RhinoDoc doc)
>         {
>             String s = "";
>             Rhino.DocObjects.ObjRef objRef = null;
>             Rhino.Commands.Result rc = Rhino.Input.RhinoGet.GetOneObject("Select surface or polysurface", false, Rhino.DocObjects.ObjectType.Brep, out objRef);
>             if (rc != Rhino.Commands.Result.Success) return s;
>             Rhino.DocObjects.RhinoObject obj = objRef.Object();
>             if (null == obj) return s;
>             System.Collections.Generic.List<Rhino.DocObjects.RhinoObject> objList = new System.Collections.Generic.List<Rhino.DocObjects.RhinoObject>(1);
>             objList.Add(obj);
>             Rhino.DocObjects.ObjRef[] meshObjRefs = Rhino.DocObjects.RhinoObject.GetRenderMeshes(objList, true, false);
>             if (null != meshObjRefs)
>             {
>                 for (int i = 0; i < meshObjRefs.Length; i++)
>                 {
>                     Rhino.DocObjects.ObjRef meshObjRef = meshObjRefs[i];
>                     if (null != meshObjRef)
>                     {
>                         Rhino.Geometry.Mesh mesh = meshObjRef.Mesh();
>                         s += System.Environment.NewLine + " " + i + " " + System.Environment.NewLine;
>                         foreach (Rhino.Geometry.Point3f point in mesh.Vertices)
>                         {
>                             s += "v " + point.X + " " + point.Y + " " + point.Z +System.Environment.NewLine;
>                         }
>                         foreach (Rhino.Geometry.Point2f point in mesh.TextureCoordinates)
>                         {
>                             s += "vt " + point.X + " " + point.Y + " " + System.Environment.NewLine;
>                         }
>                         foreach (Rhino.Geometry.Vector3f point in mesh.Normals)
>                         {
>                             s += "vn " + point.X + " " + point.Y + " " + point.Z + System.Environment.NewLine;
>                         }
>                         if (null != mesh)
>                             doc.Objects.AddMesh(mesh);
>                     }
>                 }
>                 doc.Views.Redraw();
>             }
>             return s;
>         }

Posts: 1

Participants: 1

Read full topic

Rhino 6 Page Zoom

$
0
0

@dimcic wrote:

Hi,

I was wondering how to properly zoom on a particular object following the Add Layout Sample:

and using ZoomExtensSelected or ZoomBoundingBox…because it didnt work at first…I found the solution in another post and I wrote it bellow (if you are dealing with the same problem)…I would suggest to the admins to delete this topic because it kind of already exists…sorry…

Posts: 2

Participants: 1

Read full topic

Efficient Clipping plane method in conduit

$
0
0

@ChristopherBotha wrote:

I need to write a routine that allows my users to grab a bunch of geometry, and waterline it as the mouse moves over the geometry in a z direction. I tried intersect, but if the geometry is not bolleaned it gives strange results and the overhead on 3-400 bits of geometry is high, super sluggish.

clipping plane does what i need, and its very fast, so id like to grab existing geometry, set it to transparent (the easy part) then copy it to conduit, and apply a clipping plane in the conduit, marry clipping plane of the existing geometry, so that the exposed (perhaps bright yellow) conduit clipped geometry shadows the main geometry and effectively provides a fast “waterline”.

Im stumped on how to pull this off, or if its even the best way?

output desired is something along these lines from the b9 creator software.

any thoughts?

Posts: 1

Participants: 1

Read full topic

Specify standard name for Block definition in Python script

$
0
0

@enrico556 wrote:

Hi!
i’m currently writing a script part of which involves creating a block definition using all entities.
I’m using the following command:
rs.Command(’_SelAll _Block 0,0,0’)

The command works fine up until the point that a “Block Definition Properties” window pops up prompting the user to enter details like Name, Description, etc. What command do i use to bypass this and specify a standard name for the group say “ABC”.

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Model serialization

$
0
0

@victormunoz wrote:

Hello,

Is it possible to serialize the whole Rhino 3D model object (the RhinoDoc class I guess) into an string (XML, json, or any format) so that then you can deserialize the string to recover the original object?
(without using WriteFile functions)

Thank you,

Posts: 1

Participants: 1

Read full topic

Viewing all 8532 articles
Browse latest View live