WebDec 20, 2024 · wmayer wrote:From the cut object you can access its view provider with "ViewObject" and this has the attribute DiffuseColor.To this assign a list of triples of floats where the number of triples must match with the number of faces. Important is … WebAug 28, 2024 · public static object GetPropValue (object src, string propName) { return src.GetType ().GetProperty (propName).GetValue (src, null); } but you'll get much more new problems than you'll solve. The main is: you don't know the type of the value. It doesn't matter in Javascript, but you cannot say the same about C#.
FreeCAD: Your own 3D parametric modeler
WebOct 10, 2011 · Code: Select all import Part, FreeCAD, math, PartGui, FreeCADGui from FreeCAD import Base # pick selected objects, where 1st selection is the trajectory and the 2nd is the section to sweep s = FreeCADGui.Selection.getSelection() try: shape1=s[0].Shape shape2=s[1].Shape except: print "Wrong selection" return # create … WebSep 2, 2024 · FreeCAD is extensible by Python code that is run directly in the Python console, or that is loaded from modules at startup. This means that you can modify FreeCAD without needing to recompile the program. For example, you can: Create and modify geometry: you can create a new object type, either from scratch or by adapting … jan filip archeolog
FreeCAD.ActiveDocument.getObjectsByLabel Example
WebFeb 27, 2024 · The selection submodule is part of the FreeCADGui module. Example: import FreeCADGui sel = FreeCADGui.Selection.getSelection() addSelection (FreeCAD.Object) Description: Adds an object to the selection. Returns: clearSelection ([string]) Description: Clears the selection of the given document name. If no document … Webdef addSelection(self,doc,obj,sub,pnt): Obj=FreeCAD.getDocument(doc).getObject(obj) if self.beam==None and Obj.TypeId=='Part::FeaturePython' and hasattr(Obj,'Height'): … WebNome. The addObject function has two basic string arguments.. The first argument indicates the type of object, in this case, "Part::Box". The second argument is a string that defines the Name attribute. If it is not provided, it defaults to the same name as the class of the object, that is, "Part__Box", where the two invalid symbols, the colons ::, are replaced by two … lowest price for shingles shot