Contraintes redondantes

Forum destiné aux questions et discussions en français
Forum rules
Règles du forum et informations utiles.

VEUILLEZ LIRE CECI AVANT DE DEMANDER DE L'AIDE
nezbleu
Posts: 13
Joined: Thu Sep 17, 2015 6:23 am

Contraintes redondantes

Postby nezbleu » Sun Sep 20, 2015 6:38 pm

Bonjour

Nouvel utilisateur de FreeCAD je rencontre quelques problèmes.

Dans l'atelier "Part Design", lors de la création de l'esquisse j'ai un message d'erreur concernant une contrainte redondante (en voulant faire une contrainte // par exemple) et je ne vois pas d'ou viens le problème, un petit coup de main ? Merci

Amicalement

OS: Windows 8
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4671 (Git)
Branch: releases/FreeCAD-0-15
Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

PS : Je suis sous Windows 10 et non 8
User avatar
kanagan
Posts: 164
Joined: Tue May 05, 2015 7:25 pm
Location: Angoulême

Re: Contraintes redondantes

Postby kanagan » Sun Sep 20, 2015 7:24 pm

Tu devrais joindre ton fichier si c'est possible pour qu'on jette un œil.
nezbleu
Posts: 13
Joined: Thu Sep 17, 2015 6:23 am

Re: Contraintes redondantes

Postby nezbleu » Sun Sep 20, 2015 7:50 pm

Je viens de refaire un essai et j'ai une contrainte redondante en 28, voici le fichier :

Python 2.7.8 (default, Nov 17 2014, 20:37:05) [MSC v.1800 64 bit (AMD64)] on win32
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> import WebGui
>>> from StartPage import StartPage
>>> WebGui.openBrowserHTML(StartPage.handle(),App.getResourceDir() + 'Mod/Start/StartPage/','Start page')
>>> execfile('C:/Program Files/FreeCAD 0.15/data/Mod/Start/StartPage/PartDesign.py')
>>> App.setActiveDocument("Unnamed")
>>> App.ActiveDocument=App.getDocument("Unnamed")
>>> Gui.ActiveDocument=Gui.getDocument("Unnamed")
>>> App.activeDocument().addObject('Sketcher::SketchObject','Sketch')
>>> App.activeDocument().Sketch.Placement = App.Placement(App.Vector(0.000000,0.000000,0.000000),App.Rotation(-0.707107,0.000000,0.000000,-0.707107))
>>> Gui.activeDocument().activeView().setCamera('#Inventor V2.1 ascii \n OrthographicCamera {\n viewportMapping ADJUST_CAMERA\n position 0 -87 0 \n orientation -1 0 0 4.712389\n nearDistance -112.88701\n farDistance 287.28702\n aspectRatio 1\n focalDistance 87\n height 143.52005\n\n}')
>>> Gui.activeDocument().setEdit('Sketch')
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-0.271822,62.518204,0),App.Vector(-6.795459,61.793358,0)))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-6.795459,61.793358,0),App.Vector(-6.251823,56.538200,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',0,2,1,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-6.251823,56.538200,0),App.Vector(-8.970003,55.994564,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',1,2,2,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-8.970003,55.994564,0),App.Vector(-8.970003,48.202442,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',2,2,3,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',3))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-8.970003,48.202442,0),App.Vector(-17.124552,47.840015,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',3,2,4,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-17.124552,47.840015,0),App.Vector(-18.030615,-0.362423,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',4,2,5,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',5))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-17.124552,-0.362423,0),App.Vector(-7.882727,-0.362423,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',5,2,6,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('PointOnObject',6,2,-1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',6))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-7.882727,0.000000,0),App.Vector(-7.882727,16.490307,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',6,2,7,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',7))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-7.882727,16.490307,0),App.Vector(-4.620915,16.490307,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',7,2,8,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',8))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-4.620915,16.490307,0),App.Vector(-5.526973,31.349707,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',8,2,9,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-5.526973,31.349707,0),App.Vector(0.090609,31.530924,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',9,2,10,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',10))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(0.090609,31.349707,0),App.Vector(-0.090605,62.336994,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',10,2,11,1))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',11,2,0,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',11))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',0))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',2))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',4))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',9))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',0,-6.886068))
>>> App.ActiveDocument.Sketch.setDatum(25,App.Units.Quantity('-5.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('PointOnObject',0,1,-2))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('PointOnObject',5,2,-1))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',2,2,0,1,8.970003))
>>> App.ActiveDocument.Sketch.setDatum(28,App.Units.Quantity('6.000000 mm'))
>>> App.ActiveDocument.recompute()
>>>

