fix some issue with min/max t parameter
This commit is contained in:
parent
ecbc8323f9
commit
8eac0bcfb3
@ -18,7 +18,7 @@
|
||||
<option value="pc">pc</option>
|
||||
</param>
|
||||
<param name="target_length" type="float" min="0.0" precision="4" gui-text="Length">0.5000</param>
|
||||
<param name="target_t" type="float" min="0.0000" max="1.0000" precision="4" appearance="full" gui-text="t">0.5000</param>
|
||||
<param name="target_t" type="float" min="0.0001" max="0.9999" precision="4" appearance="full" gui-text="t">0.5000</param>
|
||||
<param name="keep_start" type="bool" gui-text="Keep start">true</param>
|
||||
<param name="keep_end" type="bool" gui-text="Keep end">true</param>
|
||||
<param name="keep_seg" type="bool" gui-text="Keep only segment where trim applies">false</param>
|
||||
|
@ -62,6 +62,13 @@ class SplitAndBreakBezierAtT(inkex.EffectExtension):
|
||||
pars.add_argument('--keep_seg', type=inkex.Boolean, default=False)
|
||||
|
||||
def effect(self):
|
||||
#if self.options.split_select == "t" and self.options.target_t == 0.0:
|
||||
# inkex.utils.debug("You have seleted 'percentage (t)' but your t parameter is 0.0. It would simply result in element deletion!")
|
||||
# return
|
||||
#if self.options.split_select == "t" and self.options.target_t == 1.0:
|
||||
# inkex.utils.debug("You have seleted 'percentage (t)' but your t parameter is 1.0. It would'nt exist any trim result!")
|
||||
# return
|
||||
|
||||
breakApartElements = None
|
||||
for element in self.svg.selection.filter(PathElement):
|
||||
breakApartElements = self.breakContours(element, breakApartElements)
|
||||
@ -125,7 +132,6 @@ class SplitAndBreakBezierAtT(inkex.EffectExtension):
|
||||
#insert the splitting at the occurence (we add "m 0,0") to break the path
|
||||
newpath.insert(segOfTOccurence + 1, ['m', [0, 0]])
|
||||
element.path = Path(newpath)
|
||||
|
||||
breakAparts = self.breakContours(element)
|
||||
|
||||
if len(breakAparts) > 0:
|
||||
|
Reference in New Issue
Block a user