Rhino 9 Wip c++ sdk

Hello, Rhino 9 development is progressing well, and to be ready for its release with our plugins, I would like to know if a C++ 9 SDK is already available for Windows, as I know there is one for Mac users. If not, do you know if an SDK will be available before the release of Rhino 9?

Thank you,
Guillaume from the Rhinoterrain dev team

Hi

There will certainly be a Rhino 9 C++ SDK made available in the coming months. The Mac SDK is a work in process and isn’t something you should build a shippable plugin against yet.

Thanks you for your repply.

Hi! Are there any news concerning the R9 C++ SDK?

Thanks Peter

Our goal is to not break to C++ SDK for 9 so your plug-in built against the V8 C++ SDK should continue to work in 9.

As far as when we will have a v9 C++ SDK; this will probably be in a month or two. We are getting close to a phase we call SDK Freeze which requires us to review what we’ve added so far in the WIP with the goal of having an SDK we can ship that we won’t break going forward. Once we have gone through this review and hit SDK freeze we will be shipping a v9 C++ SDK

Thank you very much for the information! I have some customers using my Plugin already with the WIP, so there is compatibility as you describe it.

One thing I noticed: In the WIP there is a renewed Zebra (we discussed it a while ago), great stuff. Since I use a few calls like pipeline**.DrawZebraPreview(…)** it would be very useful to have API access to some of the new parameters as well.

Currently they are in CRhinoZebraAnalysisSettings, would be good if it would contain the new parameters.

Yes, you will have access to these new settings. There will be a new CRhinoIsoDrawEffect class in the C++ SDK that you can twiddle a bunch of new settings on. You can also apply all of these settings to the CRhinoZebraAnalysisSettings if you want. As you can see, we still need to add comments to the code :slight_smile:

enum class IsoDrawMode : unsigned char
{
  None = 0,
  DirectionalLight = 1,
  DirectionalLightXY = 2,
  DirectionalLightXYDots = 3,
  DirectionalLightCameraX = 4,
  DirectionalLightCameraY = 5,
  DirectionalLightCameraXY = 6,
  DirectionalLightCameraXYDots = 7,
  DirectionalLightCameraZ = 8,
  PointLight = 9,
  PointLightCamera = 10,
  CylindricalStatic = 11,
  DirectionalDistance = 12,
  DirectionalDistanceCamera = 13
};

class RHINO_SDK_CLASS CRhinoIsoDrawEffect
{
public:
  CRhinoIsoDrawEffect();
  CRhinoIsoDrawEffect(const CRhinoIsoDrawEffect& other);
  ~CRhinoIsoDrawEffect();

  CRhinoIsoDrawEffect& operator=(const CRhinoIsoDrawEffect& other);

  bool operator==(const CRhinoIsoDrawEffect& other) const;
  bool operator!=(const CRhinoIsoDrawEffect& other) const;

  void SetDrawMode(IsoDrawMode mode);
  IsoDrawMode DrawMode() const;
  void SetUsedBandCount(int count);
  int UsedBandCount() const;
  ON_Color GetBandColor(int index) const;
  bool SetBandColor(int index, const ON_Color& color);

  void SetFrequency(int count);
  int Frequency() const;

  ON_Color GapColor() const;
  void SetGapColor(const ON_Color& color);
  double GapSize() const;
  void SetGapSize(double size);
  double Falloff() const;
  void SetFalloff(double falloff);
  bool DiscardGap() const;
  void SetDiscardGap(bool discard);

  void SetPoint(const ON_3dPoint& point);
  ON_3dPoint GetPoint() const;

  void SetDirection(const ON_3dVector& direction);
  ON_3dVector GetDirection() const;

  void SetRotation(double radians);
  double RotationRadians() const;

  void LoadProfile(const wchar_t* section, class CRhinoProfileContext& pc);
  void SaveProfile(const wchar_t* section, class CRhinoProfileContext&) const;
private:
  IsoDrawMode m_mode = IsoDrawMode::None;
  int m_colorCount = 1;
  int m_frequency = 10;
  ON_Color m_colorGap;
  double m_gapsize = 0.5f;
  double m_falloff = 0.01;
  double m_rotation = 0.0;
  bool m_discardGap = false;
  ON_Color m_colorBand[10];

  ON_3dPoint m_point;
  ON_3dVector m_direction;

  class CRhIsoDrawEffectPrivate* m_private = nullptr;
};

Super, thanks!