kitjmv
(jmv)
October 21, 2018, 11:02pm
1
Hello,
I can see in the source file that ON::object_type
(C ++) and Rhino.DocObjects.ObjectType
(.Net) is just a direct integer conversion.
so I set the ON::object_type.brepvertex_filter
value to GetObject.GeometryFilter
:
var go = new GetObject ();
go.SetCommandPrompt ("Select");
go.GeometryFilter = (ObjectType) 0x100000;
go.GetMultiple (0, 0);
And this works !
If GetObject.GeometryFilter
is just a wrapper around the c function, why Rhino.DocObjects.ObjectType
can not set a BrepVextex ?
And I have another question.
In .Net, I can not select extrusion vertices with GetObject
.
How can we do that?
Thank you
modulate_texture = 1, // modulate with material diffuse color
decal_texture = 2 // decal
};
// OBSOLETE
static texture_mode TextureMode(int); // convert integer to texture_mode enum
// OBSOLETE
//
/////////////////////////////////////////////////////////////////////////////
//// object_type ///////////////////////////////////////////////////
enum object_type
{
// Use with ON_Object::ObjectType() in situations where
// using a switch() is better than a long string of if else if ...
// if ( ON_Curve::Cast() ) ... else if ( ON_Surface::Cast() ) ...
// ...
unknown_object_type = 0,
point_object = 1, // some type of ON_Point
pointset_object = 2, // some type of ON_PointCloud, ON_PointGrid, ...
curve_object = 4, // some type of ON_Curve like ON_LineCurve, ON_NurbsCurve, etc.
kitjmv
(jmv)
October 22, 2018, 12:29am
2
Note:
With go.GeometryFilter = (ObjectType) 0x100000
, i can not select the extrusion corners.
With go.GeometryFilter = (ObjectType) 0x100000 | ObjectType.EdgeFilter
I have juste borders extrusion.
But with go.GeometryFilter = (ObjectType) 0x100000 | ObjectType.Curve
I have borders ans corners:
(that does not seem normal to me?)
dale
(Dale Fugier)
October 30, 2018, 9:58pm
3
Hi @kitjmv ,
I’m assuming the question is why there is no ObjectType.BrepVertex
enumeration? The reason is that ON::object_type::brepvertex_filter
is not an object type but rather a selection filter. I do agree, however, there should be a way to specify this value.
https://mcneel.myjetbrains.com/youtrack/issue/RH-49202
Extrusions do not have vertices.
– Dale
kitjmv
(jmv)
October 31, 2018, 11:00am
4
Thank you Dale for considering adding this possibility.
Ok, but i do not understand why with GetObject.GeometryFilter = (ObjectType) 0x100000 | ObjectType.Curve
i can select the corners of extrusion ?
dale
(Dale Fugier)
October 31, 2018, 6:15pm
5
Hi @kitjmv ,
Rhino object picker “can” treat extrusions like Breps, since extrusions can be represented as Breps.
– Dale