Rhino 8 Feature: Linetype Enhancements

Do we have the ability to set “Model space pattern scale” via Grasshopper or API Methods?

image

By default it seems (on my end) this value is set to 100 on a new document and I want it to be 1 by default.

Dashed lines for instance at 100 scale, a 2" pattern dash will just read continuous.

Setting the Model Space Pattern Scale to 1 and a 2" pattern dash is actually a “real world” 2" pattern dash line repeat.

Thanks!

To come back to the matter here, the Linetypes Document Settings does not look like a finished UI product :

  • Some padding is missing at the bottom of the panel
  • This whole settings window changing sizes regarding the settings displayed is really annoying
  • The fact that all settings are displayed at the top is also annoying

Hi @flixchameroy,

We logged RH-77365 Linetype page needs bottom padding.

Can you send us a screen capture video of what you are seeing?
Are you using Windows or Mac?

Thanks,
Mary Ann Fugier

Hi @michaelvollrath,

We logged feature request RH-77367 Set Model Linetype Scale in Grasshopper

In the meantime, you can use these a GH Python component in your Grasshopper definitions to set the Model Linetype Scale from your Grasshopper definition.

Use the one below that aligns with your Rhino version.
For Rhino 7: LinetypeScaleV7.gh (6.1 KB)
For Rhino 8: LinetypeScaleV8.gh (9.2 KB)

Let us know if these work for you.
Thanks,
Mary Ann Fugier

1 Like

Thank you @mary ! That’s perfect, I’ll test the Python and that should be plenty adequate in the mean time. Much appreciated!

EDIT:
I tested the R8 “LinetypeScaleV8.gh” and it worked perfectly. Thanks @dale

EDIT 2:
I modified the C# script to include the ability to toggle the Enable Model Space Annotation Scaling.

By default I turn this off. I’ve found in working with the new Grasshopper Annotation/Drafting nodes it gets very confusing (to me at least) switching between styles and having scales vary wildly amongst leaders, text, etc. I’m choosing to start everything with a baseline of 1 and then scale everything inside the local Grasshopper components to a scale that makes sense and that I can control easier from within GH

Code here in case anyone wants it:

public class Script_Instance : GH_ScriptInstance
{ 
  private void RunScript(double S, object B)
  {
    //Assign Tooltips
    Component.Name = "Set Document Model Scale";
    Component.NickName = "Model Scale";
    Component.Description = "Set the Rhino document Model Linetype Scale factor. \nThis factor scales all linetypes globally.\n Toggle Model Space Annotation Scaling";

    Component.Params.Input[0].Name = "Linetype Scale";
    Component.Params.Input[0].NickName = "S";
    Component.Params.Input[0].Description = "Set Document Model Linetype Scale Factor \nDefault = 1";

    Component.Params.Input[1].Name = "Enable";
    Component.Params.Input[1].NickName = "B";
    Component.Params.Input[1].Description = "Set True To Enable Model Space Annotation Scaling";

    //Set Document Model Linetype Scale
    var linetypeScale = RhinoDocument.Linetypes.LinetypeScale;
    if (S > RhinoMath.SqrtEpsilon && S != linetypeScale)
    RhinoDocument.Linetypes.LinetypeScale = S;

    //Set Document Model Space Scaling
    Rhino.RhinoDoc.ActiveDoc.ModelSpaceAnnotationScalingEnabled = B;

  }
}

1 Like

Hi Felix -

That’s correct. Settings from the “Technical” display modes can’t be used in “regular” display modes and vice-versa.

The plan is to merge the two different pipelines so that there aren’t any different families.
-wim

1 Like

Hi Michael -

That is a document setting. A quick test of different factory-default templates shows that all of those have that setting set to 1. Perhaps you have a modified template that you use as the start-up template?
-wim

2 Likes

Thanks @wim for confirming! I’m glad to know it’s just a user error on my end. I don’t recall ever modifying a template but I certainly must have at one point.

Thanks, good to know moving forward!

CAD TO RHINO 8 LINETYPE CHANGE

Did you set LineTypeDisplay PatternBySegment=Yes ?