J'ai fait un retour et recommencer à paramétrer l'esquisse et cela a fonctionné ??? voici le fichier :

Python 2.7.8 (default, Nov 17 2014, 20:37:05) [MSC v.1800 64 bit (AMD64)] on win32
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> import WebGui
>>> from StartPage import StartPage
>>> WebGui.openBrowserHTML(StartPage.handle(),App.getResourceDir() + 'Mod/Start/StartPage/','Start page')
>>> execfile('C:/Program Files/FreeCAD 0.15/data/Mod/Start/StartPage/PartDesign.py')
>>> App.setActiveDocument("Unnamed")
>>> App.ActiveDocument=App.getDocument("Unnamed")
>>> Gui.ActiveDocument=Gui.getDocument("Unnamed")
>>> App.activeDocument().addObject('Sketcher::SketchObject','Sketch')
>>> App.activeDocument().Sketch.Placement = App.Placement(App.Vector(0.000000,0.000000,0.000000),App.Rotation(-0.707107,0.000000,0.000000,-0.707107))
>>> Gui.activeDocument().activeView().setCamera('#Inventor V2.1 ascii \n OrthographicCamera {\n viewportMapping ADJUST_CAMERA\n position 0 -87 0 \n orientation -1 0 0 4.712389\n nearDistance -112.88701\n farDistance 287.28702\n aspectRatio 1\n focalDistance 87\n height 143.52005\n\n}')
>>> Gui.activeDocument().setEdit('Sketch')
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-0.271822,62.518204,0),App.Vector(-6.795459,61.793358,0)))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-6.795459,61.793358,0),App.Vector(-6.251823,56.538200,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',0,2,1,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-6.251823,56.538200,0),App.Vector(-8.970003,55.994564,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',1,2,2,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-8.970003,55.994564,0),App.Vector(-8.970003,48.202442,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',2,2,3,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',3))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-8.970003,48.202442,0),App.Vector(-17.124552,47.840015,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',3,2,4,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-17.124552,47.840015,0),App.Vector(-18.030615,-0.362423,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',4,2,5,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',5))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-17.124552,-0.362423,0),App.Vector(-7.882727,-0.362423,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',5,2,6,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('PointOnObject',6,2,-1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',6))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-7.882727,0.000000,0),App.Vector(-7.882727,16.490307,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',6,2,7,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',7))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-7.882727,16.490307,0),App.Vector(-4.620915,16.490307,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',7,2,8,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',8))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-4.620915,16.490307,0),App.Vector(-5.526973,31.349707,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',8,2,9,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-5.526973,31.349707,0),App.Vector(0.090609,31.530924,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',9,2,10,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',10))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(0.090609,31.349707,0),App.Vector(-0.090605,62.336994,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',10,2,11,1))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',11,2,0,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',11))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',0))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',2))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',4))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',9))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',0,-6.886068))
>>> App.ActiveDocument.Sketch.setDatum(25,App.Units.Quantity('-5.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('PointOnObject',0,1,-2))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('PointOnObject',5,2,-1))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',2,2,0,1,8.970003))
>>> App.ActiveDocument.Sketch.setDatum(28,App.Units.Quantity('6.000000 mm'))
>>> App.ActiveDocument.recompute()
>>>

amicalement
nezbleu
Posts: 13
Joined: Thu Sep 17, 2015 6:23 am

Re: Contraintes redondantes

Postby nezbleu » Sun Sep 20, 2015 7:52 pm

