ms-structural / ms-structural/femdesign-api

Refactor FemDesign.Grasshopper.Convert

Open
#398 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

framework:c# framework:grasshopper priority:now
Dominant language
C#
Stars
51
Forks
29
PR merge metrics
No merged PRs in 30d

Description

End goal

Make the conversion from Rhino/Grasshopper geometry to FemDesign.Geometry easier. For C# users and Grasshopper C#/Python users.

Suggestion

Many (but not all) of the FemDesign.Grasshopper.Convert methods are marked as internal so there are no simple conversion from rhino geometry to fd geometry right now.

I suggest we refactor the class FemDesign.Grasshopper.Convert.cs

Originally posted by @xRadne in https://github.com/strusoft/femdesign-api/issues/328#issuecomment-1163210861

Regions

Geometry

Using a single interface-method object IFromRhino(this Rhino.Geometry.GeometryBase geometry)

  • Vector (Using separate method for points and vectors FdPoint3d FromRhino(this Rhino.Geometry.Point3d point))
  • Edge (All OK, except for Polyline and Nurbs curve wich dont have a correcponding type in FemDesign.Geometry.Edge)
  • CoordinateSystem
  • Region
  • RegionGroup
Structure

These objects does not make any sense to have a .FromRhino() method. Only .ToThino()

  • Bar
  • Cover
  • LineLoad
  • PointLoad
  • PressureLoad
  • SurfaceLoad
  • SlabPart
  • LineSupport
  • PointSupport

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with FemDesign.Grasshopper.Convert.cs and review the currently public and internal conversion methods. Compare the listed Geometry and Structure regions, especially the unfinished Edge and load conversions, and confirm which methods should be named ToRhino() or FromRhino(). Done means the proposed conversions are consistently exposed and named for the supported Rhino and FemDesign geometry types.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, computer-graphics
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.