
GetSubObject (const char *subname, PyObject **pyObj, Base::Matrix4D *mat, bool transform, int depth) const override GetPyObject returns the Python binding object More. This method returns the main property of a geometric object that holds the actual geometry. Virtual const App::Propert圜omplexGeoData * Public Member Functions inherited from Part::Feature Returns the type name of the ViewProvider More. If round(obj.Angle,utils.precision()) != round(a,utils.GetViewProviderName (void) const override Offset = DraftVecUtils.scaleTo(offset,0.05) If hasattr(obj.ViewObject,"TextSpacing"): R = App.Placement(DraftVecUtils.getPlaneRotation(u3,v3,norm)).Rotation If hasattr(obj.ViewObject,"TextPosition"): Q2 = App.Placement(DraftVecUtils.getPlaneRotation(u2,v2,w2)).Rotation.Q Q1 = App.Placement(DraftVecUtils.getPlaneRotation(u1,v1,w1)).Rotation.Q # calculate small chords to make arrows look betterĪrrowlength = 4* Self.circle2 = Part.Arc(App.Vector(pts2,pts2,pts2),App.Vector(pts2,pts2,pts2),App.Vector(pts2,pts2,pts2)).toShape() Self.circle1 = Part.Arc(App.Vector(pts1,pts1,pts1),App.Vector(pts1,pts1,pts1),App.Vector(pts1,pts1,pts1)).toShape() = utils.string_encode_coin(self.string)Įxcept: # swallow all exceptions here since it always fails on first run (Displaymode enum no set yet) Self.string = DraftGui.displayExternal(a,None,'Angle',su) Self.string = DraftGui.displayExternal(a,'Angle',su) Self.circle = Part.makeCircle(radius,obj.Center,norm,) #Add the vector to visualize reaction forces L.ViewObject.ArrowSize = str(length/15)+' mm' L.Placement=FreeCAD.Placement(FreeCAD.Vector(x,y,z), FreeCAD.Rotation(FreeCAD.Vector(0,0,1),0), FreeCAD.Vector(0,0,0)) Will be used to size the arrows that represent the node. Length = ("x: structural: " + node1.label).Length.Value # Calculate the body characteristic length.

Obj.addProperty("App::PropertyString","force vector multiplier","Animation","force vector multiplier").force_vector_multiplier = '1' Obj.addProperty("App::PropertyString","structural dummy","Animation","structural dummy").structural_dummy = '2' Obj.addProperty("App::PropertyString","frame","Animation","frame").frame = 'local' Obj.addProperty("App::PropertyString","animate","Animation","animate").animate = 'false' Obj.addProperty("App::PropertyDistance","position Z","Initial absolute position","position Z",1).position_Z = z

Obj.addProperty("App::PropertyDistance","position Y","Initial absolute position","position Y",1).position_Y = y Obj.addProperty("App::PropertyDistance","position X","Initial absolute position","position X",1).position_X = x #Absolute position at the node 1 position, only for animation, not for MBDyn sumulation: Obj.addProperty("App::PropertyString","node 2","In line joint","node 2",1).node_2 = node2.label Obj.addProperty("App::PropertyString","node 1","In line joint","node 1",1).node_1 = node1.label Obj.addProperty("App::PropertyString","joint","In line joint","joint",1).joint = 'prismatic' Obj.addProperty("App::PropertyString","label","In line joint","label",1).label = label Obj.addExtension("App::GroupExtensionPython", self) #nothing to do - FreeCAD will take care to make obj.Placement and synchronized.ĭef _init_(self, obj, label, node1, node2): # Moreover, we assume that it is no longer a lattice object, so: # has assigned the shape, and thus we don't do anything. Raise ValueError('Lattice object is null') Obj.Shape = lattice2Markers.getNullShapeShape(markerSize) Placement property will be forced to zero." "Multiple placements are being fed, can't expose placements. Scale=markerSize, markerID=obj.MarkerShape) Marker = lattice2Markers.getPlacementMarker(