Désolé j'ai m... pour le deuxième fichier, le voici :

Python 2.7.8 (default, Nov 17 2014, 20:37:05) [MSC v.1800 64 bit (AMD64)] on win32
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> import WebGui
>>> from StartPage import StartPage
>>> WebGui.openBrowserHTML(StartPage.handle(),App.getResourceDir() + 'Mod/Start/StartPage/','Start page')
>>> execfile('C:/Program Files/FreeCAD 0.15/data/Mod/Start/StartPage/PartDesign.py')
>>> App.setActiveDocument("Unnamed")
>>> App.ActiveDocument=App.getDocument("Unnamed")
>>> Gui.ActiveDocument=Gui.getDocument("Unnamed")
>>> App.activeDocument().addObject('Sketcher::SketchObject','Sketch')
>>> App.activeDocument().Sketch.Placement = App.Placement(App.Vector(0.000000,0.000000,0.000000),App.Rotation(-0.707107,0.000000,0.000000,-0.707107))
>>> Gui.activeDocument().activeView().setCamera('#Inventor V2.1 ascii \n OrthographicCamera {\n viewportMapping ADJUST_CAMERA\n position 0 -87 0 \n orientation -1 0 0 4.712389\n nearDistance -112.88701\n farDistance 287.28702\n aspectRatio 1\n focalDistance 87\n height 143.52005\n\n}')
>>> Gui.activeDocument().setEdit('Sketch')
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-0.271822,62.518204,0),App.Vector(-6.795459,61.793358,0)))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-6.795459,61.793358,0),App.Vector(-6.251823,56.538200,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',0,2,1,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-6.251823,56.538200,0),App.Vector(-8.970003,55.994564,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',1,2,2,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-8.970003,55.994564,0),App.Vector(-8.970003,48.202442,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',2,2,3,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',3))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-8.970003,48.202442,0),App.Vector(-17.124552,47.840015,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',3,2,4,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-17.124552,47.840015,0),App.Vector(-18.030615,-0.362423,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',4,2,5,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',5))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-17.124552,-0.362423,0),App.Vector(-7.882727,-0.362423,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',5,2,6,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('PointOnObject',6,2,-1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',6))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-7.882727,0.000000,0),App.Vector(-7.882727,16.490307,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',6,2,7,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',7))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-7.882727,16.490307,0),App.Vector(-4.620915,16.490307,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',7,2,8,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',8))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-4.620915,16.490307,0),App.Vector(-5.526973,31.349707,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',8,2,9,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(-5.526973,31.349707,0),App.Vector(0.090609,31.530924,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',9,2,10,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',10))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addGeometry(Part.Line(App.Vector(0.090609,31.349707,0),App.Vector(-0.090605,62.336994,0)))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',10,2,11,1))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Coincident',11,2,0,1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',11))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',0))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',1))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',2))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Horizontal',4))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('Vertical',9))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',0,-6.886068))
>>> App.ActiveDocument.Sketch.setDatum(25,App.Units.Quantity('-5.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('PointOnObject',0,1,-2))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('PointOnObject',5,2,-1))
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',2,2,0,1,8.970003))
>>> App.ActiveDocument.Sketch.setDatum(28,App.Units.Quantity('6.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',2,2,0,1,8.970003))
>>> App.ActiveDocument.Sketch.setDatum(27,App.Units.Quantity('6.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',4,2,0,1,17.124552))
>>> App.ActiveDocument.Sketch.setDatum(28,App.Units.Quantity('9.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',10,4.620915))
>>> App.ActiveDocument.Sketch.setDatum(29,App.Units.Quantity('5.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceX',7,2,10,2,7.882727))
>>> App.ActiveDocument.Sketch.setDatum(30,App.Units.Quantity('6.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceY',7,16.490307))
>>> App.ActiveDocument.Sketch.setDatum(31,App.Units.Quantity('11.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceY',9,20.349707))
>>> App.ActiveDocument.Sketch.setDatum(32,App.Units.Quantity('16.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceY',5,-48.202442))
>>> App.ActiveDocument.Sketch.setDatum(33,App.Units.Quantity('-30.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceY',3,-26.538200))
>>> App.ActiveDocument.Sketch.setDatum(34,App.Units.Quantity('-8.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> App.ActiveDocument.Sketch.addConstraint(Sketcher.Constraint('DistanceY',1,-24.336994))
>>> App.ActiveDocument.Sketch.setDatum(35,App.Units.Quantity('-12.000000 mm'))
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().resetEdit()
>>> App.ActiveDocument.recompute()
>>> App.activeDocument().addObject("PartDesign::Revolution","Revolution")
>>> App.activeDocument().Revolution.Sketch = App.activeDocument().Sketch
>>> App.activeDocument().Revolution.ReferenceAxis = (App.activeDocument().Sketch,['V_Axis'])
>>> App.activeDocument().Revolution.Angle = 360.0
>>> App.ActiveDocument.recompute()
>>> Gui.activeDocument().hide("Sketch")
>>> Gui.activeDocument().setEdit('Revolution')
>>>
User avatar
kanagan
Posts: 164
Joined: Tue May 05, 2015 7:25 pm
Location: Angoulême

Re: Contraintes redondantes

Postby kanagan » Sun Sep 20, 2015 7:54 pm

Met le fichier en pièce jointe du message en cliquant sur "attachement" ce sera plus pratique pour moi ...
nezbleu
Posts: 13
Joined: Thu Sep 17, 2015 6:23 am

Re: Contraintes redondantes

Postby nezbleu » Sun Sep 20, 2015 8:06 pm

Je n'avais pas sauvegardé ... mais comme je suis doué :lol: cela me le fait à chaque fois. Voici un nouveau fichier
Attachments
contraintes redondantes.FCStd
(3.76 KiB) Downloaded 22 times
User avatar
kanagan
Posts: 164
Joined: Tue May 05, 2015 7:25 pm
Location: Angoulême

Re: Contraintes redondantes

Postby kanagan » Sun Sep 20, 2015 8:11 pm

nezbleu wrote:Je n'avais pas sauvegardé ... mais comme je suis doué :lol: cela me le fait à chaque fois. Voici un nouveau fichier
C'est que tu as deux contraintes de tangeance au même endroit. La contrainte 1 et 20.
Tu supprime une des deux et tout rentre dans l'ordre.
Last edited by kanagan on Sun Sep 20, 2015 8:15 pm, edited 1 time in total.
User avatar
kanagan
Posts: 164
Joined: Tue May 05, 2015 7:25 pm
Location: Angoulême

Re: Contraintes redondantes

Postby kanagan » Sun Sep 20, 2015 8:12 pm

Par contre il va te rester 16 degrés de liberté à contraindre...
nezbleu
Posts: 13
Joined: Thu Sep 17, 2015 6:23 am

Re: Contraintes redondantes

Postby nezbleu » Sun Sep 20, 2015 8:38 pm

Merci pour ta réponse Kanagan ... malheureusement j'ai pas trop compris :oops: .

J'ai refait l'esquisse en m'appliquant pour les verticales et horizontales et là aucun problème après mise à la cote.

Heu c'est quoi les 16 degrés de liberté à contraindre ?

Merci pout ta patiencer :)
User avatar
kanagan
Posts: 164
Joined: Tue May 05, 2015 7:25 pm
Location: Angoulême

Re: Contraintes redondantes

Postby kanagan » Sun Sep 20, 2015 8:47 pm

Dans le fichier que tu as partagé, quand tu es dans l'esquisse et dans la colonne à droite de l'écran tu peux voir toutes les lignes et toutes les contraintes de ton esquisse.
Quand tu sélectionne la contrainte 1 et la contrainte 20 tu peux voir qu'elles se superposés.
Tu supprime une de ces deux contrainte et tu verra en haut de la colonne que tu as 16 degrés de liberté qui apparaissent. C'est à dire que tu dois ajouté des côtés à ton esquisse pour qu'elle soit totalement contrainte.