This Frames GH component creates multiple CPlanes visible while in preview, but when baked they appear as square surfaces.
How can I (is it possible) to create multiple CPlanes, but all of them be visible at the same time?
This Frames GH component creates multiple CPlanes visible while in preview, but when baked they appear as square surfaces.
How can I (is it possible) to create multiple CPlanes, but all of them be visible at the same time?
Iāve moved this to the Grasshopper Developer category.
Why?
I want them being created in Rhino without Grasshopper.
It was just weird how they appear in the preview of this component but when baked they look just like surfaces.
Those are Rhino.Geometry.Plane
, you can make as many as you like and output them from your GHPython component.
Yes, Rhino does not have a plane object that can be added to the Rhino document (as far as I know). So David properly just chose to represent/bake them as surfaces instead. If you want to simply render planes via RhinoCommon, youāll need to look into display conduits, or make your own little plane render function/class through CustomDisplay
(i.e. draw three coloured vectors for instance).
Thanks for the reply,
Oh, is that how they are called. I was looking for CPlanes, Coordinate systems. Silly me.
that will take me some time to understand.
CustomDisplay
Constructs a new CustomDisplay instance. You must call Dispose() when you are done with this instance, otherwise the display methods will never be switched off
What does that mean? If I use this constructor on a square surface and I dont use Dispose() at some point, all my surfaces will be CustomDisplay-ed?
I came to that same conclusion.
McNeel, is this planned for Rhino7?
This is kind of an important thing if youāre about to go deeper in parametric design in Rhino (without Grasshopper)
As you can see in Catia, FreeCAD, etcā¦ having a plane is the start of every new model.
Indeed, I tend to use other objects to indirectly define/manipulate planes in Rhino. For instance circles, which have a plane property:
181101_CirclePlane_GHPython_00.gh (4.3 KB)
I suspect youāll find yourself keeping banging your head against stuff like this (dataflow, events, rendering seemingly simple objects etc), thatās all neatly implemented already for you in Grasshopper (through over ten years of development!). So Iād advice to maybe reconsider that trajectory, especially now that Grasshopper and GHPython is a part of vanilla Rhino. Iām curious though, to why you would want/need to ditch GH?
Could you make an exception and allow PMs for the time being?
And yet many things were not thought through completely or were limited by Rhino(Common) missing object types.
I made a few tests with your script, really nice.
I didnāt think you can extract āPlaneā attribute from curves.
I noticed something weird though. When adding polygons and adding them to the script as Rectangles (because thereās no polygon type hint) the plane is not placed in their CoG.
Although, when I connect the polygons to a rectangle container component the rectangles created match the result of the planes.
@pascal, do you think this is a bug? Why is the rectangle created like that?
You canāt, unless they have a property or method for it. Which the Circle structure does (a circle is inherently defined by a plane).
Iām not sure whatās going on in your case (as always, provide files), but Iād guess it might have something to do with the implicit casting Grasshopper does on the fly (āguessingā which type to pass forward and such).
GH.PlaneFromPlanarCurves.gh (1.9 KB)
I simply pass Polygons to your script and I have changed the input type from circle to rectangle.
Apparently the rectangle is created but its area centroid doesnāt coincide to the centroid of the polygon. Which is weird, since both the rectangle and the polygon can be created from two points (one of which is the center)
The second weird thing I notice is if you use Rhino polygon (rectangle) to create that plane, and subsequently you move one of the points in Z direction, thus making the curve non-planar, the plane is still created
I donāt follow, if you want to figure out if an object has a plane, you can check that using hasattr()
:
181106_HasProperty_GHPython.gh (8.4 KB)
Still though, some objects may be converted into objects that have a āplaneā attribute. Like Polygon for example. If it is converted into Rectangle it can have a plane attached to it as well.